المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : 0x80040111 ClassFactory cannot supply requested class



C++ Programming
07-27-2010, 07:11 AM
Hello,

I am getting this error :
0x80040111 ClassFactory cannot supply requested class

I already done regsvr32 for the C++ ATL dll file.
When I check the registry, I can find the entry at HKEY_CLASSES_ROOT\CLSID.
InProcServer32 has the dll path as the default while threading model is Apartment.
I verified that there are entries in regedit for :
- clsid
- typelib
- event
- interface.

I called the CoInitialize as below :
HRESULT hr_init = ::CoInitialize(NULL); // returns S_OK
if (FAILED(hr_init))
{
return E_FAIL;
}

HRESULT hr_init2 = m_spIEventFiringObject.CreateInstance(__uuidof(EventFiringObject_OD)); // Fails here
if (FAILED(hr_init2))
{
return E_FAIL;
}

m_pIEventFiringObjectEventHandler = new IEventFiringObjectEventHandler(*this, m_spIEventFiringObject, &CManualTest::OnEventFiringObjectInvoke);

When I run debug, CWinApp::InitInstance() was successful.
It fails at _AtlModule.DllGetClassObject(rclsid, riid, ppv);

When I run the client software, it fails with ClassFactory cannot supply requested class error.
Your guidance on solving this problem is very much appreciated.

Thanks,
Goutam