K
kunwyf12345
Unregistered / Unconfirmed
GUEST, unregistred user!
我用的是海康的sdk,用到里面函数net_dvr_setrealdatacallback,调用回调函数提示calling conventions differ,怎么回事啊,不好意思,我现在只有10分 实际调用时的回调函数这样写: type RealDataCallBack = procedure(lRealHandle: Longint;
dwDataType: DWORD;
pBuffer: PByte;
dwBufSize, dwUser: DWORD);
//这句要在调用界面写吗 function NET_DVR_SetRealDataCallBack(lRealHandle: Longint;
CallBack: RealDataCallBack;
dwUser: DWORD): BOOL;
stdcall;
external "HCNetSDK.dll ";
//这句要在调用界面写吗 procedure MyRealDataCallBack(lRealHandle: Longint;
dwDataType: DWORD;
pBuffer: PByte;
dwBufSize, dwUser: DWORD);
//还是直接声明这个函数,然后下面写代码? begin
//此处写回调处理函数的代码 end;
...... var lRealHandle : Longint;
begin
...... lRealHandle := NET_DVR_RealPlay(......);
...... NET_DVR_SetRealDataCallBack(lRealHandle, MyRealDataCallBack, 1000);
//1000为用户数据, 可以借此区分不同的回调 ,为什么这行会出现calling conventions differ错误,怎么回事啊 ...... end;
dwDataType: DWORD;
pBuffer: PByte;
dwBufSize, dwUser: DWORD);
//这句要在调用界面写吗 function NET_DVR_SetRealDataCallBack(lRealHandle: Longint;
CallBack: RealDataCallBack;
dwUser: DWORD): BOOL;
stdcall;
external "HCNetSDK.dll ";
//这句要在调用界面写吗 procedure MyRealDataCallBack(lRealHandle: Longint;
dwDataType: DWORD;
pBuffer: PByte;
dwBufSize, dwUser: DWORD);
//还是直接声明这个函数,然后下面写代码? begin
//此处写回调处理函数的代码 end;
...... var lRealHandle : Longint;
begin
...... lRealHandle := NET_DVR_RealPlay(......);
...... NET_DVR_SetRealDataCallBack(lRealHandle, MyRealDataCallBack, 1000);
//1000为用户数据, 可以借此区分不同的回调 ,为什么这行会出现calling conventions differ错误,怎么回事啊 ...... end;