Returning Strings from DLL Functions

前端 未结 7 1165
北恋
北恋 2020-12-16 01:44

For some reason, returning a string from a DLL function crashes my program on runtime with the error Unhandled exception at 0x775dfbae in Cranberry Library Tester.exe:

7条回答
  •  爱一瞬间的悲伤
    2020-12-16 02:25

    Just like snmacdonald I was unable to repro your crash, under normal circumstances. Others already mentioned: Configuration Properties -> Code Generation -> Runtime Library must be exactly the same

    If I change one of them I get your crash. I have both the DLL and EXE set to Multi-Threaded DLL.

提交回复
热议问题