DPL_MSGID_CONNECTION_SETTINGS Message

DirectPlay

 
Microsoft DirectX 9.0 SDK Update (Summer 2003)

DPL_MSGID_CONNECTION_SETTINGS Message


The DPL_MSGID_CONNECTION_SETTINGS message is sent from the lobby client to the lobby application when IDirectPlay8LobbyClient::SetConnectionSettings is called. It is also sent from the lobby application to the lobby client when IDirectPlay8LobbiedApplication::SetConnectionSettings is called.

The DPL_MESSAGE_CONNECTION_SETTINGS structure is passed with the DPL_MSGID_CONNECTION_SETTINGS message.

Syntax

typedef struct _DPL_MESSAGE_CONNECTION_SETTINGS {
    DWORD dwSize;
    DPNHANDLE hSender;
    PDPL_CONNECTION_SETTINGS pdplConnectionSettings;
    PVOID pvConnectionContext;
}  DPL_MESSAGE_CONNECTION_SETTINGS, *PDPL_MESSAGE_CONNECTION_SETTINGS;

Members

dwSize
Contains the size of the DPL_MESSAGE_CONNECTION_SETTINGS structure. It should be set to sizeof( DPL_MESSAGE_CONNECTION_SETTINGS ).
hSender
Contains the handle to the connection that sent this message.
pdplConnectionSettings
Contains a pointer to a DPL_CONNECTION_SETTINGS structure describing the connection settings for the specified connection.
pvConnectionContext
Pointer to a context value that has been set for the connection.

Remarks

Return from the message callback function with DPN_OK.

The contents of the message are valid only for the duration of the message callback. Therefore, if you want to use the data contained in the message, you must make a copy before returning. In addition, if you want to use the addressing objects you must call AddRef on each address to ensure you retain a reference.

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 the 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

© 2003 Microsoft Corporation. All rights reserved.