Home > Back-end >  Help: please send the C language to Delphi
Help: please send the C language to Delphi

Time:09-25


Key the sizeof (NET_DVR_TIME) don't know how to turn,

NET_DVR_SetDVRConfig (lLoginID NET_DVR_SET_TIMECFG, 0, & amp; CurTime, sizeof (NET_DVR_TIME));
In the Delphi runtime, can have the following error.
parameter errors, the SDK in the interface into the input or output parameter is null,


C program following
Typedef struct
{
DWORD dwYear;
DWORD dwMonth;
DWORD dwDay;
DWORD dwHour;
DWORD dwMinute;
DWORD dwSecond;
} NET_DVR_TIME, * LPNET_DVR_TIME;

Void CDlgCheckTime: : OnButtonCheckTime ()
{
The UpdateData (TRUE);
NET_DVR_TIME CurTime;
CurTime. DwYear=m_checkDate. GetYear ();
CurTime. DwMonth=m_checkDate. GetMonth ();
CurTime. DwDay=m_checkDate. GetDay ();
CurTime. DwHour=m_checkTime. GetHour ();
CurTime. DwMinute=m_checkTime. GetMinute ();
CurTime. DwSecond=m_checkTime. GetSecond ();
LONG lLoginID=g_pMainDlg - & gt; M_struDeviceInfo. LLoginID;
NET_DVR_SetDVRConfig (lLoginID NET_DVR_SET_TIMECFG, 0, & amp; CurTime, sizeof (NET_DVR_TIME));

}

CodePudding user response:

Delphi such
NET_DVR_SET_TIMECFG NET_DVR_SetDVRConfig (0, 1, @ CurTime, sizeof (CurTime));

The function NET_DVR_SetDVRConfig (lUserID: LongInt;
DwCommand: LongInt;
LChannel: LongInt;
LpInBuffer: Pointer;
DwInBufferSize: LongInt) : BOOL; Stdcall; External 'HCNetSDK. DLL'

CodePudding user response:

Delphi is the same with sizeof
  • Related