NtDeviceIoControlFile 函数资料
心留 2009-06-24 01:51:48 NtDeviceIoControlFile定义如下
NTSTATUS NtDeviceIoControlFile( HANDLE FileHandle,
HANDLE Event,
PIO_APC_ROUTINE ApcRoutine,
PVOID ApcContext,
PIO_STATUS_BLOCK IoStatusBlock,
ULONG IoControlCode,
PVOID InputBuffer,
ULONG InputBufferLength,
PVOID OutputBuffer,
ULONG OutputBufferLength
);
我想知道各个变量表示的意思。
英文的如下,但是我看不明白。
FileHandle
[in] Open file handle to the file or device to which the control information should be given.
Event
[in] Handle to an event to be set to the signaled state when the operation completes. This parameter can be NULL.
ApcRoutine
[in] Procedure to be invoked once the operation completes. This parameter can be NULL. For more information on Asynchronous Procedure Calls (APCs), see Asynchronous Procedure Calls.
ApcContext
[in] Pointer to pass to ApcRoutine when the operation completes. This parameter is required if an ApcRoutine is specified.
IoStatusBlock
[out] 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.
IoControlCode
[in] Code that indicates which device I/O control function is to be executed.
InputBuffer
[in] Pointer to a buffer that contains the information to be given to the target device. This parameter can be NULL. This information is device-dependent.
InputBufferLength
[in] Length of the InputBuffer in bytes. If the buffer is not supplied, then this value is ignored.
OutputBuffer
[out] Pointer to a buffer that is to receive the device-dependent return information from the target device. This parameter can be NULL.
OutputBufferLength
[in] Length of the OutputBuffer in bytes. If the buffer is not supplied, then this value is ignored.
Return Value
The various NTSTATUS values are defined in NTSTATUS.H, which is distributed with the Microsoft Windows Driver Development Kit (DDK).