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.
It's good.I update function define as follow:
[DllImport("mydll.dll", CallingConvention = CallingConvention.Cdecl)]
It works well.