DXGKDDI_MIRACAST_HANDLE_IO_CONTROL callback function

Called by the operating system to request that the display miniport driver process a synchronous I/O control request in response to a user-mode display driver call to the MiracastIoControl function.

Syntax


DXGKDDI_MIRACAST_HANDLE_IO_CONTROL DxgkDdiMiracastIoControl;

NTSTATUS* DxgkDdiMiracastIoControl(
  _In_  PVOID DriverContext,
  _In_  PVOID MiracastContext,
  _In_  ULONG InputBufferSize,
  _In_  VOID  *pInputBuffer,
  _In_  ULONG OutBufferSize,
  _Out_ VOID  *pOutputBuffer,
  _Out_ ULONG *BytesReturned
)
{ ... }

Parameters

DriverContext [in]

A handle to a context block that is associated with a display adapter. The display miniport driver's DxgkDdiAddDevice function previously provided this handle to the DirectX graphics kernel subsystem.

MiracastContext [in]

The Miracast device context, supplied by the operating system. This context was provided by the display miniport driver in a call to the DxgkDdiMiracastCreateContext function.

InputBufferSize [in]

Supplied by the operating system as the size, in bytes, of the input buffer pointed to by pInputBuffer. This value originated as the user-mode MiracastIoControl function's InputBufferSize parameter.

pInputBuffer [in]

Supplied by the operating system as a pointer to the input buffer. This value originated as the user-mode MiracastIoControl function's InputBufferSize parameter.

InputBufferSize specifies the size of the buffer.

OutBufferSize [in]

Supplied by the operating system as the size, in bytes, of the output buffer pointed to by pOutputBuffer. This value originated as the user-mode MiracastIoControl function's OutputBufferSize parameter.

pOutputBuffer [out]

Supplied by the operating system as a pointer to the output buffer. This value originated as the user-mode MiracastIoControl function's pOutputBuffer parameter.

OutBufferSize specifies the size of the buffer.

BytesReturned [out]

Supplied by the operating system as a pointer to a buffer that holds a ULONG-type value that is the number of bytes that the display miniport driver returned in the buffer pointed to by pOutputBuffer.

Return value

Returns STATUS_SUCCESS if it succeeds. Otherwise, it returns one of the error codes that are defined in Ntstatus.h.

Remarks

The operating system guarantees that a call to DxgkDdiMiracastIoControl occurs in the same process space as the user-mode MiracastIoControl request is called in.

Even though the operating system merely copies the values of the input and output buffer sizes from the respective parameters of MiracastIoControl, the display miniport driver is responsible for checking buffer sizes before using the buffers. Also, the driver should perform probing operations within a try/except calling block, using ProbeForRead and/or ProbeForWrite functions, to verify any user-mode memory that input buffers point to.

This I/O control operation is processed synchronously with a call to the user-mode MiracastIoControl function.

Synchronization

The operating system groups the DxgkDdiMiracastCreateContext, DxgkDdiMiracastDestroyContext, and DxgkDdiMiracastIoControl functions as a Miracast class.

The threading and synchronization level for this function is set by how the user-mode driver sets the HardwareAccess parameter in a call to the MiracastIoControl function:

  • If HardwareAccess is FALSE, then the operating system guarantees that DxgkDdiMiracastIoControl follows the second-level synchronization mode as defined in Threading and Synchronization Second Level. DxgkDdiMiracastIoControl can be called when other level 0, 1, or non-Miracast classes of level 2 functions are being called on another thread context. However, only one of the level 2 Miracast-class functions can be called at a time.
  • If HardwareAccess is TRUE, then DxgkDdiMiracastIoControl follows the third-level synchronization mode as defined in Threading and Synchronization Third Level. Note that the flushing of the GPU will create substantial processing overhead.

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Target platform

Header

Dispmprt.h (include Dispmprt.h)

IRQL

PASSIVE_LEVEL

See also

DxgkDdiAddDevice
DxgkDdiMiracastCreateContext
MiracastIoControl
ProbeForRead
ProbeForWrite

 

 

Send comments about this topic to Microsoft

Show: