NET_DVR_GetDeviceConfig

Get device configuration information in batch (with sending data).

API Definition

BOOL NET_DVR_GetDeviceConfig(
  LONG      lUserID,
  DWORD     dwCommand,
  DWORD     dwCount,
  LPVOID    lpInBuffer,
  DWORD     dwInBufferSize,
  LPVOID    lpStatusList,
  LPVOID    lpOutBuffer,
  DWORD     dwOutBufferSize
);

Parameters

lUserID

[IN] Value returned by NET_DVR_Login_V40.

dwCommand

[IN] Device getting commands. The commands are different for different getting functions.

dwCount

[IN] Number of configurations (cameras) to get at a time. 0, 1-one camera, 2-two cameras, 3-three cameras, and so on. Up to 64 cameras' configuration information can be obtained at a time.

lpInBuffer

[IN] Pointer of configuration condition buffer, which specifies the number (dwCount) of configurations to get, and relates to the getting commands.

dwInBufferSize

[IN] Size of configuration condition buffer, which saves the obtained configuration information (the number is 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 need to search, e.g., lpStatusList[2] corresponds to lpInBuffer[2].

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

lpOutBuffer

[OUT] Parameters returned by device, which relates to the getting commands. And there is a one-to-one correspondence between the parameters and the cameras need to search.

If the lpStatusList of one camera is larger than 1, the corresponding lpOutBuffer is invalid.

dwOutBufferSize

[IN] Total size of returned results (the number is dwCount).

Return Values

Returns TRUE for success, and returns FALSE for failure. If returns TRUE, it does not mean that all configurations are obtained, you can check the value of lpStatusList[n] to judge which one is succeeded.

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