Need help with Direct Play

Started by
2 comments, last by Corillian 22 years, 8 months ago
I am having some problems with unhandled exceptions with Direct Play and memory leaks. I initialize DP at the startup of my game (no probs here). If I exit the game without trying to connect then there are unhandled exceptions with releasing the DP object, local address device, and host address device. If I exit the game during a connection attempt or while it's connected I get unhandled exceptions and a bunch of assembler spit out at me. Here is my destructor code: if( dpClient && connected == true) { // Close our connection dpClient->Close(0); // Release the DirectPlay object } CloseHandle( ConnectCompleteEvent ); SAFE_RELEASE( dpClient ); //unhandled exception if not connected SAFE_RELEASE( device_address ); //same as dpClient SAFE_RELEASE( host_address ); //same as dpClient Here are some of the assertion errors that show up in the debug console: COMMON:0:fff77bef:fff78a53:************************************************************ COMMON:0:fff77bef:fff78a53:ASSERTION FAILED! File: d:\nt_chk\multimedia\directx\dplay\dnet\common\fpm.cpp Line: 214: 0 COMMON:0:fff77bef:fff78a53:************************************************************ COMMON:0:fff77bef:fff78a53:************************************************************ COMMON:0:fff77bef:fff78a53:ASSERTION FAILED! File: d:\nt_chk\multimedia\directx\dplay\dnet\common\fpm.cpp Line: 214: 0 COMMON:0:fff77bef:fff78a53:************************************************************ COMMON:0:fff77bef:fff78a53:DirectPlay8 memory leak detected! ( #1 of 8 )68 bytes leaked at address 0x04a0fb10! Any help would be appreciated, thanks. -Corillian Edited by - Corillian on August 5, 2001 1:45:11 PM
Advertisement
it''s not too late to use winsock2 >

dplay is helplessly bloated imo.
It''s only as bloated as you make it.

Anywayz, from the source you posted I''m assuming you''re using DPlay 8.

Have you looked at the sample source included with the SDK?

You should follow that source and see how it works and then implement it into your project.

Ben

Icarus Independent

Jump Down The Rabbithole
Yes I did look at the source. I implemented it almost the exact same as it is in the book. I have no clue what it could be. It used to work fine. I havn''t changed anything in the destructor or construction code and all the sudden DP started wacking out.

This topic is closed to new replies.

Advertisement