C# detect folder junctions in a path

…衆ロ難τιáo~ 提交于 2019-11-30 08:45:23

Look at the solution of Jeff Brown.

He implemented your features in a static class, that seems to just work fine.

http://www.codeproject.com/KB/files/JunctionPointsNet.aspx

As far as I know there's no out of the box implementation in c# to handle junctions / reparse points directly.

So you have to do some interop with kernel32.dll. This is a bit tricky, but you find samples. You'll need the CreateFile() & DeviceIoControl() calls.

Here is a good sample to start: http://www.codeproject.com/KB/vista/ReparsePointID.aspx?display=Print

useful msdn links:

http://msdn.microsoft.com/en-us/library/cc232007%28PROT.13%29.aspx

http://msdn.microsoft.com/en-us/library/aa363858%28v=vs.85%29.aspx

http://msdn.microsoft.com/en-us/library/aa363216%28v=vs.85%29.aspx

http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/7acd564f-0e9f-4295-8609-916af6675f0a

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!