Tag Archive for interop

Win32 API from .Net application

When you use .Net, you sometimes need some old win32 api’s. Even if a managed environment is really appreciable and confortable, there are some part of windows you can’t access from C# or VB .net code. Then you often have no other choice than rely on old windows system calls.

This generally implies a lot of marshalling and interop to wrap unmanaged windows functions into nice managed .Net namespaces. And this is also true for mobile developpers interacting with Windows CE dll, see Interop for .Net Compact Framework.

I just discovered that  a couple of Win32 functionnalities are already bundled in the Microsoft.Win32 namespace of the .Net framework.

Another great resource for COM interop is the P/Invoke wiki !

And for those who are (still) more familiar with the old school windows functions, you can refer to this map to find your way in the .Net environment.