DXGKDDI_MIRACAST_HANDLE_IO_CONTROL callback function (dispmprt.h)
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 DxgkddiMiracastHandleIoControl;
NTSTATUS DxgkddiMiracastHandleIoControl(
[in] PVOID DriverContext,
[in] PVOID MiracastContext,
[in] ULONG InputBufferSize,
[in] VOID *pInputBuffer,
[in] ULONG OutputBufferSize,
[out] VOID *pOutputBuffer,
[out] ULONG *BytesReturned
)
{...}
Parameters
[in] DriverContext
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.
[in] MiracastContext
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.
[in] InputBufferSize
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.
[in] pInputBuffer
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.
[in] OutputBufferSize
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.
[out] pOutputBuffer
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.
[out] BytesReturned
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
Requirement | Value |
---|---|
Minimum supported client | Windows 8.1 |
Minimum supported server | Windows Server 2012 R2 |
Target Platform | Desktop |
Header | dispmprt.h (include Dispmprt.h) |
IRQL | PASSIVE_LEVEL |