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.
As mentioned in Dane Rose's comment, you can either use __stdcall on your C++ function or declare CallingConvention = CallingConvention.Cdecl on your DllImport.