Microsoft DirectX 9.0 SDK Update (Summer 2003) |
DPL_MSGID_DISCONNECT Message
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.
Syntax
typedef struct _DPL_MESSAGE_DISCONNECT { DWORD dwSize; DPNHANDLE hDisconnectId; HRESULT hrReason; PVOID pvConnectionContext; } DPL_MESSAGE_DISCONNECT, *PDPL_MESSAGE_DISCONNECT;
Members
- dwSize
- Size of the DPL_MESSAGE_DISCONNECT message structure. The application must set this member before it uses the structure.
- hDisconnectId
- Handle specifying the disconnection identifier (ID).
- hrReason
- Reason for the disconnection.
- DPN_OK
- It was a standard disconnection.
- DPNERR_CONNECTIONLOST
- This will be set if the process running the client or application exited abnormally.
- pvConnectionContext
- Context value that has been set for the connection.
Remarks
Return from the message callback function with DPN_OK.
For lobbied applications, the context value is set through the pvConnectionContext member of the DPL_MESSAGE_CONNECT 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.
Message Information
Header dplobby8.h Minimum operating systems Windows 98, Pocket PC 2002