8
88jian
Unregistered / Unconfirmed
GUEST, unregistred user!
有一个DLL文件有如下的函数:
LONG CALLBACK ReceiveComm(UCHAR *buffer)
{
DWORD length;
char tmp_num[11];
char ret;
WLog("RecvComm : ********************/n", true);
if (com.Status() == DISCONNECTED)
{
WLog("RecvComm : [RETURN DISCONNECTED]/n", true);
return (DISCONNECTED);
}
if( rxbuf.Status() == DATA_AVAIL )
{
length = rxbuf.DataLength() - 3;
ret = rxbuf.Data(buffer, 2, length);
if( ret == TRUE)
{
/* WLog("After RecvComm Data->", true);
WLog((char *)buffer, false);
WLog("<-/n", false); */
rxbuf.ChangeStatus(IDLE);
rxbuf.Clear();
WLog("RecvComm : <- ", true);
WLog(" Len[", false);
sprintf(tmp_num,"%i",length);
WLog(tmp_num, false);
WLog("]/n", false);
return length;
}
else
{
WLog("Receive Data Error !", true);
return -1;
}
}
WLog("RecvComm : [RETURN 0]/n", true);
return 0;
}
我用DELPHI设置什么样类型的参数传给他
LONG CALLBACK ReceiveComm(UCHAR *buffer)
{
DWORD length;
char tmp_num[11];
char ret;
WLog("RecvComm : ********************/n", true);
if (com.Status() == DISCONNECTED)
{
WLog("RecvComm : [RETURN DISCONNECTED]/n", true);
return (DISCONNECTED);
}
if( rxbuf.Status() == DATA_AVAIL )
{
length = rxbuf.DataLength() - 3;
ret = rxbuf.Data(buffer, 2, length);
if( ret == TRUE)
{
/* WLog("After RecvComm Data->", true);
WLog((char *)buffer, false);
WLog("<-/n", false); */
rxbuf.ChangeStatus(IDLE);
rxbuf.Clear();
WLog("RecvComm : <- ", true);
WLog(" Len[", false);
sprintf(tmp_num,"%i",length);
WLog(tmp_num, false);
WLog("]/n", false);
return length;
}
else
{
WLog("Receive Data Error !", true);
return -1;
}
}
WLog("RecvComm : [RETURN 0]/n", true);
return 0;
}
我用DELPHI设置什么样类型的参数传给他