Microsoft DirectX 8.1 (C++)

DPL_MSGID_CONNECTION_SETTINGS

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

DPL_MESSAGE_CONNECTION_SETTINGS

The DPL_MESSAGE_CONNECTION_SETTINGS structure is passed with the DPL_MSGID_CONNECTION_SETTINGS message.

typedef struct _DPL_MESSAGE_CONNECTION_SETTINGS{
    DWORD               dwSize;
    DPNHANDLE           hSender;
    PDPL_CONNECTION_SETTINGS   pdplConnectionSettings;
    PVOID               pvConnectionContext
} DPL_MESSAGE_CONNECTION_SETTINGS, *PDPL_MESSAGE_CONNECTION_SETTINGS;
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 for 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.

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.