?/TD>
Microsoft DirectX 9.0

DPL_MSGID_RECEIVE Message


Microsoft?DirectPlay?generates the DPL_MSGID_RECEIVE message when the target receives a message sent by the IDirectPlay8LobbyClient::Send or IDirectPlay8LobbiedApplication::Send method.

The DPL_MESSAGE_RECEIVE structure contains information for the DPL_MSGID_RECEIVE system message.

Syntax

typedef struct _DPL_MESSAGE_RECEIVE {
    DWORD dwSize;
    DPNHANDLE hSender;
    BYTE *pBuffer;
    DWORD dwBufferSize;
    PVOID pvConnectionContext;
}  DPL_MESSAGE_RECEIVE, *PDPL_MESSAGE_RECEIVE;

Members

dwSize
Size of the DPL_MESSAGE_RECEIVE message structure. The application must set this member before it uses the structure.
hSender
Handle of the client that sent the message.
pBuffer
Pointer to message data.
dwBufferSize
Size of the message data contained in the pBuffer.
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 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


© 2002 Microsoft Corporation. All rights reserved.