VC_SetOverlayRect

BOOL
VC_SetOverlayRect(
   VCUSER_HANDLE
vh,
   POVERLAY_RECTS
pOR
  
);

The VC_SetOverlayRect function requests a kernel-mode video capture driver to set the overlay region of an output display.

Parameters

vh

Handle to the kernel-mode driver, obtained from VC_OpenDevice.

pOR

Pointer to an OVERLAY_RECTS structure describing one or more overlay rectangles, using screen coordinates.

Return Value

Returns TRUE if the operation succeeds. Otherwise, returns FALSE.

Comments

User-mode drivers using VCUser.lib typically call the VC_SetOverlayRect function when a client sends the DVM_DST_RECT message for the VIDEO_EXTERNALOUT channel. The function specifies the portion of the display device to use as an overlay area.

If the OVERLAY_RECTS structure contains a single rectangle, the rectangle defines the overlay region. If the structure contains more than one rectangle, the first rectangle defines the bounding rectangle for the overlay region, and additional rectangles represent parts of the overlay region. All rectangles are specified using screen coordinates.

The driver should specify complex (multiple) rectangles only if the kernel-mode driver returns the VCO_COMPLEX_RECT flag when the VC_GetOverlayMode function is called. The sample video capture drivers do not accept complex rectangle specifications.

The VC_SetOverlayRect function calls DeviceIoControl (described in the Win32 SDK) to send an IOCTL_VIDC_OVERLAY_RECTS control code to the specified kernel-mode driver. When a kernel-mode driver using VCKernel.lib receives this control code, its SetOverlayRectsFunc function is called.