【问题标题】:.NET 3.5 ActiveX dll InteropServices.COMException.NET 3.5 ActiveX dll InteropServices.COMException
【发布时间】:2009-10-08 17:09:30
【问题描述】:

使用 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.

我该如何解决这个问题?

我之前用regasm.exe注册过DLL,注册成功了。

DLL 的名称是interop.sterling.dll

简单代码:

using SterlingLib;

  public class OrderPlacer
    {
    private void SendOrder()
        {
            var order = new SterlingLib.STIOrder();
        }
}

我通过浏览该 DLL 并将其添加为引用添加了对该 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

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

【问题讨论】:

  • 您能否添加一些有关您正在使用的组件的详细信息,并且可能还添加导致错误的代码?
  • regasm.exe是将.net程序集注册为com,你的意思是你用的是regsvr32吗?
  • 我尝试了 regsvr32 并返回消息模块已加载但未找到入口点 DLLRegisterServer。确保 dll 是有效的 DLL

标签: .net-3.5 interop activex


【解决方案1】:

0x800702e4 表明进程必须以提升的权限运行。

猜你喜欢
  • 1970-01-01
  • 2011-02-25
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-03-06
  • 2012-06-21
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多