PFN_HANDLE_KMD_MESSAGE callback function (netdispumdddi.h)

Called by the operating system to handle the asynchronous kernel-mode message that the Miracast user-mode driver receives when the display miniport driver calls the DxgkCbMiracastSendMessage function.

Syntax

PFN_HANDLE_KMD_MESSAGE PfnHandleKmdMessage;

NTSTATUS PfnHandleKmdMessage(
  [in]  PVOID pMiracastContext,
  [in]  UINT InputBufferSize,
  [in]  VOID *pInputBuffer,
  [in]  UINT OutputBufferSize,
  [out] VOID *pOutputBuffer,
  [out] UINT *pBytesReturned
)
{...}

Parameters

[in] pMiracastContext

A pointer to a context associated with a display adapter.

The operating system obtained the context when it called the Miracast user-mode driver's CreateMiracastContext function.

[in] InputBufferSize

The size of the input buffer pInputBuffer, supplied by the operating system.

[in] pInputBuffer

A pointer to the input buffer, supplied by the operating system.

[in] OutputBufferSize

The size of the output buffer pOutputBuffer, supplied by the operating system.

[out] pOutputBuffer

A pointer to the output buffer, supplied by the operating system.

[out] pBytesReturned

A pointer to a buffer, supplied by the operating system, that holds the number of returned bytes that the display miniport driver wrote in pOutputBuffer.

Return value

On success, this function returns STATUS_SUCCESS. Otherwise, the function returns an error code defined in the Ntstatus.h header.

Remarks

Thread Safety

When this function is called, it's possible that it has also been called in another thread. The driver is therefore responsible for synchronizing multiple calls to HandleKernelModeMessage if necessary.

The operating system guarantees that this function is not called when CreateMiracastContext, DestroyMiracastContext, StartMiracastSession, and StopMiracastSession are called. All the messages that the display miniport driver sends during the startup of a Miracast connected session (StartMiracastSession) are blocked until the session startup process has completed. The operating system also blocks all messages that the display miniport driver sends during or after a call to stop the Miracast session (StopMiracastSession).

Requirements

Requirement Value
Minimum supported client Windows 8.1
Minimum supported server Windows Server 2012 R2
Target Platform Desktop
Header netdispumdddi.h (include Netdispumdddi.h)

See also

CreateMiracastContext

DestroyMiracastContext

DxgkCbMiracastSendMessage

StartMiracastSession

StopMiracastSession