.NET 3.5 ActiveX dll InteropServices.COMException

chr*_*isg 3 interop activex .net-3.5

使用vs2008 .NET 3.5 SP1

我试图在我的c#控制台应用程序项目中使用ActiveX DLL,我得到此运行时异常:

System.Runtime.InteropServices.COMException (0x800702E4): Retrieving the COM class factory for component with CLSID {4E58088E-7275-4EAA-8958-A9CCC971DDE9} failed due to the following error: 800702e4.
Run Code Online (Sandbox Code Playgroud)

我如何找到解决此问题的方法?

我以前使用regasm.exe注册到DLL并成功注册.

DLL的名称是 interop.sterling.dll

简单代码:

using SterlingLib;

  public class OrderPlacer
    {
    private void SendOrder()
        {
            var order = new SterlingLib.STIOrder();
        }
}
Run Code Online (Sandbox Code Playgroud)

我通过浏览并添加它作为参考添加了对此DLL的引用 - 然后放入该/bin/debug文件夹

使用反射:

SterlingLib.STIOrderClass is a class whose base class is System.__ComObject
     It implements the following interfaces
         SterlingLib.ISTIOrder
         SterlingLib.STIOrder

SterlingLib.STIOrder is an interface
Run Code Online (Sandbox Code Playgroud)

我正在运行Vista所以我认为这可能是一个UAC问题,不允许完全权限,就像我运行XP时那样.

Pet*_*aer 6

0x800702e4建议必须使用提升的权限运行该进程.