?/TD>
Microsoft DirectX 9.0

DPL_MSGID_SESSION_STATUS Message


Microsoft?DirectPlay?generates the DPL_MSGID_SESSION_STATUS message when the session has been updated with a call to the IDirectPlay8LobbiedApplication::UpdateStatus method.

The DPL_MESSAGE_SESSION_STATUS structure contains the information for the DPL_MSGID_SESSION_STATUS system message.

Syntax

typedef struct _DPL_MESSAGE_SESSION_STATUS {
    DWORD dwSize;
    DPNHANDLE hSender;
    DWORD dwStatus;
    PVOID pvConnectionContext;
}  DPL_MESSAGE_SESSION_STATUS, *PDPL_MESSAGE_SESSION_STATUS;

Members

dwSize
Size of the DPL_MESSAGE_SESSION_STATUS message structure. The application must set this member before it uses the structure.
hSender
The handle of the application that sent the status update message.
dwStatus
Updated status of the session. This member can be set to one of the following values.
DPLSESSION_CONNECTED
The lobbied application is currently connected to a session.
DPLSESSION_COULDNOTCONNECT
The lobbied application could not connect to the session.
DPLSESSION_DISCONNECTED
The lobbied application is currently disconnected from the session.
DPLSESSION_TERMINATED
The connection between session host and the lobbied application has been terminated.
DPLSESSION_HOSTMIGRATED
The host of a peer-to-peer session has migrated. The local client is not the new host.
DPLSESSION_HOSTMIGRATEDHERE
The host of a peer-to-peer session has migrated. The local client is the new host.
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

Headerdplobby8.h
Minimum operating systems Windows 98, Pocket PC 2002


© 2002 Microsoft Corporation. All rights reserved.