程序里用线程锁CComSafeDeleteCriticalSection了吗,出错位置指向了CComSafeDeleteCriticalSection的Lock函数,出错原因好像是说在运行Lock前没有运行Init初始化函数。
HRESULT Lock()
{
// CComSafeDeleteCriticalSection::Init or CComAutoDeleteCriticalSection::Init
// not called or failed.
// m_critsec member of CComObjectRootEx is now of type
// CComAutoDeleteCriticalSection. It has to be initialized
// by calling CComObjectRootEx::_AtlInitialConstruct
ATLASSUME(m_bInitialized);
return CComCriticalSection::Lock();
}