--HCNetSDK-- 单元
...type
LPNET_DVR_ALARMER = ^NET_DVR_ALARMER;
NET_DVR_ALARMER=Record
byUserIDValid: Byte;
bySerialValid: Byte;
byVersionValid: Byte;
byDeviceNameValid: Byte;
byMacAddrValid: Byte;
byLinkPortValid: Byte;
byDeviceIPValid: Byte;
bySocketIPValid: Byte;
lUserID: LongInt;
sSerialNumber: Array [0..SERIALNO_LEN-1] of Byte;
dwDeviceVersion: LongInt;
sDeviceName: Array [0..NAME_LEN - 1] of char;
byMacAddr: Array [0..SERIALNO_LEN-1] of Byte;
wLinkPort: Word;
sDeviceIP: Array [0..127] of Char;
sSocketIP: Array [0..127] of Char;
byIpProtocol: Byte;
byRes2: Array [0..10] of Byte;
end;type
LPNET_DVR_ALARMINFO = ^NET_DVR_ALARMINFO;
NET_DVR_ALARMINFO = record
dwAlarmType: LongInt;
dwAlarmInputNumber: LongInt;
dwAlarmOutputNumber: Array [0..MAX_ALARMOUT - 1] of LongInt;
dwAlarmRelateChannel: Array [0..MAX_CHANNUM - 1] of LongInt;
dwChannel: Array [0..MAX_CHANNUM - 1] of LongInt;
dwDiskNumber: Array [0..MAX_DISKNUM - 1] of LongInt;
end;...
---UHCNetSdkDll--- 单元
type
TMessageCallback = procedure(lCommand:longint;pAlarmer:LPNET_DVR_ALARMER;pAlarmInfo:Pchar;dwBufLen:LongInt;pUser:pointer);
procedure NET_DVR_SetDVRMessageCallBack_V30(msgCallback:TMessageCallback;lUserID:pointer);stdcall;external 'HCNetSDK.dll';---UTest---单元var
Form1: TForm1;
procedure MessageCallBak(lCommand:longint;pAlarmer:LPNET_DVR_ALARMER;pAlarmInfo:Pchar;dwBufLen:LongInt;pUser:pointer);
implementation{$R *.dfm}procedure MessageCallBak(lCommand:longint;pAlarmer:LPNET_DVR_ALARMER;pAlarmInfo:Pchar;dwBufLen:LongInt;pUser:pointer);
var
I :Integer;
//struAlarmInfo: NET_DVR_ALARMINFO;
begin
showMessage(IntToStr(lCommand));
end;
...type
LPNET_DVR_ALARMER = ^NET_DVR_ALARMER;
NET_DVR_ALARMER=Record
byUserIDValid: Byte;
bySerialValid: Byte;
byVersionValid: Byte;
byDeviceNameValid: Byte;
byMacAddrValid: Byte;
byLinkPortValid: Byte;
byDeviceIPValid: Byte;
bySocketIPValid: Byte;
lUserID: LongInt;
sSerialNumber: Array [0..SERIALNO_LEN-1] of Byte;
dwDeviceVersion: LongInt;
sDeviceName: Array [0..NAME_LEN - 1] of char;
byMacAddr: Array [0..SERIALNO_LEN-1] of Byte;
wLinkPort: Word;
sDeviceIP: Array [0..127] of Char;
sSocketIP: Array [0..127] of Char;
byIpProtocol: Byte;
byRes2: Array [0..10] of Byte;
end;type
LPNET_DVR_ALARMINFO = ^NET_DVR_ALARMINFO;
NET_DVR_ALARMINFO = record
dwAlarmType: LongInt;
dwAlarmInputNumber: LongInt;
dwAlarmOutputNumber: Array [0..MAX_ALARMOUT - 1] of LongInt;
dwAlarmRelateChannel: Array [0..MAX_CHANNUM - 1] of LongInt;
dwChannel: Array [0..MAX_CHANNUM - 1] of LongInt;
dwDiskNumber: Array [0..MAX_DISKNUM - 1] of LongInt;
end;...
---UHCNetSdkDll--- 单元
type
TMessageCallback = procedure(lCommand:longint;pAlarmer:LPNET_DVR_ALARMER;pAlarmInfo:Pchar;dwBufLen:LongInt;pUser:pointer);
procedure NET_DVR_SetDVRMessageCallBack_V30(msgCallback:TMessageCallback;lUserID:pointer);stdcall;external 'HCNetSDK.dll';---UTest---单元var
Form1: TForm1;
procedure MessageCallBak(lCommand:longint;pAlarmer:LPNET_DVR_ALARMER;pAlarmInfo:Pchar;dwBufLen:LongInt;pUser:pointer);
implementation{$R *.dfm}procedure MessageCallBak(lCommand:longint;pAlarmer:LPNET_DVR_ALARMER;pAlarmInfo:Pchar;dwBufLen:LongInt;pUser:pointer);
var
I :Integer;
//struAlarmInfo: NET_DVR_ALARMINFO;
begin
showMessage(IntToStr(lCommand));
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货