VC_SetKeyColourRGB

BOOL
VC_SetKeyColourRGB(
    VCUSER_HANDLE
vh,
    PRGBQUAD
pRGB
   
);

The VC_SetKeyColourRGB function requests a kernel-mode video capture driver to set the overlay destination image’s key color to a specified RGB color.

Parameters
vh
Handle to the kernel-mode driver, obtained from VC_OpenDevice.
pRGB
Pointer to an RGBQUAD structure containing an RGB color specification. (The RGBQUAD structure is described in the Win32 SDK.)
Return Value

Returns TRUE if the operation succeeds. Otherwise returns FALSE.

Comments

Before setting the key color, the driver should call VC_GetOverlayMode and test the VCO_KEYCOLOUR_FIXED flag to determine if the key color can be set. If the color can be set, the driver should test the VCO_KEYCOLOUR_RGB flag to determine if, based on the current data format, the kernel-mode driver stores the key color as an RGB color or as a palette index number. If the key color is stored as an RGB color, the driver should call VC_SetKeyColourRGB to set it. If the key color is stored as a palette index, the driver should call VC_SetKeyColourPalIdx to set it.

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

See Also

VC_GetKeyColour, VC_SetKeyColourPalIdx