Microsoft DirectX 9.0 SDK Update (Summer 2003) |
Registering a Lobbyable Application
A lobbyable application must be registered before it can be lobby launched. This registration needs to be done only once and is typically handled by the application's setup procedure. Do not attempt to modify the registry directly to register an application as lobbyable. Instead, do the following:
- Call CoCreateInstance to create a lobbied application object (CLSID_DirectPlay8LobbiedApplication). Set the riid parameter to IID_IDirectPlay8LobbiedApplication to request an IDirectPlay8LobbiedApplication interface.
- Call IDirectPlay8LobbiedApplication::RegisterProgram.This method takes the information and creates appropriate registry keys and values.
You must provide IDirectPlay8LobbiedApplication::RegisterProgram with a variety of information, including the following:
- A globally unique identifier (GUID) that is used to identify the application.
- A friendly name for the application.
- The location and name of the application's executable file.
- The location and name of an optional launcher application.
- Any command-line arguments that need to be passed to the executable file when it is launched.
Instead of launching the game application, Microsoft® DirectPlay® launches a launcher application. The launcher application then launches the game. Launcher applications can be used, for example, as an anti-piracy measure.
To unregister a registered program, call IDirectPlay8LobbiedApplication::UnRegisterProgram. This method removes the registry entries created by IDirectPlay8LobbiedApplication::RegisterProgram.