|
|
1.1 root 1: /* 1.1.1.2 ! root 2: * Example of DosDevConfig usage 1.1 root 3: * 4: * This calls gets information about the attached devices. This 5: * program works in Family API mode. 6: * 7: * Compile as: cl -AL -Lp -G0 config.c 8: * 1.1.1.2 ! root 9: * Created by Microsoft Corp. 1986 1.1 root 10: */ 11: 1.1.1.2 ! root 12: #define INCL_DOSDEVICES ! 13: ! 14: #include <os2def.h> ! 15: #include <bsedos.h> 1.1 root 16: 17: main() 18: { 1.1.1.2 ! root 19: UCHAR DeviceInfo[10]; /* Buffer to put information into */ ! 20: USHORT Item; /* Item number */ ! 21: USHORT Parm = 0; /* RESERVED: must be zero */ 1.1 root 22: 23: /* Check number of RS232 cards attached */ 24: Item = 1; 1.1.1.2 ! root 25: DosDevConfig(DeviceInfo, Item, Parm); 1.1 root 26: printf("%d RS232 adapter(s) installed.\n", (int)DeviceInfo[0]); 27: 28: /* Check number of diskette drives */ 29: Item = 2; 1.1.1.2 ! root 30: DosDevConfig(DeviceInfo, Item, Parm); 1.1 root 31: printf("%d diskette drive(s) installed.\n", (int)DeviceInfo[0]); 32: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.