public DateTime GetSystemTimeEx() { HikPlayerDefine.PLAYM4_SYSTEM_TIME sysTime = new HikPlayerDefine.PLAYM4_SYSTEM_TIME(); if (_invoker.GetSystemTime(_port, ref sysTime)) { try { return(new DateTime(sysTime.dwYear, sysTime.dwMon, sysTime.dwDay, sysTime.dwHour, sysTime.dwMin, sysTime.dwSec, sysTime.dwMs)); } catch { } } return(DateTime.MinValue); }
private static extern int PlayM4_GetSystemTime(int nPort, ref HikPlayerDefine.PLAYM4_SYSTEM_TIME pstSystemTime);
public bool GetSystemTime(int nPort, ref HikPlayerDefine.PLAYM4_SYSTEM_TIME sysTime) { return(PlayM4_GetSystemTime(nPort, ref sysTime) != 0); }