首页 > 代码库 > c# 传递Null的string值导致的调用C++的dll报错 Attempted to read or write protected memory.

c# 传递Null的string值导致的调用C++的dll报错 Attempted to read or write protected memory.

c# 调用C++的dll报错 Attempted to read or write protected memory:

 

原因是:c# 传递Null的string值导致的,将Null改为string.empty即可

c# 传递Null的string值导致的调用C++的dll报错 Attempted to read or write protected memory.