I'm trying to load an ActiveX COM object into a .NET project. It uses licensing (ie FACTORY2). Things work fine on the development machine since the Design License is available. But of course I need to se the runtime license so it will load on other machines.
I'm stuck on how to set the runtime license. I have imported the COM object as an interop and create it like:
Private _myObject As MyComLib.ObjectClass
_myObject = new MyCom.ObjectClass
However without the Design License I get the error "Creating an instance of the COM component with CLSID {} from the IClassFactory failed due to the following error: 80040112"
How do I force the Interop to provide the runtime license (and use IClassFactory2?)???
The only help I've found is a page on MSDN http://support.microsof开发者_运维问答t.com/kb/326651 that imports the COM object as an Active X import (aximp). However this hasn't been successful yet so hoping there's a more straightforward way...
精彩评论