hdc (HDC) - input
ppalinfo (PPALETTEINFO) - input
Pointer to table of palette data from GreCreatePalette. The structure of palinfo is as follows:
struct _PALETTEINFO { /* palinfo */ ULONG flCmd; /* Options from create */ ULONG ulFormat; /* Specifies format of entries at create */ /* Must be LCOLF-CONSECRGB */ ULONG clColorData; /* Count of Palette entries */ RGB2 argb[0]; /* Palette entries */ } PALETTEINFO; Additional RGB@ entries follow so that CLColorData-1 entries are defined.
hdevpal (ULONG) - input
If hdevpal=0, ppalinfo points to a palette information structure, which must be set into a new palette. The handle for this new palette is returned in hdevpal. The new palette is then selected into the DC.
If hdevpal is nonzero, ppalinfo is ignored, the palette is selected into the DC, and hdevpal is a device palette handle previously returned by the presentation driver. In this case, hdevpal is used to bind the palette with the new DC. This technique is the driver-level mechanism for sharing palettes among contexts on the same device.
pInstance (PVOID) - input
lFunction (ULONG) - input
rc (ULONG) - returns
On completion, this function returns the handle to the device palette (hdevpal).
Possible Errors Detected: When an error is detected, the handling routine must call WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include:
PMERR_INV_IN_AREA PMERR_INV_IN_PATH