Microsoft DirectX 8.1 (C++)

DPL_MSGID_DISCONNECT

Microsoft® DirectPlay® generates a DPL_MSGID_DISCONNECT message when a lobby client disconnects from a lobbied application through the IDirectPlay8LobbyClient::ReleaseApplication method.

DPL_MESSAGE_DISCONNECT

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;
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 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.

Return Values

Return DPN_OK.

Remarks

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.

Requirements

  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.