mov bx, Handle ;Device handle
mov ch, Category ;Category to check
mov cl, Function ;Function to check
mov ax, 4410h ;Query IOCTL Handle 4410h
int 21h
jnc supported ;carry clear means IOCTL supported
Query IOCTL Handle (Function 4410h) determines whether the specified IOCTL is supported by the given device driver.
Handle
Identifies the device to check.
Category
Specifies an IOCTL category code. It can be one of the following:
Value | Meaning |
01h | Serial device |
03h | Console (screen) |
05h | Parallel printer |
Function
Specifies a Function 440Ch minor code. It can be one of the following:
Value | Meaning |
45h | Set Iteration Count |
65h | Get Iteration Count |
If IOCTL is supported, the carry flag is clear. Otherwise, the carry flag is set and AX contains an error value, which may be one of the following:
Value | Name |
0001h | ERROR_INVALID_FUNCTION |
0005h | ERROR_ACCESS_DENIED |
Query IOCTL Handle returns 0001h (ERROR_INVALID_FUNCTION) if the device driver has no support for IOCTL functions. The function returns 0005h (ERROR_ACCESS_DENIED) if the device driver supports IOCTL functions but does not support the specified IOCTL.
Function 3Dh Open File with Handle
Function 3Ch Create File with Handle
Function 4411h Query IOCTL Device