DXGKDDI_MIRACAST_HANDLE_IO_CONTROL - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// dispmprt.h

DXGKDDI_MIRACAST_HANDLE_IO_CONTROL DxgkddiMiracastHandleIoControl;

NTSTATUS DxgkddiMiracastHandleIoControl(
  [in]  PVOID DriverContext,
  [in]  PVOID MiracastContext,
  [in]  ULONG InputBufferSize,
  [in]  VOID *pInputBuffer,
  [in]  ULONG OutputBufferSize,
  [out] VOID *pOutputBuffer,
  [out] ULONG *BytesReturned
)
{...}
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nc-dispmprt-dxgkddi_miracast_handle_io_control)

DXGKDDI_MIRACAST_HANDLE_IO_CONTROL callback function

Description

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.

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.

OutputBufferSize [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:

See also

DxgkDdiAddDevice

DxgkDdiMiracastCreateContext

MiracastIoControl

ProbeForRead

ProbeForWrite