Expand Minimize

FltDeviceIoControlFile function

FltDeviceIoControlFile sends a control code directly to a specified device driver, causing the corresponding driver to perform the specified action.

Syntax


NTSTATUS FltDeviceIoControlFile(
  _In_      PFLT_INSTANCE Instance,
  _In_      PFILE_OBJECT  FileObject,
  _In_      ULONG         IoControlCode,
  _In_opt_  PVOID         InputBuffer,
  _In_      ULONG         InputBufferLength,
  _Out_     PVOID         OutputBuffer,
  _In_      ULONG         OutputBufferLength,
  _Out_opt_ PULONG        LengthReturned
);

Parameters

Instance [in]

Opaque instance pointer for the caller. This parameter is required and cannot be NULL.

FileObject [in]

File object pointer for the file or device that is the target of this request. This parameter is required and cannot be NULL.

IoControlCode [in]

IOCTL_XXX code that indicates which device I/O operation is to be carried out. The value of this parameter determines the formats and required lengths of the InputBuffer and OutputBuffer, and it determines which of the following parameter pairs (InputBuffer and InputBufferLength, or OutputBuffer and OutputBufferLength) is required.

InputBuffer [in, optional]

Pointer to a caller-allocated input buffer that contains device-specific information to be given to the target driver. If the IoControlCode parameter specifies an operation that does not require input data, this parameter is optional and can be NULL.

InputBufferLength [in]

Size, in bytes, of the buffer at InputBuffer. This value is ignored if InputBuffer is NULL.

OutputBuffer [out]

Pointer to a caller-allocated output buffer in which information is returned from the target driver. If the IoControlCode parameter specifies an operation that does not require output data, this parameter is optional and can be NULL.

OutputBufferLength [in]

Size, in bytes, of the buffer at OutputBuffer. This value is ignored if OutputBuffer is NULL.

LengthReturned [out, optional]

Pointer to a caller-allocated variable that receives the size, in bytes, of the information returned in the buffer at OutputBuffer. This parameter is optional and can be NULL.

Return value

FltDeviceIoControlFile returns STATUS_SUCCESS or an appropriate NTSTATUS value.

Remarks

For more information about the system-defined IOCTL_XXX codes, see the Remarks section of the reference entry for DeviceIoControl in the Microsoft Windows SDK documentation.

Requirements

Target platform

Universal

Header

Fltkernel.h (include Fltkernel.h)

Library

FltMgr.lib

IRQL

PASSIVE_LEVEL

See also

FltFsControlFile

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft