IDirectPlayLobby3::ReceiveLobbyMessage
The IDirectPlayLobby3::ReceiveLobbyMessage method 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 0.
- 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 0. This ID number is obtained by using the IDirectPlayLobby3::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:
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in dplobby.h.
Import Library: Use dplayx.lib.
See Also
IDirectPlayLobby3::RunApplication, IDirectPlayLobby3::SendLobbyMessage