Y yeszhang Unregistered / Unconfirmed GUEST, unregistred user! 2009-04-15 #1 int OneCommand(int cmd, int dlength,BYTE * pBuff,int nTypeAB, int nOutOfTime) 给个例子吧.
Z znxia Unregistered / Unconfirmed GUEST, unregistred user! 2009-04-15 #2 function OneCommand(cmd:Smallint; dlength:smallInt; pBuffChar; nTypeAB,nOutOfTime:SmallInt): SmallInt;//Delphi中, Smallint 2个字节, integer 4个字节案例:var pBuffChar; iReturn:Integer;begin pBuff:=StrAlloc(1500); iReturn := OneCommand(0x3001,0, pBuff, 1, 1500); if iReturn<0 then begin showmessage('error'); StrDispose(pBuff); Exit; end; //处理数据 StrDispose(pBuff);end;
function OneCommand(cmd:Smallint; dlength:smallInt; pBuffChar; nTypeAB,nOutOfTime:SmallInt): SmallInt;//Delphi中, Smallint 2个字节, integer 4个字节案例:var pBuffChar; iReturn:Integer;begin pBuff:=StrAlloc(1500); iReturn := OneCommand(0x3001,0, pBuff, 1, 1500); if iReturn<0 then begin showmessage('error'); StrDispose(pBuff); Exit; end; //处理数据 StrDispose(pBuff);end;
Y yeszhang Unregistered / Unconfirmed GUEST, unregistred user! 2009-04-16 #4 OneCommand(0x3001,0, pBuff, 1, 1500); 语法错误.0x3001就编译不过去,呵呵.我基础不好, 这样的数字0x3001 在Delphi如何表示呢?