## Presentation Device Driver Reference for OS/2

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

### GreQueryFonts - Parameters

hdc (HDC) - input Device context handle.

flOptions (ULONG) - input Flags indicating whether private fonts, public fonts, or both are required.

These flags can be used in combination:

QFF_PUBLIC Enumerate public fonts
QFF_PRIVATE Enumerate private fonts

pszFaceName (PSZ) - input Pointer to a string specifying the face name.

When this is NULL, all faces are matched.

paMetrics (PFONTMETRICS) - input Pointer to an array of font element records to which the metrics of matching fonts are returned. This is a pointer to an array of up to cFontCount font metric records, each of which contains a maximum of cMetricLen bytes. Note that for multi-codepage fonts the usCodePage field has no meaning and is set to 0.

cMetricLen (ULONG) - input Length in bytes of each metrics structure in the paMetrics array.

pcFontCount (PULONG) - input Pointer to cFontCount that specifies the number of fonts for which metrics are required. On return, this is updated to the number of fonts for which metrics were returned.

pInstance (PVOID) - input Pointer to instance data.

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

rc (LONG) - returns Return codes.

This function returns the number of fonts not returned, 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_COORDINATE_OVERFLOW
PMERR_DEV_FUNC_NOT_INSTALLED
PMERR_HDC_BUSY
PMERR_INV_COORD_SPACE
PMERR_INV_HDC
PMERR_INV_LENGTH_OR_COUNT
PMERR_INV_OR_INCOMPAT_OPTIONS

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