C#学習——————C++のdllを呼び出したときにchar*タイプポインタが現れてどのように解決しますか?

655 ワード

     Char*                ;
          :
int ReadBaseMsgPhoto(char* pMsg, int * len, char* directory);

C++ :pMsg      char    ;
     len    ;
     directory       char    ;

     ,    ,      :
1.       198      ,     256        ,
     byte  ,  byte         byte     ,
   ref          

1.  dll  :
[DllImport("Sdtapi.dll")]
public static extern int ReadBaseMsgPhoto(ref byte pMsg, ref int len, string directory);  

2.
byte[] pMsg = new byte[256];
int len = 0;
string directory = "PicPath";

//      
ReadBaseMsgPhoto(ref pMsg[0],ref len,directory);

  :
1.                   ,        ,   string       ;