Cannot Create ActiveX Component -- in a service

Hello,

I'm having an issue concering the CreateObject method and a service I've been developing. I've written a DLL that executes the statement:

CreateObject("CognosImpromptu.Application")

When I reference this DLL through a regular app this statement executes easily and the rest of the function completes. However when I reference this DLL from a service running under a domain account I get the error "Cannot create ActiveX component." The domain account has been given Full Controll permissions over the executable (ImpAdmin.exe). What could be the problem here?

Thank you in advance for any help.

[632 byte] By [larthur1022] at [2008-2-10]
# 1

What you can do is use RegMon to verify that you are able to get to the registry information for the component. If the component is registered under HKCU instead of HKLM you will not be able to locate the registry entries when your service runs.

BTW, rNormaly you don't want to use CreateObject as opposed to using imports and project references. Althouth you may have a good reason for using Create Object you should ask yourself if there is a need to do this.

Good luck

DougStoltz at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic Interop and Upgrade...