B
backup
Unregistered / Unconfirmed
GUEST, unregistred user!
如题:在C的头文件中是这样表达的<br>HANDLE (*MPUSBOpen)(DWORD instance, // Input<br> PCHAR pVID_PID, // Input<br> PCHAR pEP, // Input<br> DWORD dwDir, // Input<br> DWORD dwReserved); // Input &lt;Future Use&gt;<br>DWORD (*MPUSBWrite)(HANDLE handle, // Input<br> PVOID pData, // Input<br> DWORD dwLen, // Input<br> PDWORD pLength, // Output<br> DWORD dwMilliseconds); // Input<br>如果换成用Delphi表达,该如何写呢?<br>我是这样写的,但是程序运行得不到正确结果:<br>type<br> DWORD = Longword;<br> PCHAR8 = array[0..MAXSIZE] of char;<br> PBYTE = array[0..MAXSIZE] of BYTE;<br> PDWORD = array[0..MAXSIZE] of DWORD;<br> PVOID = Pointer;<br> UINT = Cardinal;<br> THandle=HWND;<br><br>function _MPUSBOpen(instanceWORD;pVID_PIDCHAR8;pEPCHAR8;dwDirWORD;dwReservedWORD):THANDLE; stdcall;external 'mpusbapi.dll';<br>function _MPUSBWrite(handle:THANDLE;pDataBYTE;dwLenWORD;var pLengthWORD;dwMillisecondsWORD)WORD; stdcall;external 'mpusbapi.dll';<br>