COLORREF ColorInfo(
LPPDEVICE lpDestDev,
DWORD dwColorin,
LPPCOLOR lpPColor
);
Converts a logical color (an RGB value) to a physical color (a physical color value) or converts a physical to a logical color, depending on the value of the lpPColor parameter.
Every graphics device driver must export a ColorInfo function.
The export ordinal for this function is 2.
When converting a logical color, ColorInfo chooses the best possible physical color to match the logical color and returns the RGB color value that corresponds to this physical color.
GDI uses the physical colors returned by ColorInfo to set text colors, background colors, and pixel colors using the Pixel function.
If dwColorin is a logical color, it may specify either an RGB value or a color index. If dwColorin specifies a color index (high-order byte is 0xFF), ColorInfo should return the index without carrying out a conversion. If dwColorin is a physical color, ColorInfo should return an RGB value only for static colors and return color indices for all other colors. If GDI receives a color index from ColorInfo, it uses other functions to determine the corresponding logical color.
PDEVICE, PBITMAP