I was just pointed to a great website to help you write PInvoke calls. Http://www.pinvoke.net. It's a Wiki that has a bunch of PInvoke calls for common Win32 API's. I was only pointed to this site after my developer and I spent a number of days trying to debug an application crash that was caused by us corrupting memory by improperly marshaling objects between .NET and Win32.

Question to the community:

How could the SDK make it easier for you to write PInvoke calls from .NET?

We have been bouncing around some ideas internally, but I'm curious how people figure out the proper way to write a PInvoke call and how Microsoft could make it easier for you?