The DrvIcmSetDeviceGammaRamp function sets the hardware gamma ramp of the specified display device.
BOOL
DrvIcmSetDeviceGammaRamp(
IN DHPDEV dhpdev,
IN ULONG iFormat,
IN LPVOID lpRamp
);
When iFormat is IGRF_RGB_256WORDS, lpRamp points to a GAMMARAMP structure that defines the 256-entry ramps to be set for each of the red, blue, and green color channels. Each value is described using 16-bit precision. If the hardware has fewer bits of precision, it should downshift and use the most significant bits, without rounding.
DrvIcmSetDeviceGammaRamp returns TRUE upon success. Otherwise, it returns FALSE.
Declared in winddi.h. Include winddi.h.
Drivers for display devices with loadable hardware gamma ramps should implement this function.
DrvIcmSetDeviceGammaRamp should fail if it is called with any other value besides IGRF_RGB_256WORDS in iFormat.
The driver hooks this function by setting the GCAPS2_CHANGEGAMMARAMP flag in the flGraphicsCaps2 field of the DEVINFO structure passed to DrvEnablePDEV. If the driver is running in a palettized 8bpp mode, this capability is optional.