## Presentation Device Driver Reference for OS/2

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

### OS2_PM_DRV_ENABLE: Subfunction 01h - FillLogicalDeviceBlock - Parameters

ulSubfunction (ULONG) - input 01h.

pParam1 (PULONG) - input A pointer to the following structure:

ulVersion Version number in binary coded decimal (BCD) of the graphic engine.

cTableSize The number of entries in the dispatch table. The presentation driver should not replace pointers past the end of the table.

pParam2 (PLONG) - input A pointer to the following structure:

pfsFlags Pointer to a WORD of logical device flags. Flag bits 0 and 2 apply to the presentation driver and are set ON or OFF, as appropriate, by the presentation driver. All other flags are reserved for system use and must not be modified.

Bit 0 Set ON if each device context for this presentation driver requires its own physical device block. Even if the presentation driver sets this bit off, the FillPhysicalDeviceBlock subfunction can still be called more than once (although no work may need to be done after FillPhysicalDeviceBlock is called the first time).

Bit 2 Set ON if the szDeviceName and pszDriverName fields of a DevOpenDC call for this device are ignored. Setting Bit 2 ON indicates that the presentation driver supports only one physical device in one configuration, for example, the display driver. Hardcopy drivers do not set this bit unless the hardcopy driver supports only one physical device in one configuration.

Bit 7 This is a new bit in OS/2 2.1, Graphics Engine Version 0x202 or later . Setting Bit 7 ON indicates that the presentation driver may update the dispatch table in FillPhysicalDeviceBlock. Do this if your driver supports more than one type of device and you want to hook different functions based on the device type.

pDispatchTable (PLONG) - input A pointer to the presentation driver's copy of the dispatch table. This table is an array of 32-bit pointers to system- default function- handling routines. The low-order byte of a function number identifies the offset to the relevant pointer.

rc (LONG) - returns Return codes.

The handling routine should return a LONG integer. Valid values are:

0 Successful
-1 Error