C#調用C++DLL

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);string

未寫完整...coding

 

   public static extern int FY_GetMachineVer(IntPtr sRet);im

相關文章
相關標籤/搜索