ATL web server and smart pointers
-
Hi all, I need to access a COM object from my ATL web service. The COM object is propely registered in the target machine and can be freely accessed from a VB client. I am using smart pointer in order to create an instance. When I invoke _com_ptr_t::CreateIntance I get as HRESULT "class not registered". What was wrong? Please help me!!! best Regards, Andrea :)
-
Hi all, I need to access a COM object from my ATL web service. The COM object is propely registered in the target machine and can be freely accessed from a VB client. I am using smart pointer in order to create an instance. When I invoke _com_ptr_t::CreateIntance I get as HRESULT "class not registered". What was wrong? Please help me!!! best Regards, Andrea :)
Your client computer does not know anything about your COM object, mainly where it is located (this info is taken from the registry). I have not done it for a long time, but I recall that the correct way to create a component remotely is by using
CoCreateInstanceEx()
. Look up the MSDN, it should have enough info. -
Your client computer does not know anything about your COM object, mainly where it is located (this info is taken from the registry). I have not done it for a long time, but I recall that the correct way to create a component remotely is by using
CoCreateInstanceEx()
. Look up the MSDN, it should have enough info.Thanx a lot, I found the problem, and this could be interesting for you, too. My COM dll server was properly registered in a substituted volume (V:) that does not exists at Windows startup. For some reason this prevents the interface from being accessed in inetinfo processo. Placing my COM dll (ATL COM inproc server, by the way) in %windir%\system32 all works well. Thanks a lot for your help. Best Regards, Andrea ;)