## Presentation Device Driver Reference for OS/2

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

### GreDeviceSetAttributes - Parameters

hdc (HDC) - input Device context handle.

lBType (LONG) - input Bundle type.

Device attribute bundle. The following device bundles are defined:

PRIM_AREA Area (Pattern) attribute bundle see Area (Pattern) Attributes.
PRIM_CHAR Character attribute bundle see Character Attributes.
PRIM_IMAGE Image attribute bundle see Image Attributes.
PRIM_LINE Line attribute bundle (see Line Attributes.
PRIM_MARKER Marker attribute bundle see Marker Attributes.

All device bundles share a similar format. They consist of two bundles, a bundle of logical attributes and a bundle of device information.

flDefsMask (ULONG) - input Mask indicating the attributes to be set to their standard default values.

flAttrsMask (ULONG) - input Mask indicating the attributes to be modified.

pAttrs (PBUNDLE) - input Pointer to a bundle structure.

Pointer to the DLINEBUNDLE, DCHARBUNDLE, DMARKERBUNDLE, DAREABUNDLE, or DIMAGEBUNDLE structure containing the new attributes.

pInstance (PVOID) - input Pointer to instance data.

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

rc (BOOL) - returns Return Codes.

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_HUGE_FONTS_NOT_SUPPORTED
PMERR_INSUFFICIENT_MEMORY
PMERR_INV_BACKGROUND_COL_ATTR
PMERR_INV_BACKGROUND_MIX_ATTR
PMERR_INV_CHAR_DIRECTION_ATTR
PMERR_INV_CHAR_MODE_ATTR
PMERR_INV_CODEPAGE
PMERR_INV_COLOR_ATTR
PMERR_INV_COORD_SPACE
PMERR_INV_HDC
PMERR_INV_LENGTH_OR_COUNT
PMERR_INV_LINE_TYPE_ATTR
PMERR_INV_MIX_ATTR
PMERR_INV_PATTERN_REF_PT_ATTR
PMERR_INV_PATTERN_SET_ATTR
PMERR_INV_PATTERN_SET_FONT

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