RtgvEnumerateCameras

RtgvEnumerateCameras enumerates the discovered cameras on the network.

Syntax

Copy
BOOL RtgvEnumerateCameras(
     [out]       PRTGV_CAMERA_INFO pCameraInfo, 
     [in, out]   DWORD NumElements,
     [out]       PDWORD pNumElementsNeeded,
     [in]        UINT32 localIP,
     [in]        UINT32 localPort,
     [in]        UINT32 msTimeout
 ); RtgvEnumerateCamerasA, RtgvEnumerateCamerasW

Parameters

[out] pCameraInfo

An array that receives the list of RTGV_CAMERA_INFO objects. If this is NULL, the value pointed to by pNumElementsNeeded is set to the number needed.

[in, out] pNumElements

A value that specifies the number of elements in the array pointed to by pCameraInfo.  If this number is not high enough, pNumElementsNeeded is set to the number of elements needed, and the last error is set to ERROR_INSUFFICIENT_BUFFER.

[out] pNumElementsNeeded

A pointer to a DWORD that, upon success of this function, receives the number of cameras returned by the function. This can then be used to parse through the elements of pCameraInfo.

[in] localIP

The local IPv4 IP used to discover cameras.

[in] localPort

The local port used to discover cameras.

[in] msTimeout

The time to wait for a response from the camera(s) on the network. The default timeout is 2000.

Return Values

If the function succeeds, it returns TRUE. If the function fails, it returns FALSE. Call GetLastError to obtain an error code.

Remarks

This function will fail if it is called before RtgvInitialize.

This function should be called to select the camera you wish to use.

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

RtgvApi.h

RtgvApi.lib

See Also: