## EnumVideoCallback

The EnumVideoCallback is an application-defined callback procedure for the IDDVideoPortContainer::EnumVideoPorts method.

HRESULT WINAPI EnumVideoCallback(

LPDDVIDEOPORTCAPS lpDDVideoPortCaps,

LPVOID lpContext

);

##### Parameters

lpDDVideoPortCaps
  Pointer to the DDVIDEOPORTCAPS structure that contains the video port information, including the ID and capabilities. This data is read-only.
lpContext
  Pointer to a caller-defined structure that is passed to the member every time it is called.

##### Return Values

The callback function returns DDENUMRET_OK to continue the enumeration.

The callback function returns DDENUMRET_CANCEL to stop it.

##### Remarks

Video-port related functions cannot be called from inside the EnumVideoCallback function. Attempts to do so will fail, returning DDERR_CURRENTLYNOTAVAIL.

You can use the LPDDENUMVIDEOCALLBACK data type to declare a variable that can contain a pointer to this callback function.