Viewing posts from September, 2014

DFS links with C#/.Net Native Interop

I've been writing some software to manage DFS links from .Net and historically I've parsed the output of dfsutil.exe to get my information but this can be unreliable, so what to do? Win32 to the rescue with .Net native interop. This has been a painful process since I do not know C and have limited experience with the Win32 api so I hope this can help people. The code will return a List<struct> representing the information i want out of the DFS query: link name, array of target UNCs. Here's the gist.