## Presentation Device Driver Reference for OS/2

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

### OS2_PM_DRV_DEVICENAMES - Remarks

Applications such as the Presentation Manager Print Object call DevQueryDeviceNames to determine the device names and descriptions and the data types that the presentation driver supports. Hardcopy drivers must contain a handling routine for OS2_PM_DRV_DEVICENAMES.

Applications usually call this function twice. First, it is called with a NULL value for cNames and cDataTypes to query the number of names and data types. Second, after allocating the arrays, the application calls this function with valid values to get the data. If the value of cNames is NULL at the location addressed by pcNames, the handling routine must update cNames to the actual count of names. If cNames has a valid value, the routine must write device names and device descriptions into the arrays addressed by paDeviceName and paDeviceDesc. Similarly, for cDataTypes, the handling routine either writes a valid value into cDataTypes or writes data -type names into the array addressed by paDataType. Notice that when writing to an array, the routine does not write past the end of the array as defined by the associated count.