KsSynchronousIoControlDevice function (ks.h)

The KsSynchronousIoControlDevice function performs a synchronous device I/O control on the target device object. It waits in a nonalertable state until the I/O completes. This function can only be called at PASSIVE_LEVEL.

Syntax

KSDDKAPI NTSTATUS KsSynchronousIoControlDevice(
  [in]  PFILE_OBJECT    FileObject,
        KPROCESSOR_MODE RequestorMode,
  [in]  ULONG           IoControl,
  [in]  PVOID           InBuffer,
  [in]  ULONG           InSize,
  [out] PVOID           OutBuffer,
  [in]  ULONG           OutSize,
  [out] PULONG          BytesReturned
);

Parameters

[in] FileObject

Indicates the file object to fill in the first stack location with.

RequestorMode

Indicates the processor mode to place in the IRP if one needs to be generated.

[in] IoControl

Specifies the I/O control to send.

[in] InBuffer

Points to the device input buffer.

[in] InSize

Specifies the size in bytes of the device input buffer.

[out] OutBuffer

Points to the device output buffer.

[in] OutSize

Specifies the size in bytes of the device output buffer.

[out] BytesReturned

Points to the place in which to put the number of bytes returned.

Return value

KsSynchronousIoControlDevice returns the result of the device I/O control.

Requirements

Requirement Value
Target Platform Universal
Header ks.h (include Ks.h)
Library Ks.lib