GreQueryNumberSetIds

GreQueryNumberSetIds returns the total number of lcids, such as logical fonts and bit-map IDs, that have been created.

This function is supported by the graphics engine.

Syntax
GreQueryNumberSetIds(hdc, lRange, pInstance, lFunction);

Parameters

 * hdc (HDC) - input : Device context handle.


 * lRange (ULONG) - input : Indicates whether GPI, or AVIO lcids, or both are to be returned.


 * Valid ranges are:
 * LCID_RANGE_GPI GPI
 * LCID_RANGE_AVIO AVIO
 * LCID_RANGE_BOTH GPI and AVIO


 * pInstance (PVOID) - input : Pointer to instance data.


 * lFunction (ULONG) - input : High-order WORD=flags; low-order WORD=NGreQueryNumberSetIds.

Returns

 * fSuccess (LONG) - returns : Return codes.

This function returns the number of lcids, or it returns GPI_ALTERROR if an error occurs.

Possible Errors Detected:  When an error is detected, the graphics engine calls WinSetErrorInfo to post the condition. Reasons for failure of this function include:


 * PMERR_HDC_BUSY
 * PMERR_INV_HDC
 * PMERR_INV_SETID
 * PMERR_INV_SETID_TYPE

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

Sample

 * 1) define INCL_GRE_SETID
 * 2) include 

HDC     hdc;        /*  Device context handle. */ ULONG   lRange;     /*  Indicates whether GPI, or AVIO lcids, or both are to be returned. */ PVOID   pInstance;  /*  Pointer to instance data. */ ULONG   lFunction;  /*  High-order WORD=flags; low-order WORD=NGreQueryNumberSetIds. */ LONG    fSuccess;   /*  Return codes. */

fSuccess = GreQueryNumberSetIds(hdc, lRange,            pInstance, lFunction);