[问题] DllImport C++函式参数型别转换

楼主: a2975313 (GN)   2020-04-17 11:14:02
最近遇到wrapper问题,一直遇到“尝试读取或写入受保护的内存,这通常表示其他记
忆体已损毁。”,想问下列参数在C#中会是什么型别?
不确定c++ pointer是否都要转成c# IntPtr,那uint[]要怎么转?
除自订结构外,已知
unsigned char * => unsigned char[]
unsigned int * => unsigned int[]
LIB_API extern int Ies_Eval(
const IesTest *test,
const unsigned char *defect,
unsigned char lineClass,
les_LineDefect *line,
Ies_PointDefect *point,
unsigned char *map,
unsigned int *mapV,
unsigned int *mapH
);
作者: testPtt (测试)   2020-04-17 16:42:00
unsafe

Links booklink

Contact Us: admin [ a t ] ucptt.com