Microsoft DirectX 8.1 (C++) |
Microsoft® DirectPlay® generates a DPL_MSGID_DISCONNECT message when a lobby client disconnects from a lobbied application through the IDirectPlay8LobbyClient::ReleaseApplication method.
The DPL_MESSAGE_DISCONNECT structure contains information for the DPL_MSGID_DISCONNECT system message.
typedef struct _DPL_MESSAGE_DISCONNECT{ DWORD dwSize; DPNHANDLE hDisconnectId; HRESULT hrReason; PVOID pvConnectionContext; } DPL_MESSAGE_DISCONNECT, *PDPL_MESSAGE_DISCONNECT;
Return DPN_OK.
For lobbied applications, the context value is set through the pvConnectionContext member of the DPL_MESSAGE_CONNECT message structure. When your message handler receives this message, whatever you set this member to before returning will be the context value for that connection.
For lobby clients, the pvConnectionContext parameter in the IDirectPlay8LobbyClient::ConnectApplication method will be used as the connection's context value if the connection is successful.
Context values are not shared between lobby client and lobbied application. For example, if you set your context value for a lobby connection in your IDirectPlay8LobbyClient interface to pointer A and in your IDirectPlay8LobbiedApplication interface you set it to pointer B, indications in your IDirectPlay8LobbyClient interface will have pointer A as their context value and in your IDirectPlay8LobbiedApplication interface pointer B will be the context value.
You can also set your context values to NULL if you do not want to use this feature.
Windows NT/2000/XP: Available as a redistributable for Windows 2000 and later.
Windows 98/Me: Available as a redistributable for Windows 98 and later.
Header: Declared in Dplobby8.h.