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.
DosDevConfig (1.2)
◄Function Group► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_DOSDEVICES
USHORT DosDevConfig(pvDevInfo, usItem, usReserved)
PVOID pvDevInfo; /* pointer to variable for device information */
USHORT usItem; /* item number */
USHORT usReserved; /* must be zero */
The DosDevConfig function retrieves information about attached devices.
The DosDevConfig function is a family API function.
Parameter Description
────────────────────────────────────────────────────────────────────────────
pvDevInfo Points to the variable that receives device information. The
type of information received depends on the value of the usItem
parameter.
usItem Specifies what device information to retrieve. This parameter
can be one of the following values:
Value Meaning
────────────────────────────────────────────────────────────────
DEVINFO_ADAPTER The pvDevInfo parameter points to a BYTE
variable that is set to FALSE if the
primary display adapter is a
monochrome/printer display adapter type, or
to TRUE for other display adapters.
DEVINFO_COPROCESSOR The pvDevInfo parameter points to a BYTE
variable that is set to TRUE if a math
coprocessor is present.
DEVINFO_FLOPPY The pvDevInfo parameter points to a USHORT
variable that receives the number of
removable-disk drives that are installed.
DEVINFO_MODEL The pvDevInfo parameter points to a BYTE
variable that receives the PC model type.
DEVINFO_PRINTER The pvDevInfo parameter points to a USHORT
variable that receives the number of
printers that are attached.
DEVINFO_RS232 The pvDevInfo parameter points to a USHORT
variable that receives the number of RS232
cards that are attached.
DEVINFO_SUBMODEL The pvDevInfo parameter points to a BYTE
variable that receives the PC submodel
type.
usReserved Specifies a reserved value; must be zero.
Return Value
The return value is zero if the function is successful. Otherwise, it is an
error value, which may be the following:
ERROR_INVALID_PARAMETER
Example
This example calls the DosDevConfig function to determine if a math
coprocessor is present:
BYTE bDevInfo;
DosDevConfig(&bDevInfo, /* address of variable for device info. */
DEVINFO_COPROCESSOR, /* information requested */
0); /* reserved */
if (bDevInfo)
VioWrtTTY("Math coprocessor present\r\n", 26, 0);
else
VioWrtTTY("Math coprocessor not present\r\n", 30, 0);
See Also
DosDevIOCtl, VioGetConfig
♦