Microsoft DirectX 8.1 (C++) |
Retrieves the local addresses being used to host the session.
HRESULT GetLocalHostAddresses( IDirectPlay8Address **const prgpAddress, DWORD *const pcAddress, const DWORD dwFlags );
Returns S_OK if successful, or one of the following error values.
DPNERR_BUFFERTOOSMALL |
DPNERR_INVALIDOBJECT |
DPNERR_INVALIDPARAM |
DPNERR_INVALIDPOINTER |
DPNERR_UNINITIALIZED |
DPNERR_NOTHOST |
The most robust way to use this method is to call it first with pcAddress set to 0. When the method returns, pcAddress will point to the correct value, and you can use that value to call the method a second time to retrieve the information.
If the caller is not the session host, the method returns DPNERR_NOTHOST. Use IDirectPlay8Peer::GetPeerAddress to retrieve the address of a remote player.
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 Dplay8.h.