PFN_DESTROY_MIRACAST_CONTEXT callback function (netdispumdddi.h)

Called by the operating system to destroy a user-mode Miracast context.

Syntax

PFN_DESTROY_MIRACAST_CONTEXT PfnDestroyMiracastContext;

void PfnDestroyMiracastContext(
  [in] PVOID pMiracastContext
)
{...}

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.

Return value

None

Remarks

When this function is called, the Miracast user-mode driver should release all resources it allocated when CreateMiracastContext was last called.

If the display miniport driver is still reporting the Miracast monitor for this Miracast instance, the Miracast user-mode driver can optionally call the display miniport driver to immediately send a monitor departure hot-plug detection (HPD) awareness value, or it can let the display miniport driver do so in its kernel-mode DxgkDdiMiracastDestroyContext function.

Important  The Miracast user-mode driver should complete this function call in 3 seconds so it does not block system plug and play (PnP) or power operations.
 
After this call completes, the operating system unloads the Miracast user-mode driver such that the driver leaves no resources still opened and no thread still running.

Thread Safety

The operating system guarantees that only one of the CreateMiracastContext, DestroyMiracastContext, StartMiracastSession, and StopMiracastSession functions is called at a time.

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

StartMiracastSession

StopMiracastSession