Microsoft DirectX 9.0

IDirectPlay8LobbiedApplication::SetAppAvailable Method

Makes an application available or unavailable for a lobby client to connect to. This method is typically called if a lobbied application is independently launched, that is, not launched by a lobby client. Additionally, this method should be called if a game has ended and the lobbied application needs to be available to connect to a lobby client at the start of another game.


HRESULT SetAppAvailable(      

    const BOOL fAvailable,     const DWORD dwFlags );


[in] Boolean value that sets the availability of the application. Set this value to TRUE to indicate that your application is available, or to FALSE to indicate that it is not available.
[in] The following flag can be set for this method.
The default behavior for this method is to automatically mark the interface as Unavailable when the first connection is established. By specifying this flag, the interface is not automatically marked unavailable after the first connection is established, thereby allowing multiple connections.

Return Value

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

DPNERR_INVALIDOBJECTThe Microsoft?DirectPlay?object pointer is invalid.
DPNERR_UNINITIALIZEDThe requested object has not been initialized.

© 2002 Microsoft Corporation. All rights reserved.