Microsoft DirectX 8.1 (C++)

DPL_MSGID_RECEIVE

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

DPL_MESSAGE_RECEIVE

The DPL_MESSAGE_RECEIVE structure contains information for the DPL_MSGID_RECEIVE system message.

typedef struct _DPL_MESSAGE_RECEIVE{
    DWORD     dwSize;
    DPNHANDLE hSender;
    BYTE*     pBuffer;
    DWORD     dwBufferSize;
    PVOID     pvConnectionContext;
} DPL_MESSAGE_RECEIVE, *PDPL_MESSAGE_RECEIVE;
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 member.
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.