Skip to main content
GameDev.net gamedev.net
🔒 Locked

DirectPlay8's Enumhosts function freeze

Started by BigBeginner Oct 19, 2005 at 5:12 AM 1 replies 450+ views
Original Post
BigBeginner
BigBeginner
Hi, I'm programming with DirectPlay8 a server/client game. The server creating is succesfull, but when I try to ennumerate the available servers on LAN, the "Enumhost" dies. Never return. The code: Desc.dwSize:= SizeOf(Desc); Desc.guidApplication:= InitedRec.MyGUID; DClient.EnumHosts (Desc, nil, DAddress[0], nil, 0, 0, // enumcount 0, 0, nil, nil, DPNENUMHOSTS_SYNC); It's an delphi code, I hope the C++ programmers will understand it. The NIL means NULL (0). So what can be the matter?
_winterdyne_
_winterdyne_
Without knowing your initialisation states this:

dwTimeOut
[in] Variable of type DWORD that specifies the number of milliseconds that DirectPlay will wait for replies after the last enumeration is sent. Set this parameter to zero to use the default value. You can obtain the default value for dwTimeOut by calling IDirectPlay8Client::GetSPCaps If INFINITE is specified, the enumeration continues until it is canceled.

Might be your culprit.

Look at the documentation on msdn at:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dx81_c/directx_cpp/Play/CPP_Ref/Ifaces/IDirectPlay8Client/idirectplay8client_enumhosts.asp

Winterdyne Solutions Ltd is recruiting - this thread for details!
BigBeginner
BigBeginner
Yes, it worked, just I had to do the asynchronus enumeration. Thanx

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.