Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:docs:fapi:dosdevioctl2 [2021/08/20 04:37] – created prokushev | en:docs:fapi:dosdevioctl2 [2023/11/26 12:37] (current) – [Remarks] prokushev | ||
---|---|---|---|
Line 1: | Line 1: | ||
{{page> | {{page> | ||
+ | ====== DosDevIOCtl2 ====== | ||
+ | |||
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 | + | <code c> |
+ | | ||
+ | Function, Category, DevHandle) | ||
+ | </ | ||
+ | ===== Parameters ===== | ||
- | ==Parameters== | + | * Data ([[PVOID]]) - input : Address of the data area. |
- | ;Data (PVOID) - input : Address of the data area. | + | * DataLength ([[USHORT]]) - input : Length of the data buffer. |
- | ;ParmList (PVOID) - input : Address of the command-specific argument list. | + | * ParmList ([[PVOID]]) - input : Address of the command-specific argument list. |
- | ;Function (USHORT) - input : Device-specific function code. | + | * ParmListLength ([[USHORT]]) - input : Length 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. | + | |
+ | | ||
- | ==Return Code== | + | ===== Return Code ===== |
- | ;rc (USHORT) - return: | + | |
- | * 0 NO_ERROR | + | rc ([[USHORT]]) - return: |
- | * 1 ERROR_INVALID_FUNCTION | + | |
- | * 6 ERROR_INVALID_HANDLE | + | |
- | * 15 ERROR_INVALID_DRIVE | + | * 1 ERROR_INVALID_FUNCTION |
- | * 31 ERROR_GEN_FAILURE | + | * 6 ERROR_INVALID_HANDLE |
- | * 87 ERROR_INVALID_PARAMETER | + | *15 ERROR_INVALID_DRIVE |
- | *115 ERROR_PROTECTION_VIOLATION | + | *31 ERROR_GEN_FAILURE |
- | *117 ERROR_INVALID_CATEGORY | + | *87 ERROR_INVALID_PARAMETER |
- | *119 ERROR_BAD_DRIVER_LEVEL | + | *115 ERROR_PROTECTION_VIOLATION |
- | *163 ERROR_UNCERTAIN_MEDIA | + | *117 ERROR_INVALID_CATEGORY |
- | *165 ERROR_MONITORS_NOT_SUPPORTED | + | *119 ERROR_BAD_DRIVER_LEVEL |
+ | *163 ERROR_UNCERTAIN_MEDIA | ||
+ | *165 ERROR_MONITORS_NOT_SUPPORTED | ||
+ | |||
+ | ===== Remarks ===== | ||
- | ==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 '' | + | Refer to the [[http:// |
- | ===Family API Considerations=== | + | This function provides a generic, expandable IOCTL facility. |
- | 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 | + | A null (zero) value for Data specifies that this parameter |
- | *Category 1 supported as follows: | + | A null (zero) value for ParmList specifies that this parameter is not defined |
- | **41H Set Baud Rate | + | |
- | **42H Set Line Control | + | |
- | **All other category 1 functions are not supported | + | |
- | *Category 2 not supported in FAPI | + | |
- | *Category 3 not supported in FAPI | + | |
- | *Category 4 not supported in FAPI | + | |
- | *Category 5 supported in FAPI as follows: | + | |
- | **42H Set Frame control - supports IBM Graphics Printers only | + | |
- | **44H Set Infinite Retry - for DOS 2.X and DOS 3.X, the function | + | |
- | **46H Initialize printer | + | |
- | **62H Get Frame Control - not supported for DOS 2.X and DOS 3.X | + | |
- | **64H Get Infinite Retry | + | |
- | **66H Get Printer Status. | + | |
- | *Category 6 not supported in FAPI | + | |
- | *Category 7 not supported in FAPI | + | |
- | *Category 8 supported in FAPI as follows: | + | |
- | **00H Lock 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 | + | |
- | **03H Set Logical Map - 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 | + | |
- | **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 | + | |
- | **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 | + | |
- | **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. | + | |
- | *Category 9 is reserved | + | |
- | *Category 10 (0AH) not supported in FAPI | + | |
- | *Category 11 (0BH) not supported | + | |
- | ==Bindings== | + | The kernel formats a generic IOCTL packet and call the device driver. Since V1.0 and V1.1 device drivers do not understand generic IOCTL packets with DataLength and ParmListLength, |
- | ===C=== | + | |
- | <PRE> | + | Do not pass a non-null pointer with a zero length. |
+ | |||
+ | ===== Bindings ===== | ||
+ | |||
+ | ==== C ==== | ||
+ | |||
+ | <code c> | ||
#define INCL_DOSDEVICES | #define INCL_DOSDEVICES | ||
- | USHORT | + | USHORT |
PVOID | PVOID | ||
+ | USHORT | ||
PVOID | PVOID | ||
+ | USHORT | ||
USHORT | USHORT | ||
USHORT | USHORT | ||
Line 84: | Line 70: | ||
USHORT | USHORT | ||
- | </PRE> | + | </code> |
- | ===MASM=== | + | ==== MASM ==== |
- | <PRE> | + | |
- | EXTRN | + | <code asm> |
+ | EXTRN | ||
INCL_DOSDEVICES | INCL_DOSDEVICES | ||
- | PUSH@ OTHER | + | PUSH@ OTHER |
- | PUSH@ OTHER | + | PUSH |
- | PUSH | + | PUSH@ OTHER |
- | PUSH | + | PUSH |
- | PUSH | + | PUSH |
- | CALL DosDevIOCtl | + | PUSH |
+ | PUSH | ||
+ | CALL DosDevIOCtl2 | ||
- | Returns WORD | + | </code> |
- | </PRE> | + | |
+ | Returns WORD | ||
{{page> | {{page> | ||