Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
DevQueryDeviceNames (1.2)
◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_DEV
BOOL DevQueryDeviceNames(hab, pszDriverName, pdn, achDeviceName,
achDeviceDesc, pdt, achDataType)
HAB hab; /* anchor-block handle */
PSZ pszDriverName; /* pointer to string for device driver name */
PLONG pdn; /* maximum number of device names */
PSTR32 achDeviceName; /* pointer to array of device names */
PSTR64 achDeviceDesc; /* pointer to array of device descriptions */
PLONG pdt; /* maximum number of data types */
PSTR16 achDataType; /* pointer to array of data types */
The DevQueryDeviceNames function returns the device names, descriptions, and
data types supported by the specified device driver.
The application can call the function first with the pdn and pdt parameters
set to zero in order to find how much storage is needed for the data
buffers. Having allocated the storage, the application then calls the
function a second time in order to have the buffers filled with data for the
data to be filled in.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hab Identifies the anchor block.
pszDriverName Points to the null-terminated string that contains the name
of the device driver.
pdn Points to the maximum number of device names and descriptions
that can be returned. If this parameter is zero, the number
of device names and descriptions supported is returned and
the arrays pointed to by the achDeviceName and achDeviceDesc
parameters are not updated. If this parameter is nonzero,
then its value is updated to the number returned in the
arrays pointed to by achDeviceName and achDeviceDesc and the
arrays are updated.
achDeviceName Points to an array of null-terminated ASCII strings, each
element of which identifies a particular device (for example,
model number). Valid names are defined by device drivers.
IBM4201 is an example of a device name.
achDeviceDesc Points to an array of null-terminated ASCII strings, each
element of which is a description of a particular device (for
example, model name). Valid names are defined by device
drivers. IBM 4201 Proprinter is an example of a device
description.
pdt Points to the maximum number of data types that can be
returned. If this parameter is zero, the number of data types
supported is returned and the array pointed to by the
achDataType parameter is not updated. If this parameter is
nonzero, then its value is updated to the number returned,
and the array is updated.
achDataType Points to an array of null-terminated ASCII strings, each
element of which identifies a data type. Valid data types are
defined by device drivers.
Return Value
The return value is TRUE if the function is successful or FALSE if an error
occurs.
♦