Annotation of os2sdk/demos/examples/config/config.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * Example of DOSDEVCONFIG usage
        !             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:  *
        !             9:  * Copyright (C) Microsoft Corp. 1986
        !            10:  */
        !            11: 
        !            12: #include  <doscalls.h>
        !            13: 
        !            14: main()
        !            15: {
        !            16:        unsigned char DeviceInfo[10]; /* Buffer to put information into */
        !            17:        unsigned int  Item;           /* Item number                    */
        !            18:        unsigned int  Parm = 0;       /* RESERVED: must be zero         */
        !            19: 
        !            20:        /* Check number of RS232 cards attached */
        !            21:        Item = 1;
        !            22:        DOSDEVCONFIG(DeviceInfo, Item, Parm);
        !            23:        printf("%d RS232 adapter(s) installed.\n", (int)DeviceInfo[0]);
        !            24: 
        !            25:        /* Check number of diskette drives */
        !            26:        Item = 2;
        !            27:        DOSDEVCONFIG(DeviceInfo, Item, Parm);
        !            28:        printf("%d diskette drive(s) installed.\n", (int)DeviceInfo[0]);
        !            29: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.