## Presentation Device Driver Reference for OS/2

[prev][next][parent][TOC]

### GreQueryColorData - Parameters

hdc (HDC) - input Device context handle.

cArray (LONG) - input Number of elements supplied in Array.

pArray (PLONG) - input Pointer to Array.

On return, this array contains:

lArray[QCD_LCT_FORMAT] Format of loaded color table (if any):

LCOLF_DEFAULT Default color table is in force.

LCOLF_INDRGB Color table loaded, which provides translation from index to RGB.

LCOLF_RGB Color index = RGB.

LCOLF_PALETTE DC has a palette selected.

lArray[QCD_LCT_LOINDEX] Smallest color index loaded (always 0).

lArray[QCD_LCT_HIINDEX] Largest color index loaded (never less than 15).

Information is only returned for the number of elements supplied. Any extra elements supplied must be zeroed by the handling routine.

pInstance (PVOID) - input Pointer to instance data.

lFunction (ULONG) - input High-order WORD=flags; low-order WORD= NGreQueryColorData.

rc (BOOL) - returns Return Code.

On completion, the handling routine must return a BOOLEAN value to indicate success or an error.

TRUE Successful
FALSE Error

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_DEV_FUNC_NOT_INSTALLED
PMERR_INV_HDC
PMERR_INV_LENGTH_OR_COUNT

Refer to the "Error Explanations" section in the Presentation Manager Programming Reference for further explanation.