Archived

This topic is now archived and is closed to further replies.

IDirectPlay8Client::Close() causes program to stop responding (hang)

This topic is 5477 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a problem that perhaps somebody can help me with. I have discovered that DirectPlay can be very slow at startup and at exit, but it is really bad sometimes when the client calls Close() to disconnect from the server. For two of the users, one running Win ME and the other Win XP, the application just hangs sometimes when they tries to quit. This seems to be happing most of the time when they have a very bad connection to the server, but I don't understand why the client needs to be in contact with the server to disconnect? Argh... I can't explain it any better than this, because I don't understand myself what is happening. Perhaps it's time to give up DirectPlay altogheter :/ (though it works nicely most of the time). This is the exact function where the program hangs:
  
void CDirectPlayClient::removeAll()
{
	if (mp_dpclient)
	{
		mp_dpclient->Close(0);
	}
	if (mp_dphostaddress)
	{
		mp_dphostaddress->Release();
	}
	if (mp_dpaddress)
	{
		mp_dpaddress->Release();
	}
	if (mp_dpclient)
	{
		mp_dpclient->Release();
	}
	CoUninitialize();

	clear();
}
   
clear(); just sets all pointers to NULL. My Stuff : [ Whispers in Akarra (online rpg) || L33T WAR (multiplayer game) || The Asteroid Menace (another game) ]
[edited by - Khaile on July 24, 2002 11:01:01 AM]

Share this post


Link to post
Share on other sites