NET_DVR_SetDeviceConfig

Set device parameters in batch (sending data is supported).

API Definition

BOOL NET_DVR_SetDeviceConfig(
  LONG      lUserID,
  DWORD     dwCommand,
  DWORD     dwCount,
  LPVOID    lpInBuffer,
  DWORD     dwInBufferSize,
  LPVOID    lpStatusList,
  LPVOID    lpInParamBuffer,
  DWORD     dwInParamBufferSize
);

Parameters

lUserID

[IN] Value returned by NET_DVR_Login_V40.

dwCommand

[IN] Device configuration commands, which are different according to different configurations.

dwCount

[IN] Number of cameras to be set at a time. 0,1-one camera, 2-two cameras, 3-three cameras, and so on. Up to 256 cameras can be configured at a time.

lpInBuffer

[IN] Pointer of configuration condition buffer, e.g., stream ID, which specifies the number (dwCount) of cameras to set, and relates to the configuration commands.

dwInBufferSize

[IN] Size of configuration condition buffer, which saves the configured information of cameras with the number of dwCount.

lpStatusList

[OUT] Error information list, and its memory is allocated by user, each error information contains 4 bytes (a unsigned 32-bit integer).

There is a one-to-one correspondence between the errors in the list and the cameras that need to be searched, e.g., lpStatusList[2] corresponds to lpInBuffer[2].

If the parameter value is 0, it refers to setting succeeded, otherwise, this parameter value is the error code.

lpInParamBuffer

[IN] Device parameters to set, which relates to the configuration commands. And there is a one-to-one correspondence between the parameters and the cameras that need to be searched.

dwInParamBufferSize

[IN] Set the size of content buffer.

Return Values

Returns TRUE for success, and returns FALSE for all failed. If returns TRUE, it does not indicate that all settings are succeeded, you can get the value of lpStatusList[n] to check which one is succeeded.

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