从本地系统使用COM类 [英] Use Com class from LocalSystem

查看:208
本文介绍了从本地系统使用COM类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的COM对象。 COM服务器应采用运行作为一个特定的帐户Windows服务。但在这个帐户下运行时,它无法加载融为一体,给我这样的例外:创建COM组件的实例从的IClassFactory CLSID {36998A63-857C-4​​B87-BC5E-72B7B3573F80}失败,原因是以下错误:80010105

I'm using a Com object. The com server should be used from a Windows service running as a specific account. But when running in this account it can't load the com, giving me this exception: Creating an instance of the COM component with CLSID {36998A63-857C-4B87-BC5E-72B7B3573F80} from the IClassFactory failed due to the following error: 80010105.

我试图改变帐户本地系统,仍然失败,但改变Windows服务作为我自己的帐户的作品进行登录。

I tried changing the account to LocalSystem, that still fails, but changing the Windows service to log on as my own account works.

我想它必须与被安装在我的帐户中的COM服务器。我用这是name.exe / REGSERVER安装COM。我试图运行命令,本地系统和它然后用断言失败。我没有code,所以我不知道问题出在哪里,有没有允许我应该检查? 我也试着开关嵌入互操作类型在Visual Studio。

I guess it has to do with the com server being installed on my account. I install the com using "it's name.exe /regserver". I tried running the command as LocalSystem and it then fails with an assert. I don't have the code, so I don't know where the problem is, is there a permission I should should check? I also tried switching embed interop type in Visual Studio.

任何帮助吗?

推荐答案

您所看到的错误是 RPC_E_SERVERFAULT ,这意味着出现了一个未处理的win32异常(如:也许访问冲突)的进程外的COM服务器。如果你既没有源$ C ​​$ C也不对COM服务器调试符号,你不可能能够诊断这个或者修复它自己。 (编辑:除非它的东西很明显,如位数的在64位机:-)不匹配)

The error you are seeing is RPC_E_SERVERFAULT, which means that there has been a unhandled Win32 exception (e.g. perhaps an access violation) in the out-of-process COM server. If you have neither source code nor debug symbols for the COM server, you're unlikely to be able to diagnose this or fix it yourself. ( Unless it's something obvious like a mismatch of "bitness" on a 64-bit machine :-))

选项:

  • 如果您应该能够激活 服务器并消耗其COM 在的上下文对象的 服务的帐户,那么您需要 提出这一带的供应商 服务器,让他们来诊断和 修好它;
  • 您可以使用DCOMCNFG.EXE(身份 标签)来配置COM服务器 根据你的身份运行,而不是 默认值(即启动用户),看看这是否避免了断层问题(它的声音从你说的话,它可能会)。
  • if you ought to be able to activate the server and consume its COM objects in the context of your service's account, then you will need to raise this with the vendor of the server and get them to diagnose and fix it;
  • you can use DCOMCNFG.EXE (Identity tab) to configure the COM server to run under your identity instead of the default (which is "the launching user"), and see whether this avoids the faulting problem (it sounds from what you say that it probably will).

这篇关于从本地系统使用COM类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆