NET_DVR_UploadFile_V40

Upload file.

API Definition

LONG NET_DVR_UploadFile_V40(
  LONG      lUserID,
  DWORD     dwUploadType,
  LPVOID    lpInBuffer,
  DWORD     dwInBufferSize,
  char      *sFileName,
  LPVOID    lpOutBuffer,
  DWORD     dwOutBufferSize
);

Parameters

lUserID

[IN] Value returned by NET_DVR_Login_V40.

dwUploadType

[IN] Uploading commands, which specify the file type to upload, see details in the enumeration NET_SDK_UPLOAD_TYPE.

lpInBuffer

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

dwInBufferSize

[IN] Input buffer size.

sFileName

[IN] Name of the file to be uploaded. For the complete file path (including the file name), the maximum size is 128 bytes, and the maximum size of the file name is 32 bytes.

lpOutBuffer

[OUT] Output parameters, which are different according to different uploading commands.

dwOutBufferSize

[OUT] Output buffer size.

Return Values

Return -1 for failure, and return other values as the parameter of NET_DVR_UploadClose and NET_DVR_GetUploadState.

If -1 is returned, you can call NET_DVR_GetLastError to get the error code.