PInvokeStackImbalance C# call to unmanaged C++ function

前端 未结 5 1806
礼貌的吻别
礼貌的吻别 2020-12-05 00:09

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.

<
5条回答
  •  半阙折子戏
    2020-12-05 00:36

    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.

提交回复
热议问题