Rediger

Del via


WFDDisplaySinkStart function

Performs the necessary initialization to allow the calling app to become a Miracast display sink. Your app should call this once on startup.

Syntax

DWORD WINAPI WFDStartDisplaySink(
  _In_     USHORT                                 uDeviceCategory,
  _In_     USHORT                                 uSubCategory,
  _In_opt_ PVOID                                  pCallbackContext,
  _In_     WFD_DISPLAY_SINK_NOTIFICATION_CALLBACK *pfnCallback
);

Parameters

uDeviceCategory [in]

The device category.

uSubCategory [in]

The device subcategory.

pCallbackContext [in, optional]

An optional context pointer which is passed to the callback function specified in the pfnCallback parameter.

pfnCallback [in]

A pointer to the callback function to be called whenever there is a notification for the app. Notifications that can be sent are described in WFD_DISPLAY_SINK_NOTIFICATION_CALLBACK.

Return value

If the function succeeds, the return value is ERROR_SUCCESS.

If the function fails, the return value may be one of the following return codes.

Return code Description
ERROR_NOT_SUPPORTED
The display sink is not supported on this hardware.

 

Remarks

This function performs the following tasks:

  • Makes the PC discoverable
  • Sets the P2P device info to reflect the category and sub category specified
  • Sets the Miracast IEs on all Wi-Fi Direct frames with the device type as the sink
  • Registers the specified callback to be invoked whenever there is an incoming connection

Requirements

Requirement Value
Minimum supported client
Windows 8.1 [desktop apps only]
Minimum supported server
Windows Server 2012 R2 [desktop apps only]
End of client support
Windows 10
End of server support
Windows Server 2016
Header
Wfdsink.h
Library
Wifidisplay.lib
DLL
Wifidisplay.dll

See also

WFD_DISPLAY_SINK_NOTIFICATION_CALLBACK