Would CoDisconnectObject be appropriate here?
You would probably need to handle messages WM_QUERYENDSESSION and WM_ENDSESSION. Then place the call to CoDisconnectObject in the latter message's handling implementation.
It's been a while since I worked with these, but those pointers might set you...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.