Returning Strings from DLL Functions

前端 未结 7 1160
北恋
北恋 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:06

    I had such problem that has been solved by:

    • using runtime library as DLL for both the application and the DLL (so that allocation is handle in a unique place)

    • making sure all project settings (compiler, linker) are the same on both project

提交回复
热议问题