WFD_OPEN_SESSION_COMPLETE_CALLBACK callback function
The WFD_OPEN_SESSION_COMPLETE_CALLBACK function defines the callback function that is called by the WFDStartOpenSession function when the WFDStartOpenSession operation completes.
VOID CALLBACK WFD_OPEN_SESSION_COMPLETE_CALLBACK( _In_ PHANDLE hSessionHandle, _In_ PVOID pvContext, _In_ GUID guidSessionInterface, _In_ DWORD dwError, _In_ DWORD dwReasonCode );
- hSessionHandle [in]
A session handle to a Wi-Fi Direct session. This is a session handle previously returned by the WFDStartOpenSession function.
- pvContext [in]
An context pointer passed to the callback function from the WFDStartOpenSession function.
- guidSessionInterface [in]
The interface GUID of the local network interface on which this Wi-Fi Direct device has an open session. This parameter is useful if higher-layer protocols need to determine which network interface a Wi-Fi Direct session is bound to. This value is only returned if the dwError parameter is ERROR_SUCCESS.
- dwError [in]
A value that specifies whether there was an error encountered during the call to the WFDStartOpenSession function. If this value is ERROR_SUCCESS, then no error occurred and the operation to open the session completed successfully.
The following other values are possible:
- dwReasonCode [in]
A value that specifies the more detail if an error occurred during WFDStartOpenSession.
This callback function does not return a value.
The WFD_OPEN_SESSION_COMPLETE_CALLBACK function is part of Wi-Fi Direct, a new feature in Windows 8 and Windows Server 2012. Wi-Fi Direct is based on the development of the Wi-Fi Peer-to-Peer Technical Specification v1.1 by the Wi-Fi Alliance (see Wi-Fi Alliance Published Specifications). The goal of the Wi-Fi Peer-to-Peer Technical Specification is to provide a solution for Wi-Fi device-to-device connectivity without the need for either a Wireless Access Point (wireless AP) to setup the connection or the use of the existing Wi-Fi adhoc (IBSS) mechanism.
The WFDStartOpenSession function starts an asynchronous operation to start an on-demand connection to a specific Wi-Fi Direct device. The target Wi-Fi device must previously have been paired through the Windows Pairing experience. When the asynchronous operation to make the Wi-FI Direct connection completes, the callback function specified in the pfnCallback parameter is called.
Minimum supported client
|Windows 8 [desktop apps only]|
Minimum supported server
|Windows Server 2012 [desktop apps only]|