Problem with creating a component
-
Hi all, I've created a simple COM component using ATL and itz registered also.When i tried to create the component using CoCreateInstance i get a HRESULT which tells that "0x80040111 ClassFactory cannot supply requested class ". There is only one instance of the component present in the registry and the CLSID,Interface ID everything i passed to the COCreateInstance are correct but still the problem is not over. Any help would be greatly apppreciated.Thanks in advance. Regards, Rajeev
-
Hi all, I've created a simple COM component using ATL and itz registered also.When i tried to create the component using CoCreateInstance i get a HRESULT which tells that "0x80040111 ClassFactory cannot supply requested class ". There is only one instance of the component present in the registry and the CLSID,Interface ID everything i passed to the COCreateInstance are correct but still the problem is not over. Any help would be greatly apppreciated.Thanks in advance. Regards, Rajeev
Try to load the component using OLEVIEW tool. Also try to post the
CoCreateInstance
code snippet. :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
-
Try to load the component using OLEVIEW tool. Also try to post the
CoCreateInstance
code snippet. :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
CLSID aclsid; //interface to be created IMIConverter *m_pToConverter = NULL; aIUnknown = NULL; HRESULT hr; //this step also gets the correct class ID hr = CLSIDFromProgID(L"MITFConverter.MIConverter",&aclsid); // This HRESULT gives the problem hr=CoCreateInstance(aclsid,NULL,CLSCTX_ALL,IID_IMIConverter,(void**)&m_pToConverter); Thanks for your help
-
CLSID aclsid; //interface to be created IMIConverter *m_pToConverter = NULL; aIUnknown = NULL; HRESULT hr; //this step also gets the correct class ID hr = CLSIDFromProgID(L"MITFConverter.MIConverter",&aclsid); // This HRESULT gives the problem hr=CoCreateInstance(aclsid,NULL,CLSCTX_ALL,IID_IMIConverter,(void**)&m_pToConverter); Thanks for your help
Have you made an attempt (to load the Component) with OLEVIEW? The
hr
value you reported shouldn't happen since MSDN reportsS_OK
,REGDB_E_CLASSNOTREG
orCLASS_E_NOAGGREGATION
as possible return values. You can also try to useCoGetClassObject
and then callCreateInstance
on the (hopefully) obtained class factory pointer to see what is happening. :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
-
Have you made an attempt (to load the Component) with OLEVIEW? The
hr
value you reported shouldn't happen since MSDN reportsS_OK
,REGDB_E_CLASSNOTREG
orCLASS_E_NOAGGREGATION
as possible return values. You can also try to useCoGetClassObject
and then callCreateInstance
on the (hopefully) obtained class factory pointer to see what is happening. :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
Hi, When i tried to load the component using OLE view it displays an MK_E_INVALIDEXTENSION error. I tried calling CoGetClassObject but the return is always the same (Class Factory cannot supply the requested class).I'm Totally lost :(( Is there Anything else that i can try?? Thanks for your help
-
Hi, When i tried to load the component using OLE view it displays an MK_E_INVALIDEXTENSION error. I tried calling CoGetClassObject but the return is always the same (Class Factory cannot supply the requested class).I'm Totally lost :(( Is there Anything else that i can try?? Thanks for your help
as you can easily find here [^],
CoGetClassObject
cannot return such ahr
value, hence I suggest to you to check well your code. can you post the hexadecimal value of the returnedhr
? :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
-
as you can easily find here [^],
CoGetClassObject
cannot return such ahr
value, hence I suggest to you to check well your code. can you post the hexadecimal value of the returnedhr
? :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
-
It seems something went wrong during registration. I'm sorry I cannot help you with this.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
-
It seems something went wrong during registration. I'm sorry I cannot help you with this.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.