参考:c++中char*如何转换成c#-CSDN社区

现在需要调用c++中一个dll中函数

void Request (char* EntPara[in],char* RetPara[out],Short *iRetValue[in,out] )

 

    1. [DllImport("XXX.dll")]
    2.  
      public static extern void Request(string EntPara, StringBuilder RetPara, out short iRetValue);
    3.  
       
    4.  
      static void Main(string[] args)
    5.  
      {
    6.  
      string entpara = "XXXXXXX";
    7.  
      StringBuilder retpara = new StringBuilder(1024);
    8.  
      short iretvalue = 1;
    9.  
      Request(entpara, retpara, out iretvalue);
    10.  
      Console.ReadLine();
    11.  
      }

 

 

相关文章:

  • 2022-01-17
  • 2021-07-17
  • 2022-12-23
  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
  • 2021-11-08
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案