no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Next revision | |||
— | en:docs:fapi:dosdevconfig [2018/08/31 08:17] – created prokushev | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | |||
+ | This call gets information about attached devices. | ||
+ | |||
+ | ==Syntax== | ||
+ | | ||
+ | |||
+ | ==Parameters== | ||
+ | ;DeviceInfo (PVOID) - output: Address of the byte-wide field containing the requested information. | ||
+ | ;Item (USHORT) - input: Device information requested. | ||
+ | :0 - Number of printers attached | ||
+ | :1 - Number of RS232 ports | ||
+ | :2 - Number of diskette drives | ||
+ | :3 - Presence of math coprocessor (where 0 = not present, 1 = present) | ||
+ | :4 - PC Submodel Type (where the return is the system submodel byte) | ||
+ | :5 - PC Model Type (where the return is the system model byte) | ||
+ | :6 - Display adapter type (where 0 = monochrome mode compatible, 1 = other). | ||
+ | ;Parm (USHORT) - input: Reserved for future use and should be set to zero. | ||
+ | |||
+ | ==Return Code== | ||
+ | ;rc (USHORT) - return: | ||
+ | * 0 NO_ERROR | ||
+ | *87 ERROR_INVALID_PARAMETER | ||
+ | |||
+ | ==Remarks== | ||
+ | The system model (function 5) and submodel (function 4) information is obtained from BIOS. | ||
+ | |||
+ | In addition, the number of devices attached in a PS/2 environment reflect only devices that are " | ||
+ | |||
+ | ==Bindings== | ||
+ | ===C=== | ||
+ | <PRE> | ||
+ | #define INCL_DOSDEVICES | ||
+ | |||
+ | USHORT | ||
+ | |||
+ | PVOID | ||
+ | USHORT | ||
+ | USHORT | ||
+ | |||
+ | USHORT | ||
+ | </ | ||
+ | |||
+ | ===MASM=== | ||
+ | <PRE> | ||
+ | EXTRN DosDevConfig: | ||
+ | INCL_DOSDEVICES | ||
+ | |||
+ | PUSH@ OTHER | ||
+ | PUSH | ||
+ | PUSH | ||
+ | CALL | ||
+ | |||
+ | Returns WORD | ||
+ | </ | ||
+ | |||
+ | ==Example Code== | ||
+ | This example gets information about model type, monitor and coprocessor and display it. | ||
+ | <PRE> | ||
+ | #define INCL_DOSDEVICES | ||
+ | |||
+ | #define MACHINE_MODEL 5 | ||
+ | #define DISPLAY_TYPE 6 | ||
+ | #define FIND_COPROCESSOR 3 | ||
+ | #define RESERVED 0L | ||
+ | |||
+ | BYTE | ||
+ | USHORT rc; | ||
+ | |||
+ | | ||
+ | MACHINE_MODEL, | ||
+ | RESERVED)) | ||
+ | printf(" | ||
+ | |||
+ | | ||
+ | DISPLAY_TYPE, | ||
+ | RESERVED)) | ||
+ | if (DeviceInfo) | ||
+ | | ||
+ | else | ||
+ | | ||
+ | |||
+ | | ||
+ | FIND_COPROCESSOR, | ||
+ | RESERVED)) | ||
+ | if (DeviceInfo) | ||
+ | | ||
+ | else | ||
+ | | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ====== Note ====== | ||
+ | |||
+ | Text based on [[http:// | ||
+ | |||
+ | {{page> | ||
+ | |||