你好,我要在 Delphi 中翻译这个 C 外部函数 DLL 声明
[DllImport("CRT_571.dll")]
public static extern int ExecuteCommand(UInt32 ComHandle, byte TxAddr, byte TxCmCode, byte TxPmCode, UInt16 TxDataLen, byte[] TxData, ref byte RxReplyType, ref byte RxStCode0, ref byte RxStCode1, ref byte RxStCode2, ref UInt16 RxDataLen, byte[] RxData);
我试过这个
Type
PTBytes = ^TBytes;
function ExecuteCommand(ComHandle: UInt32; TxAddr, TxCmCode, TxPmCode: byte; TxDataLen: UInt16; TxData: TBytes; var RxReplyType, RxStCode0, RxStCode1, RxStCode2: Byte; var RxDataLen: UInt16; RxData: PTBytes): integer; stdcall; external 'CRT_571.dll' name 'ExecuteCommand' delayed;
在哪里但是当我调用函数时我遇到了“访问冲突”
感谢帮助