Deprecated. Builds descriptors for the supplied buffer(s) and passes the untyped data to the device driver associated with the file handle. NtDeviceIoControlFile is superseded by DeviceIoControl.
__kernel_entry NTSTATUS NtDeviceIoControlFile( IN HANDLE FileHandle, IN HANDLE Event OPTIONAL, IN PIO_APC_ROUTINE ApcRoutine OPTIONAL, IN PVOID ApcContext OPTIONAL, OUT PIO_STATUS_BLOCK IoStatusBlock, IN ULONG IoControlCode, IN PVOID InputBuffer OPTIONAL, IN ULONG InputBufferLength, OUT PVOID OutputBuffer OPTIONAL, IN ULONG OutputBufferLength );
Open file handle to the file or device to which the control information should be given.
Variable to receive the final completion status and information about the operation. Service calls that return information return the length of the data that is written to the output buffer in the Information field of this variable.
Code that indicates which device I/O control function is to be executed.
Length of the InputBuffer in bytes. If the buffer is not supplied, then this value is ignored.
Length of the OutputBuffer in bytes. If the buffer is not supplied, then this value is ignored.
The various NTSTATUS values are defined in NTSTATUS.H, which is distributed with the Windows DDK.
||The control operation was properly queued to the I/O system. Once the operation completes, the status can be determined by examining the Status field of the I/O status block.|
The NtDeviceIoControlFile service is a device-dependent interface that extends the control that applications have over various devices within the system. This API provides a consistent view of the input and output data to the system while still providing the application and the driver a device-dependent method of specifying a communications interface.
The type of access to the file that the caller needs is dependent on the actual operation being performed.
Once the service is complete the Event, if specified, is set to the
signaled state. If no Event parameter is specified, then the file object specified by the FileHandle is set to the
signaled state. If an ApcRoutine is specified, it is invoked with the ApcContext and the IoStatusBlock as its arguments.
Because there is no import library for this function, you must use GetProcAddress.
|Windows version||Windows 2000 Professional [desktop apps only] Windows 2000 Server [desktop apps only]|