DirectPlay Animated Header -- IDirectPlayLobby2::ReceiveLobbyMessage DirectPlay Animated Header -- IDirectPlayLobby2::ReceiveLobbyMessage* Microsoft DirectPlay SDK
*Index  *Topic Contents
*Previous Topic: IDirectPlayLobby2::GetConnectionSettings
*Next Topic: IDirectPlayLobby2::RunApplication


IDirectPlayLobby2::ReceiveLobbyMessage


IDirectPlayLobby2 Interface

Retrieves the message sent between a lobby client application and a DirectPlay application. Messages are queued, so there is no danger of losing data if it is not read in time.

HRESULT ReceiveLobbyMessage(
  DWORD dwFlags,
  DWORD dwAppID,
  LPDWORD lpdwMessageFlags,
  LPVOID lpData,
  LPDWORD lpdwDataSize
  );

Parameters
dwFlags
Reserved; must be zero.
dwAppID
Identifies which application's message to retrieve when called from a lobby client (that communicates with several applications). When called from an application (that communicates only with one lobby client), this parameter must be set to zero. This ID number is obtained by using the IDirectPlayLobby2::RunApplication method.
lpdwMessageFlags
Flags indicating what type of message is being returned. The default (lpdwMessageFlags = 0) indicates that the message is custom-defined by the sender. Processing of this type of message is optional. The receiver must interpret this message based on the identity of the sending application. A lobby can identify the sending application based on the GUID of the application that was launched. An application will need to identify the lobby by sending the lobby a standard message requesting an identifying GUID.
DPLMSG_STANDARD
Indicates that this is a DirectPlay-defined message. Processing of this type of message is optional.
DPLMSG_SYSTEM
Indicates that this is a DirectPlay generated system message used to inform the lobby of changes in the status of the application it launched.
lpData
Pointer to a buffer in which the message is to be written. Set this parameter to NULL to request only the size of message. The lpdwDataSize parameter will be set to the minimum size required to hold the message.
lpdwDataSize
Pointer to a variable that is initialized to the size of the buffer before calling this method. After the method returns, this parameter will be set to the size, in bytes, of the message. If the buffer was too small (DPERR_BUFFERTOOSMALL), then this parameter will be set to the minimum buffer size required.
Return Values

Returns DP_OK if successful, or one of the following error values otherwise:

DPERR_APPNOTSTARTED
DPERR_BUFFERTOOSMALL
DPERR_GENERIC
DPERR_INVALIDINTERFACE
DPERR_INVALIDOBJECT
DPERR_INVALIDPARAMS
DPERR_NOMESSAGES
DPERR_OUTOFMEMORY
See Also

IDirectPlayLobby2::RunApplication, IDirectPlayLobby2::SendLobbyMessage

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.

*Top of Page