C++原型
BOOL __stdcall Open (HANDLE *handle,DWORD CardId);
C#对应类型
 [DllImport("USB.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
 public static extern bool Open(ref IntPtr intptr, Byte CardId);
函数正常运行,但是问题出现了。这里的 ref IntPtr intptr 每次打开后,intptr 这个值 一直在改变。
C++中  handle 的值是固定不变的。