## Presentation Device Driver Reference for OS/2

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

### GreDeviceQueryFonts - Parameters

hdc (HDC) - input Device context handle.

flOptions (ULONG) - input Option flags.

The only valid flag for this function is:

QF_PUBLIC When this flag is set, the handling routine must return all device fonts. "Device fonts" are public fonts and they are returned in the array addressed by pfmMetrics. If this flag is not set, the handling routine should not return any fonts.

pszFaceName (PSZ) - input Pointer to FaceName to match.

If this is a NULL pointer, all faces are matched.

pfmMetrics (PFONTMETRICS) - input Pointer to array of FONTMETRICS structures.

cMetrics (LONG) - input Number of bytes of each metrics structure in the metrics array.

pcFonts (PLONG) - input Pointer to the number of fonts requested.

This is a pointer to the number of fonts requested. On completion, the handling routine modifies the value indicated to the number of fonts returned. An application can determine the number of public fonts available to it by passing a value of 0 at the address indicated by this pointer.

pInstance (PVOID) - input Pointer to instance data.

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

rc (LONG) - returns Return Codes.

The handling routine should return the number of fonts not returned or else return GPI_ALTERROR if an error occurred.

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

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