## Presentation Device Driver Reference for OS/2

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

### GreQueryCharPositions - Parameters

hdc (HDC) - input Device context handle.

pptlStart (PPOINTL) - input Pointer to (X,Y) coordinates of optional starting position.

flOptions (ULONG) - input Options flags.

The following flags can be set:

CHS_VECTOR If set, increment vector is present.
CHS_START_XY If set, starting position is present. Otherwise, pptlStart is ignored.

cChars (LONG) - input Number of bytes in string.

pchString (PCH) - input Pointer to character string.

pAdx (PLONG) - input Pointer to Increment array.

Vector of increment values with one element for each character in the string. After writing a character, the increment specifies the absolute distance in world coordinates to get to the starting point of the next character.

paptXY (PPOINTL) - input Pointer to array where character positions are returned.

Pointer to an array of (cChars+1) returned positions. The first value in the array is the initial current position; the last value is the current position on return.

pInstance (PVOID) - input Pointer to instance data.

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

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_COORDINATE_OVERFLOW
PMERR_DEV_FUNC_NOT_INSTALLED
PMERR_EXCEEDS_MAX_SEG_LENGTH
PMERR_HDC_BUSY
PMERR_INSUFFICIENT_MEMORY
PMERR_INV_CHAR_ANGLE_ATTR
PMERR_INV_CHAR_MODE_ATTR
PMERR_INV_CHAR_POS_OPTIONS
PMERR_INV_CODEPAGE
PMERR_INV_COORD_SPACE
PMERR_INV_HDC
PMERR_INV_LENGTH_OR_COUNT
PMERR_INV_MATRIX_ELEMENT
PMERR_INV_SETID
PMERR_INV_TRANSFORM_TYPE

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