Microsoft DirectX 8.1 (C++) |
Registers a message handler function that receives notifications about changes in the state of the lobby client and receives messages from the lobby client.
HRESULT Initialize( const PVOID pvUserContext, const PFNDPNMESSAGEHANDLER pfn, DPNHANDLE *const pdpnhConnection, const DWORD dwFlags );
Returns S_OK if successful, or one of the following error values.
DPNERR_ALREADYINITIALIZED |
DPNERR_INVALIDFLAGS |
DPNERR_INVALIDPARAM |
DPNERR_NOTALLOWED |
Call this method first after using CoCreateInstance to obtain the IDirectPlay8LobbiedApplication interface.
This method automatically establishes a connection to the lobby client if you were lobby launched. If you call Initialize and you were lobby launched and the lobbied application interface is unable to contact the lobby client process, Initialize will time out after four seconds. In this case, Initialize will return DPNERR_TIMEDOUT but will still succeed.
Note Only one instance of IDirectPlay8LobbyClient and IDirectPlay8LobbiedApplication is allowed to be running for each process.
Windows NT/2000/XP: Available as a redistributable for Windows 2000 and later.
Windows 98/Me: Available as a redistributable for Windows 98 and later.
Header: Declared in Dplobby8.h.