I wrote an assembly in C# and I needed to invoke a method on the DLL from a VB6.0 application.
I made the DLL COM compliant and registered the DLL accordingly. From my VB application I would then instantiate the class in the .NET assembly using the VB6.0 CreateObject
method.
Set dotNetObj = CreateObject("Namespace.ClassName")
I would then be able to invoke any method on that class.
The Problem:
All worked fine, until I tried executing the code on a Vista machine. Whenever I execute the exe it works fine, but whenever the exe is executed using the 'run as administrator' option the following error appears:
"ActiveX component can`t create object."
I need this EXE to run in admin mode, else certain areas of the legacy system won't work.
Any ideas on why the CreateObject
would not work in admin mode?