en:docs:fapi:dosdevconfig

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:docs:fapi:dosdevconfig [2020/12/04 11:27] prokusheven:docs:fapi:dosdevconfig [2021/09/17 04:58] (current) prokushev
Line 1: Line 1:
-{{logos:os2.gif?35x35}} {{logos:dos.gif?35x35}}+{{page>en:templates:fapiint}}
  
 ====== DosDevConfig ====== ====== DosDevConfig ======
Line 5: Line 5:
 This call gets information about attached devices. This call gets information about attached devices.
  
-==Syntax== +===== Syntax =====
- DosDevConfig (DeviceInfo, Item, Parm)+
  
-==Parameters== +<code c> 
-;DeviceInfo (PVOID) - output: Address of the byte-wide field containing the requested information. +DosDevConfig (DeviceInfoItem, Parm
-;Item (USHORT) - input: Device information requested. +</code>
-:0 - Number of printers attached +
-:1 - Number of RS232 ports +
-:2 - Number of diskette drives +
-:3 - Presence of math coprocessor (where 0 = not present1 = 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== +===== Parameters ===== 
-;rc (USHORT) - return:Return code descriptions are: + 
-* 0 NO_ERROR +  * DeviceInfo ([[PVOID]]) - output: Address of the byte-wide field containing the requested information. 
-*87 ERROR_INVALID_PARAMETER+  * 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:Return code descriptions are: 
 + 
 +  * 0 NO_ERROR 
 +  *87 ERROR_INVALID_PARAMETER 
 + 
 +===== Remarks =====
  
-==Remarks== 
 The system model (function 5) and submodel (function 4) information is obtained from BIOS. 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 "awake". Devices that are "asleep" are not counted. In addition, the number of devices attached in a PS/2 environment reflect only devices that are "awake". Devices that are "asleep" are not counted.
  
-==Bindings== +===== Bindings =====
-===C===+
  
 +==== C ====
 +
 +<code c>
   #define INCL_DOSDEVICES   #define INCL_DOSDEVICES
      
Line 42: Line 51:
      
   USHORT  rc;            /* return */   USHORT  rc;            /* return */
 +</code>
  
-===MASM===+==== MASM ====
  
 +<code asm>
   EXTRN  DosDevConfig:FAR   EXTRN  DosDevConfig:FAR
   INCL_DOSDEVICES     EQU 1   INCL_DOSDEVICES     EQU 1
Line 52: Line 63:
   PUSH   WORD    Parm        ;Reserved (must be zero)   PUSH   WORD    Parm        ;Reserved (must be zero)
   CALL   DosDevConfig   CALL   DosDevConfig
 +</code>
  
 Returns WORD Returns WORD
-</PRE> 
  
-==Example Code==+==== Example Code ==== 
 This example gets information about model type, monitor and coprocessor and display it.  This example gets information about model type, monitor and coprocessor and display it. 
 +
 +<code c>
  
   #define INCL_DOSDEVICES   #define INCL_DOSDEVICES
Line 91: Line 105:
  
  
 +</code>
  
 +===== Note =====
  
-====== Note ====== 
  
 Text based on [[http://www.edm2.com/index.php/DosDevConfig_(Legacy)]] Text based on [[http://www.edm2.com/index.php/DosDevConfig_(Legacy)]]