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.

I'm a Linux guy and I use .Net

Why would any self respecting Linux enthusiast use .Net for anything? The short answer can be summed up in one word: Mono.

Ballmer Saw This Coming

Steve Ballmer reccently stepped down from the board at Microsoft and a few tech sites reported this as being unexpected. It seems mainstream media is suffering from short-term memory loss; no one can remember what happened more than 2 years ago, 2 months is about the limit. Too much has happened over the past few years to view current headlines in an appropriate context so I thought I'd help remind people what Balmer was up to at MS.

Diagraming software is terrible

I hate pretty much all diagramming tools. Visio is too expensive, Dia uses an ancient version of GTK+ and crashes when exporting, Calligra Flow crashes a lot and doesn't work on anything but KDE, LibreOffice Draw is pretty much the only one that isn't completely terrible but the canvas size is fixed and it defaults back to the selector tool after every operation. However, this whole HTML5 thing is finally starting to pay off.

Pt1: The Language Doesn't Really Matter

So when I say the language doesn't matter, that doesn't mean programming languages don't have certain advantages but until you really understand a few languages, advantages don't matter. Understanding a system well enough to solve 90+ percent of your computing problems is more important. With most modern languages you can implement just about anything: systems utilities, network programming, web applications, etc. That doesn't mean there isn't a right tool for the job, but you can learn an awful lot while using the wrong tool for the job. I don't have a lot of scientific evidence to convince you, but I do have a couple stories about stuff I've made, mostly using the wrong language, and managed to get things working.