8
88jian
Unregistered / Unconfirmed
GUEST, unregistred user!
本人调用一个'ECR32xp.DLL'文件里的long function ReceiveComm(lpvbuf)
uchar *lpvbuf
本人在代码里调用入下:
function ReceiveComm(Buffchar):Integer;stdcall;external 'ECR32xp.DLL'
// 參數的類型是否正确 ?
Rbuf: String;
r:=ReceiveComm(Rbuf);
但是出现报读地址的错误;
本人曾经换过很多类型的参数都不行,但是在VB里如下面调用就没有问题:
Declare Function ReceiveComm Lib "ecr32.dll"
(Buff As Any) As Integer
Type buftype
buffer As String * 2048
End Type
i = ReceiveComm(Rbuf)
请指教,可以加我QQ;51562441或MSN:you_yongjian,万分感激!!!
uchar *lpvbuf
本人在代码里调用入下:
function ReceiveComm(Buffchar):Integer;stdcall;external 'ECR32xp.DLL'
// 參數的類型是否正确 ?
Rbuf: String;
r:=ReceiveComm(Rbuf);
但是出现报读地址的错误;
本人曾经换过很多类型的参数都不行,但是在VB里如下面调用就没有问题:
Declare Function ReceiveComm Lib "ecr32.dll"
(Buff As Any) As Integer
Type buftype
buffer As String * 2048
End Type
i = ReceiveComm(Rbuf)
请指教,可以加我QQ;51562441或MSN:you_yongjian,万分感激!!!