After switching to VS2010, the managed debug assistant is displaying an error about an unbalanced stack from a call to an unmanaged C++ function from a C# application.
Had the same problem as described - unmanaged C++ app that has worked perfectly for years. When we upgraded to VS2010, we started getting PInvokeStackUnbalanced messages.
adding "__stdcall" to the C++ signature as described above made the issue go away.