文章目录


自己用C++ 项目,封装成dll动态库,动态库导出命名为 LineProApi.dll;
C#调用时时出错 “Debug Assertion Failed!...dllFile:minkernelicrts)ucrtisrcappcrt\heapidebug
在这里插入图片描述

Debug Assertion Failed!
Program: D:\GxTest\P0056 B2\binLineProApi.dllFile:minkernelicrts)ucrtisrcappcrt\heapidebug heap.cppLine: 996
Expression: acrt first block == header
For information on how your program can cause an assertionfailure, see the Visual C++ documentation on asserts.
(Press Retry to debug the application)

经过反复检查发现,项目属性,运行库设置问题。
将运行库“多线程调试(/MTd)改为多线程调试DLL(MDd)”,调用运行正常

在这里插入图片描述

在这里插入图片描述

Logo

开源鸿蒙跨平台开发社区汇聚开发者与厂商,共建“一次开发,多端部署”的开源生态,致力于降低跨端开发门槛,推动万物智联创新。

更多推荐