public void StartDownloadByTime() { DoCallBack = new ReplayCallBackDelegate(DoCallBackFunction); int iRet = NVSSDK.NetClient_NetFileDownloadByTimeSpanEx(ref m_ulConnID, m_ClientInfo.m_iServerID, null, m_iRealChannel, ref m_begintime, ref m_endtime, 0, -1, 2); if (iRet < 0) { if (m_ulConnID != -1) { NVSSDK.NetClient_NetFileStopDownloadFile(m_ulConnID); m_ulConnID = 0; } return; } else { IntPtr tmep = IntPtr.Zero; iRet = NVSSDK.NetClient_SetNetFileDownloadFileCallBack(m_ulConnID, DoCallBack, tmep); } }
public void StartDownloadByFile() { DoCallBack = new ReplayCallBackDelegate(DoCallBackFunction); int iRet = NVSSDK.NetClient_NetFileDownloadFile(ref m_ulConnID, m_ClientInfo.m_iServerID, m_szFileName.ToString(), "", 0, -1, 2); if (iRet >= 0) { IntPtr temp = IntPtr.Zero; int irt = NVSSDK.NetClient_SetNetFileDownloadFileCallBack(m_ulConnID, DoCallBack, temp); } else { //if (m_ulConnID != -1) // INVALID_ID) { NVSSDK.NetClient_NetFileStopDownloadFile(m_ulConnID); //m_ulConnID = -1; } } }