|
|
Microsoft OS/2 SDK 03-01-1988
/*
* Example of DosDevConfig usage
*
* This calls gets information about the attached devices. This
* program works in Family API mode.
*
* Compile as: cl -AL -Lp -G0 config.c
*
* Created by Microsoft Corp. 1986
*/
#define INCL_DOSDEVICES
#include <os2def.h>
#include <bsedos.h>
main()
{
UCHAR DeviceInfo[10]; /* Buffer to put information into */
USHORT Item; /* Item number */
USHORT Parm = 0; /* RESERVED: must be zero */
/* Check number of RS232 cards attached */
Item = 1;
DosDevConfig(DeviceInfo, Item, Parm);
printf("%d RS232 adapter(s) installed.\n", (int)DeviceInfo[0]);
/* Check number of diskette drives */
Item = 2;
DosDevConfig(DeviceInfo, Item, Parm);
printf("%d diskette drive(s) installed.\n", (int)DeviceInfo[0]);
}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.