Marshaling a C++ two-dimensional fixed length char array as a structure member

前端 未结 4 1395
Happy的楠姐
Happy的楠姐 2021-01-13 17:03

I am trying to call an unmanaged C++ function, that has a structure as an input parameter. The structure is defined in the header file like this:

struct MySt         


        
4条回答
  •  感情败类
    2021-01-13 17:33

    char aaszNames[6][25];
    

    char of C++ Type is 8 bits~

    but char of C# Type is Unicode ,(16 bits) !

    so char of C++ Type <-> byte of C# type

提交回复
热议问题