DosDevConfig

Gets information about attached devices.

Syntax
DosDevConfig(pdevinfo, item)

Parameters

 * pdevinfo (PVOID) - output: Address of the area where the information is returned.
 * All returned device information is BYTE-sized, so this should be the address of a BYTE variable.


 * item (ULONG) - input: Device information to be returned.
 * This parameter has one of the possible values:
 * 0 DEVINFO_PRINTER: Number of parallel or printer ports.
 * 1 DEVINFO_RS232: Number of RS232 ports.
 * 2 DEVINFO_FLOPPY: Number of diskette drives.
 * 3 DEVINFO_COPROCESSOR: Presence of math coprocessor hardware:
 * 0 No coprocessor hardware
 * 1 Coprocessor hardware installed
 * 4 DEVINFO_SUBMODEL: PC Submodel Type. The returned information is the system submodel byte.
 * 5 DEVINFO_MODEL: PC Model Type. The returned information is the system model byte.
 * 6 DEVINFO_ADAPTER: Type of primary display adapter:
 * 0 Monochrome or printer adapter
 * 1 Other

Return Code

 * ulrc (APIRET) - return:DosDevConfig returns one of the following values:
 * 0 - NO_ERROR
 * 87 - ERROR_INVALID_PARAMETER

Example Code
This example gets information about the installed devices and displays it. Some return code checking was omitted for brevity.

Related Functions

 * DosBeep
 * DosDevIOCtl
 * DosPhysicalDisk