SpbResourceIoControl
Collapse the table of content
Expand the table of content

SpbResourceIoControl function

Performs an I/O control operation on an open Simple Peripheral Bus (SPB) resource. All input parameters are supplied by the display miniport driver.

Syntax


NTSTATUS SpbResourceIoControl(
  _In_     HANDLE          DeviceHandle,
  _In_     VOID            *SpbResource,
  _In_     ULONG           IoControlCode,
  _In_     ULONG           InBufferSize,
  _In_     VOID            *InputBuffer,
  _In_     ULONG           OutBufferSize,
  _Out_    VOID            *OutputBuffer,
  _In_opt_ HANDLE          EventHandle,
  _Out_    IO_STATUS_BLOCK *IoStatusBlock
);

Parameters

DeviceHandle [in]

A handle that represents a display adapter. The display miniport driver previously obtained this handle in the DeviceHandle member of the DXGKRNL_INTERFACE structure that was passed to the DxgkDdiStartDevice function.

SpbResource [in]

A pointer to an SPB resource that the display miniport driver opened using the OpenSpbResource function.

IoControlCode [in]

A device I/O control code (IOCTL_XXX) that indicates which device I/O control operation is to be carried out on, usually by the underlying device driver. The value of this parameter determines the format and required length of the InputBuffer and OutputBuffer parameters, as well as which of the following parameter pairs are required.

InBufferSize [in]

The size, in bytes, of the buffer pointed to by the InputBuffer parameter. This value is ignored if InputBuffer is NULL.

InputBuffer [in]

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

OutBufferSize [in]

The size, in bytes, of the buffer pointed to by the OutputBuffer parameter. This value is ignored if OutputBuffer is NULL.

OutputBuffer [out]

A pointer to a caller-allocated output buffer in which information is returned from the target device. If the IoControlCode parameter specifies an operation that does not produce output data, this pointer can be NULL

EventHandle [in, optional]

An optional handle for a caller-created event. If this parameter is supplied, the caller will be put into a wait state until the requested operation is completed and the given event is set to the Signaled state.

This parameter can be NULL.

IoStatusBlock [out]

A pointer to a variable that receives the final completion status and information about the requested I/O control operation. For successful calls that return data, the number of bytes written to the buffer pointed to by the OutputBuffer parameter is returned in the Information member of the IO_STATUS_BLOCK structure.

Return value

This function returns STATUS_SUCCESS if it succeeds. Otherwise, it returns one of the error codes defined in Ntstatus.h.

Remarks

If the caller opened the file for asynchronous I/O (with neither FILE_SYNCHRONOUS_XXX create/open option set), the specified event, if any, will be set to the Signaled state when the device control operation completes. Otherwise, the file object specified by the DeviceHandle parameter will be set to the Signaled state.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Target platform

Header

Dispmprt.h (include Dispmprt.h)

IRQL

PASSIVE_LEVEL

See also

IO_STATUS_BLOCK
IoCreateNotificationEvent
OpenSpbResource

 

 

Send comments about this topic to Microsoft

Show:
© 2016 Microsoft