A student of mine pointed this out today. Leave it to a C++ programmer to know all the platform tips and tricks.
PINVOKE.NET addresses the difficulty of calling Win32 or other unmanaged APIs in managed code (languages such as C# and VB .NET). It even includes the complex structure definitions, where applicable.