DestroyMiracastContext routine

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



VOID NTAPI* DestroyMiracastContext(
  _In_  PVOID pMiracastContext
{ ... }


pMiracastContext [in]

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

Does not return a value.


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.


Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2


Netdispumdddi.h (include Netdispumdddi.h)

See also




Send comments about this topic to Microsoft

© 2014 Microsoft