NET_DVR_StartDownload

Start downloading files

API Definition

LONG NET_DVR_StartDownload(
  LONG          lUserID,
  DWORD         dwDownloadType,
  LPVOID        lpInBuffer,
  DWORD         dwInBufferSize,
  char const    *sFileName
);

Parameters

lUserID

[IN] Value returned by NET_DVR_Login_V40.

dwDownloadType

[IN] Downloading commands which specify the file type to download, see details in the enumeration NET_SDK_DOWNLOAD_TYPE.

lpInBuffer

[IN] Input parameters, which are different according to different downloading commands.

dwInBufferSize

[IN] Input buffer size.

sFileName

[IN] Path for saving downloaded files (absolute path, includes file name).

Return Values

Returns -1 for failure, and returns other values as the parameters of NET_DVR_StopDownload and NET_DVR_GetDownloadState.

If returning failed, you can call NET_DVR_GetLastError to get the error code.