使用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。
发布于 2009-10-08 17:55:14
0x800702e4建议必须以提升的权限运行该进程。
https://stackoverflow.com/questions/1539205
复制相似问题