求助:请把C语言转成delphi的
关键这句sizeof(NET_DVR_TIME) 不知道怎么转,
NET_DVR_SetDVRConfig(lLoginID, NET_DVR_SET_TIMECFG, 0, &CurTime, sizeof(NET_DVR_TIME));
在delphi中运行时,会有如下错误.
参数错误。SDK接口中给入的输入或输出参数为空。
C程序如下
typedef struct
{
DWORD dwYear;
DWORD dwMonth;
DWORD dwDay;
DWORD dwHour;
DWORD dwMinute;
DWORD dwSecond;
}NET_DVR_TIME, *LPNET_DVR_TIME;
void CDlgCheckTime::OnButtonCheckTime()
{
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->m_struDeviceInfo.lLoginID;
NET_DVR_SetDVRConfig(lLoginID, NET_DVR_SET_TIMECFG, 0, &CurTime, sizeof(NET_DVR_TIME));
}