DxgkDdiMiracastCreateContext routine

Creates a kernel-mode context for a Miracast device.

Syntax


DXGKDDI_MIRACAST_CREATE_CONTEXT DxgkDdiMiracastCreateContext;

NTSTATUS* DxgkDdiMiracastCreateContext(
  _In_   PVOID DriverContext,
  _In_   DXGK_MIRACAST_DISPLAY_CALLBACKS *MiracastCallbacks,
  _Out_  PVOID *MiracastContext,
  _Out_  ULONG *TargetId
)
{ ... }

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.

MiracastCallbacks [in]

A pointer to an operating system-provided buffer that holds a DXGK_MIRACAST_DISPLAY_CALLBACKS structure that has pointers to callback functions that the driver can call.

MiracastContext [out]

A pointer to an operating system-provided buffer that holds the address of the context that the driver allocated for this Miracast device instance.

TargetId [out]

A pointer to an operating system-provided buffer that holds the ID of the VidPN target that the Miracast device is connected to. The driver should report this target as type D3DKMDT_VOT_MIRACAST when the operating system calls the DxgkDdiQueryChildRelations function during device initialization.

Return value

Returns STATUS_SUCCESS if it succeeds. Otherwise, it returns one of the error codes that are defined in Ntstatus.h, including:

Return codeDescription
STATUS_RESOURCE_IN_USE

The hardware resources needed to support a Miracast connected session aren't currently available.

 

Remarks

When this function is called, the display miniport driver should prepare all kernel-mode resources that it needs to support a Miracast connected session.

Synchronization

The operating system groups the DxgkDdiMiracastCreateContext, DxgkDdiMiracastDestroyContext, and DxgkDdiMiracastIoControl functions as a Miracast class. The operating system guarantees that these functions follow the second-level synchronization mode as defined in Threading and Synchronization Second Level. These functions can be called when other level 0, 1, or other classes of level 2 functions are being called on another thread context. However, only one of these level 2 Miracast-class functions can be called at a time.

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Header

Dispmprt.h (include Dispmprt.h)

IRQL

PASSIVE_LEVEL

See also

DXGK_MIRACAST_DISPLAY_CALLBACKS
DxgkDdiAddDevice
DxgkDdiQueryChildRelations

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft