码迷,mamicode.com
首页 > 编程语言 > 详细

C#调用C++DLL

时间:2014-10-29 18:46:40      阅读:177      评论:0      收藏:0      [点我收藏+]

标签:ar   sp   bs   new   as   c++   nbsp   c#   class   

byte[] cBuf = new byte[14];
IntPtr MachineVer = System.Runtime.InteropServices.Marshal.AllocHGlobal(14);
int x = OcxClass.FY_GetMachineTime(MachineVer);
Marshal.Copy(MachineVer, cBuf,0,14);
string xx= Encoding.ASCII.GetString(cBuf);

未写完整...

 

   public static extern int FY_GetMachineVer(IntPtr sRet);

C#调用C++DLL

标签:ar   sp   bs   new   as   c++   nbsp   c#   class   

原文地址:http://www.cnblogs.com/yewei798/p/4060066.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!