Starts an application and passes to it all the information necessary to connect it to a session. This method is used by a lobby client.
HRESULT RunApplication(
DWORD dwFlags,
LPDWORD lpdwAppID,
LPDPLCONNECTION lpConn,
HANDLE hReceiveEvent
);
Returns DP_OK if successful, or one of the following error values otherwise:
This method will return after the application process has been created. The lobby client will receive a system message indicating the status of the application. If the lobby client is starting an application that will be hosting a session, it should wait until it receives a DPLSYS_DPLAYCONNECTSUCCEEDED system message before starting the other applications that will be joining the session. If the application was unable to create or join a session, a DPLSYS_DPLAYCONNECTFAILED message will be generated. The lobby client will also receive a DPLSYS_CONNECTIONSETTINGSREAD system message when the application has read the connection settings and a DPLSYS_APPTERMINATED system message when the application terminates.
It is important that the lobby client not release its IDirectPlayLobby2 Interface interface before it receives a DPLSYS_CONNECTIONSETTINGSREAD system message. The lobby client can either check IDirectPlayLobby2::ReceiveLobbyMessage in a loop until it is received, or supply a synchronization event.
IDirectPlayLobby2::ReceiveLobbyMessage, IDirectPlayLobby2::GetConnectionSettings, IDirectPlayLobby2::SetLobbyMessageEvent
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.