Jump to content
  • Advertisement

Archived

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

IDirectPlay8Server::Release() brings up an access violation! :(

This topic is 5211 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 very odd problem. I am trying to make a server with direct play (version 8). I have got Initialize working, and I can call Host without a problem. I think that that is working, because my callback function is getting called with the startup messages. I can also call Close(0) without a problem. The problem is actually coming in when I try to release the IDirectPlay8Server object! I say: if (dpServ) dpServ->Release(); and get an error message that reads "Unhandled exception at 0x009xa1d9 in rollserver.exe: 0xC0000005: Access viloation reading location 0x0096a1d9." It is acting like the object has been released before. If I put a dpServ->AddRef(); line immediately before I release the object, I do not get the error. However, I''m quite sure that I am not calling release on it anywhere else. Does anyone have any ideas about this? Thanks for any help, riley

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
That''s the correct closing sequence:

IDirectPlay8Server::CancelAsyncOperation
( NULL, DPNCANCEL_ALL_OPERATIONS );
IDirectPlay8Server::Close( 0 );
IDirectPlay8Server::Release( );

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!