This is part of Family API which allow to create dual-os version of program runs under OS/2 and DOS
Note: This is legacy API call. It is recommended to use 32-bit equivalent
This call performs control functions on a device specified by an opened device handle.
DosDevIOCtl (Data, ParmList, Function, Category, DevHandle)
rc (USHORT) - return
Return code descriptions are:
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).
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.
#define INCL_DOSDEVICES USHORT rc = DosDevIOCtl(Data, ParmList, Function, Category, DevHandle); PVOID Data; /* Data area */ PVOID ParmList; /* Command arguments */ USHORT Function; /* Device function */ USHORT Category; /* Device category */ HFILE DevHandle; /* Specifies the device */ USHORT rc; /* return code */
EXTRN DosDevIOCtl:FAR INCL_DOSDEVICES EQU 1 PUSH@ OTHER Data ;Data area PUSH@ OTHER ParmList ;Command arguments PUSH WORD Function ;Device function PUSH WORD Category ;Device category PUSH WORD DevHandle ;Device handle CALL DosDevIOCtl
Returns WORD
Text based on http://www.edm2.com/index.php/DosDevIOCtl_(FAPI)