en:docs:fapi:dosdevioctl

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:dosdevioctl [2020/12/04 13:04] prokusheven:docs:fapi:dosdevioctl [2021/11/28 10:33] (current) prokushev
Line 1: Line 1:
-{{logos:os2.gif?35x35}} {{logos:dos.gif?35x35}}+{{page>en:templates:fapiint}}
  
 ====== DosDevIOCtl ====== ====== DosDevIOCtl ======
Line 5: Line 5:
 This call performs control functions on a device specified by an opened device handle. This call performs control functions on a device specified by an opened device handle.
  
-==Syntax== +===== Syntax ===== 
- DosDevIOCtl (Data, ParmList, Function, Category, DevHandle)+<code c> 
 +DosDevIOCtl (Data, ParmList, Function, Category, DevHandle) 
 +</code>
  
-==Parameters== +===== Parameters ===== 
-;Data (PVOID) - input : Address of the data area. + 
-;ParmList (PVOID) - input : Address of the command-specific argument list. +  Data ([[PVOID]]) - input : Address of the data area. 
-;Function (USHORT) - input : Device-specific function code. +  ParmList ([[PVOID]]) - input : Address of the command-specific argument list. 
-;Category (USHORT) - input : Device category. +  Function ([[USHORT]]) - input : Device-specific function code. 
-;DevHandle (HFILE) - input : Device handle returned by DosOpen or a standard (open) device handle.+  Category ([[USHORT]]) - input : [[Device category]]
 +  DevHandle ([[HFILE]]) - input : Device handle returned by DosOpen or a standard (open) device handle. 
 + 
 +===== Return Code ===== 
 + 
 +rc ([[USHORT]]) - return
  
-==Return Code== 
- rc (USHORT) - return 
 Return code descriptions are: Return code descriptions are:
-* 0  NO_ERROR 
-* 1  ERROR_INVALID_FUNCTION  
-* 6  ERROR_INVALID_HANDLE  
-* 15  ERROR_INVALID_DRIVE  
-* 31  ERROR_GEN_FAILURE  
-* 87  ERROR_INVALID_PARAMETER  
-* 115  ERROR_PROTECTION_VIOLATION  
-* 117  ERROR_INVALID_CATEGORY  
-* 119  ERROR_BAD_DRIVER_LEVEL  
-* 163  ERROR_UNCERTAIN_MEDIA  
-* 165  ERROR_MONITORS_NOT_SUPPORTED 
  
-==Remarks==+  * 0  NO_ERROR 
 +  * 1  ERROR_INVALID_FUNCTION  
 +  * 6  ERROR_INVALID_HANDLE  
 +  * 15  ERROR_INVALID_DRIVE  
 +  * 31  ERROR_GEN_FAILURE  
 +  * 87  ERROR_INVALID_PARAMETER  
 +  * 115  ERROR_PROTECTION_VIOLATION  
 +  * 117  ERROR_INVALID_CATEGORY  
 +  * 119  ERROR_BAD_DRIVER_LEVEL  
 +  * 163  ERROR_UNCERTAIN_MEDIA  
 +  * 165  ERROR_MONITORS_NOT_SUPPORTED 
 + 
 +===== Remarks ===== 
 Values returned in the range hex FF00 through FFFF are user dependent error codes. Values returned in the range hex FE00 through FEFF are device driver dependent error codes. Values returned in the range hex FF00 through FFFF are user dependent error codes. Values returned in the range hex FE00 through FEFF are device driver dependent error codes.
  
-Refer to the ''IBM Operating System/2 Version 1.2 I/O Subsystems And Device Support Volume 1'' for a complete listing of control functions (DevHlp calls). +Refer to the [[http://www.os2museum.com/files/docs/os212pti/64F3959_OS2_V1_2_PTI_IO_Subsystems_and_Device_Support_Vol_1_Device_Drivers.pdf|IBM Operating System/2 Version 1.2 I/O Subsystems And Device Support Volume 1]] for a complete listing of control functions (DevHlp calls).  
 + 
 +==== Family API Considerations ====
  
-===Family API Considerations=== 
 Some options operate differently in the DOS mode than in the OS/2 mode. Therefore, the following considerations apply to DosDevIOCtl when coding for the DOS mode. Some options operate differently in the DOS mode than in the OS/2 mode. Therefore, the following considerations apply to DosDevIOCtl when coding for the DOS mode.
  
 The level of support for DosDevIOCtl is identified by category and function code with a noted restriction if it is not supported by DOS 2.X or DOS 3.X Functions tend to be more restrictive in lower version numbers of DOS. The level of support for DosDevIOCtl is identified by category and function code with a noted restriction if it is not supported by DOS 2.X or DOS 3.X Functions tend to be more restrictive in lower version numbers of DOS.
  
-*Category 1 supported as follows: +  *Category 1 supported as follows: 
-**41H Set Baud Rate +    *41H Set Baud Rate 
-**42H Set Line Control +    *42H Set Line Control 
-**All other category 1 functions are not supported for DOS 2.X and DOS 3.X.  +    *All other category 1 functions are not supported for DOS 2.X and DOS 3.X.  
-*Category 2 not supported in FAPI +  *Category 2 not supported in FAPI 
-*Category 3 not supported in FAPI +  *Category 3 not supported in FAPI 
-*Category 4 not supported in FAPI +  *Category 4 not supported in FAPI 
-*Category 5 supported in FAPI as follows: +  *Category 5 supported in FAPI as follows: 
-**42H Set Frame control - supports IBM Graphics Printers only +    *42H Set Frame control - supports IBM Graphics Printers only 
-**44H Set Infinite Retry - for DOS 2.X and DOS 3.X, the function is in effect only for the duration of the calling program +    *44H Set Infinite Retry - for DOS 2.X and DOS 3.X, the function is in effect only for the duration of the calling program 
-**46H Initialize printer +    *46H Initialize printer 
-**62H Get Frame Control - not supported for DOS 2.X and DOS 3.X +    *62H Get Frame Control - not supported for DOS 2.X and DOS 3.X 
-**64H Get Infinite Retry +    *64H Get Infinite Retry 
-**66H Get Printer Status. +    *66H Get Printer Status. 
-*Category 6 not supported in FAPI +  *Category 6 not supported in FAPI 
-*Category 7 not supported in FAPI +  *Category 7 not supported in FAPI 
-*Category 8 supported in FAPI as follows: +  *Category 8 supported in FAPI as follows: 
-**00H Lock Drive - not supported for versions below DOS 3.2 +    *00H Lock Drive - not supported for versions below DOS 3.2 
-**01H Unlock Drive - not supported for versions below DOS 3.2 +    *01H Unlock Drive - not supported for versions below DOS 3.2 
-**02H Redetermine Media - not supported for versions below DOS 3.2 +    *02H Redetermine Media - not supported for versions below DOS 3.2 
-**03H Set Logical Map - not supported for versions below DOS 3.2 +    *03H Set Logical Map - not supported for versions below DOS 3.2 
-**20H Block Removable - not supported for versions below DOS 3.2 +    *20H Block Removable - not supported for versions below DOS 3.2 
-**21H Get Logical Map - not supported for versions below DOS 3.2 +    *21H Get Logical Map - not supported for versions below DOS 3.2 
-**43H Set Device Parameters - not supported for DOS 2.X and DOS 3.X +    *43H Set Device Parameters - not supported for DOS 2.X and DOS 3.X 
-**44H Write Track - not supported for DOS 2.X and DOS 3.X +    *44H Write Track - not supported for DOS 2.X and DOS 3.X 
-**45H Format Track - not supported for DOS 2.X and DOS 3.X +    *45H Format Track - not supported for DOS 2.X and DOS 3.X 
-**63H Get Device Parameters - not supported for DOS 2.X and DOS 3.X +    *63H Get Device Parameters - not supported for DOS 2.X and DOS 3.X 
-**64H Read Track - not supported for DOS 2.X and DOS 3.X +    *64H Read Track - not supported for DOS 2.X and DOS 3.X 
-**65H Verify Track - not supported for DOS 2.X and DOS 3.X.  +    *65H Verify Track - not supported for DOS 2.X and DOS 3.X.  
-*Category 9 is reserved +  *Category 9 is reserved 
-*Category 10 (0AH) not supported in FAPI +  *Category 10 (0AH) not supported in FAPI 
-*Category 11 (0BH) not supported in FAPI.+  *Category 11 (0BH) not supported in FAPI.
  
-==Example Code== + 
-===C Binding=== +===== Bindings ===== 
-<PRE>+==== C Binding ===
 + 
 +<code c>
 #define INCL_DOSDEVICES #define INCL_DOSDEVICES
  
Line 87: Line 97:
  
 USHORT           rc;            /* return code */ USHORT           rc;            /* return code */
-</PRE>+</code>
  
-===MASM Binding=== +==== MASM Binding ===
-<PRE>+ 
 +<code asm>
 EXTRN  DosDevIOCtl:FAR EXTRN  DosDevIOCtl:FAR
 INCL_DOSDEVICES     EQU 1 INCL_DOSDEVICES     EQU 1
Line 100: Line 111:
 PUSH   WORD    DevHandle     ;Device handle PUSH   WORD    DevHandle     ;Device handle
 CALL   DosDevIOCtl CALL   DosDevIOCtl
 +</code>
 Returns WORD Returns WORD
-</PRE> 
- 
  
-====== Note ======+===== Note =====
  
 Text based on [[http://www.edm2.com/index.php/DosDevIOCtl_(FAPI)]] Text based on [[http://www.edm2.com/index.php/DosDevIOCtl_(FAPI)]]