Advertisement

CoUninitialize() hangs

Started by March 02, 2003 12:50 PM
-1 comments, last by Sam Gamgee 21 years, 11 months ago
Hi, I'm having trouble with the CoUninitialize() procedure with DirectPlay. Whenever I call it, my app hangs and I have to use CTRL-ALT-DEL to get out of it. My network code all works fine until CoUninitialize() is called. Here is my cleanup code for directPlay:
    
void KillDP()
{
  if( g_pDP )
  {
    g_pDP->Close(0);
    g_pDP->Release();
  }
  g_pDeviceAddr->Release();
  g_pHostAddr->Release();

  g_pDP = NULL;
  g_pDeviceAddr = NULL;
  g_pHostAddr = NULL;

  // program hangs here:

  CoUninitialize();

  DPInit = false;
}
     
I don't understand why this procedure doesn't work. Perhaps someone can see what I'm doing wrong? Thanks in advance. -Sam. http://waltsgames.iwarp.com RTS3D -- a 3D Real Time Strategy game http://waltsgames.iwarp.com/rts3d.html [edited by - Sam Gamgee on March 2, 2003 2:06:13 PM]

This topic is closed to new replies.

Advertisement