Ali P7 mobile Internet architect, Advanced Video (Daily update) for free learning, please click: https://space.bilibili.com/474380680
C ++ and C # data types summary
C ++ C # to call the DLL has collected all the data type conversions way, there may be a repeat or a variety of programs.
Win32 Types —- CLR Type
Struct need to be defined in C # in a Struct
the CallBack callback function needs to be encapsulated in a delegate Lane, delegate static extern int FunCallBack (string str);
alternatively unsigned char ppImage ** to IntPtr ppImage
int & nWidth replaced REF int nWidth
int , int &, then available ref int the corresponding
needle refers to the type parameter can ref IntPtr
function pointers using C ++: typedef Double ( fun_type1) (Double); corresponding to c #: public the delegate Double fun_type1 (Double);
char * operating c ++: char * corresponding to c # : the StringBuilder
c # pointers in use: add in place need to use unsafe pointers
corresponding to public byte unsigned char
Called to
Original link: https://blog.csdn.net/humanking7/article/details/50981922
Ali P7 mobile Internet architect, Advanced Video (Daily update) for free learning, please click: https://space.bilibili.com/ 474 380 680