Sign in to follow this  
Brian Perry

DP8 & CoUninitialize()

Recommended Posts

Brian Perry    122
Hi - I've seen other references to this problem but no definitive resolution, so I hope someone can shed some light. I have an isolated LAN with 10 systems running WinXP Pro SP1 and DX9 (a mix of b and c releases). I have a full-screen Peer-to-Peer application using DirectPlay8 interfaces, written in C using VC++ 6.0. Except for the host CPU, all the systems run identical software. When shutting down the application, on one of the systems DP hangs in CoUninitialize(). (It happens to be a 9.0c machine, but another 9.0c system works OK.) I have done enough experimenting to demonstrate that on this machine CoUninitialize() will complete OK until I've done some other DP-related post-initialization operation such as EnumHosts() or Connect(). It doesn't seem to matter whether I run single- or multi-threaded, debug or release. I can provide more detail if necessary, but I'm hoping someone can help me figure out how to fix this. As an aside, what is the impact if I simply skip CoUninitialize()? Many thanks!

Share this post


Link to post
Share on other sites
Evil Steve    2017
Quote:
Original post by Brian Perry
As an aside, what is the impact if I simply skip CoUninitialize()?
COM will be shut down when your app exits. Although, if your app is hanging in CoUninitialize(), then your app will probably hang just before it exits.

Share this post


Link to post
Share on other sites
Brian Perry    122
Thanks for the info, E.S.! We've tried skipping the CoUninit and things seem OK - we drop back to the desktop and Windows ops seem normal. Under a typical-usage scenario for our application, a system shutdown would follow an application exit, but we can't guarantee it...if the user doesn't re-boot, do you know if there's any other implications to such an "unclean" exit? Or can I assume that if I'm back at the desktop, a sufficiently clean exit has occurred?

Many thanks again...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this