IDirectPlay8LobbyClient::Send Method

DirectPlay

 
Microsoft DirectX 9.0 SDK Update (Summer 2003)

IDirectPlay8LobbyClient::Send Method


Sends a message to a lobbied application that was launched by this lobby client or was connected by this lobby client.

This method sends a DPL_MSGID_RECEIVE system message to the target's message handler.

Syntax

HRESULT Send(      
    const DPNHANDLE hConnection,     BYTE *const pBuffer,     const DWORD pBufferSize,     const DWORD dwFlags );

Parameters

hConnection
[in] Variable of type DPNHANDLE that specifies the target for the message transmission. You may also specify the following flag.
DPLHANDLE_ALLCONNECTIONS
The message you have specified will be sent to all lobbied applications that are connected to your lobby client application.
pBuffer
[in] Pointer to an array of bytes that contains the message.
pBufferSize
[in] Variable of type DWORD that specifies the size of the message buffer in the pBuffer parameter, in bytes. This parameter must be at least 1 byte and no more than 64 KB.
dwFlags
[in] Reserved. Must be 0.

Return Value

Returns S_OK if successful, or one of the following error values.

DPNERR_INVALIDFLAGSThe flags passed to this method are invalid.
DPNERR_INVALIDHANDLEThe handle specified is invalid.
DPNERR_INVALIDPARAMOne or more of the parameters passed to the method are invalid.
DPNERR_SENDTOOLARGEThe buffer was too large.

Remarks

If the buffer size is larger than 64 KB, the method returns DPNERR_SENDTOOLARGE. If the buffer size is set to 0, the method returns DPNERR_INVALIDPARAM.



© 2003 Microsoft Corporation. All rights reserved.