W
wuling
Unregistered / Unconfirmed
GUEST, unregistred user!
一个用BCB写的动态链接库基本内容如下
typedef struct _STDataBuf
{
int nAddr;
//手持机地址
unsigned char *pSendDataBuf;
unsigned short uSendLen;
unsigned char *pReceiveDataBuf;
unsigned short uReceiveLen;
int nResult;
}STDataBuf;
extern "C" __declspec(dllexport) void __stdcall ReadCurTime(STDataBuf &Param)
{
。。。执行一些操作
Param.nResult=1;
}
在DELPHI中调用相应的声明如下
TDataBuf=record
nAddr:integer;
pSendDataBufchar;
uSendLen:word;
pReceiveDataBufchar;
uReceiveLen:word;
nResult:integer;
end;
procedure ReadCurTime(var TDataBuf Param);stdcall;
调用后参数中的nResult没用被赋值
typedef struct _STDataBuf
{
int nAddr;
//手持机地址
unsigned char *pSendDataBuf;
unsigned short uSendLen;
unsigned char *pReceiveDataBuf;
unsigned short uReceiveLen;
int nResult;
}STDataBuf;
extern "C" __declspec(dllexport) void __stdcall ReadCurTime(STDataBuf &Param)
{
。。。执行一些操作
Param.nResult=1;
}
在DELPHI中调用相应的声明如下
TDataBuf=record
nAddr:integer;
pSendDataBufchar;
uSendLen:word;
pReceiveDataBufchar;
uReceiveLen:word;
nResult:integer;
end;
procedure ReadCurTime(var TDataBuf Param);stdcall;
调用后参数中的nResult没用被赋值