SetKeyRGBFunc

BOOLEAN
SetKeyRGBFunc(
PDEVICE_INFO
pDevInfo,
PRGBQUAD pRGB
);

The SetKeyRGBFunc function sets the overlay destination image's key color to the specified RGB color. The function is provided by the kernel-mode driver, and the SetKeyRGBFunc name is a placeholder for a driver-specified function name.

Parameters

pDevInfo

Pointer to the DEVICE_INFO structure returned by VC_Init.

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. If FALSE, VCKernel.lib sets the Win32 error code value to STATUS_DEVICE_CONFIGURATION_ERROR.

Comments

The VCKernel.lib library calls a kernel-mode driver's SetKeyRGBFunc function when the driver receives an IOCTL_VIDC_SET_KEY_PALIDX control code. User-mode drivers using VCUser.lib send this control code by calling VC_SetKeyColourRGB.

You can assume that the drivers SetKeyRGBFunc function will be called only if a previous call to its GetOverlayModeFunc function has returned with both the VCO_KEYCOLOUR and VCO_KEYCOLOUR_RGB flags set.

Support for a SetKeyRGBFunc function is required, if the device supports a modifiable key color. If a driver does support the function, it must place its address in the VC_CALLBACK structure supplied by VCKernel.lib. If a driver that does not provide a SetKeyRGBFunc function receives an IOCTL_VIDC_SET_KEY_RGB control code, VCKernel.lib sets the Win32 error code value to STATUS_INVALID_DEVICE_REQUEST.

See Also

GetKeyColourFunc, SetKeyPalIdxFunc