注册免费COM与exe,创建外部清单的问题。 [英] Registration Free COM with exe, issues creating external manifest.

查看:61
本文介绍了注册免费COM与exe,创建外部清单的问题。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用本指南通过免注册COM创建清单文件以运行我的应用程序:"COM组件的免注册激活:演练(https://msdn.microsoft.com/en- us / library / ms973913.aspx)"。

I am trying to create manifest files to run my application via registration free COM with this guide: "Registration-Free Activation of COM Components: A Walkthrough (https://msdn.microsoft.com/en-us/library/ms973913.aspx)".

我的客户端应用程序名为client.exe,它是用C#编写的。 com应用程序名为Afgrow.exe,它的类型库文件名为afgrow.tlb。

My Client application is called client.exe and it was written in C#. The com application is called Afgrow.exe, and it's type library file is called afgrow.tlb.

这是client.exe.manifest的清单:

Here is the manifest for client.exe.manifest:

这是afgrow.X.manifest的清单:

Here is the manifest for afgrow.X.manifest:

我得到的错误是:

无法将'System .__ ComObject'类型的COM对象强制转换为接口类型'Afgrow.Application'。此操作失败,因为对于具有IID'{89909562-009C-11D2-BAAF-00A02479A4BC}的接口的COM组件的QueryInterface调用由于
跟随错误而失败:不支持此类接口(HRESULT异常:0x80004002 (E_NOINTERFACE))。

Unable to cast COM object of type 'System.__ComObject' to interface type 'Afgrow.Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{89909562-009C-11D2-BAAF-00A02479A4BC}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

我尝试了一些不同的东西,比如我读了另一篇文章说我应该包括< comInterfaceProxyStub>有相关信息,并省略< file />标签因为我的com服务器是COM自动化服务器(exe)。

I have tried a few different things, such as I read another post that said I should include <comInterfaceProxyStub> with relevant information, and omit the <file/> tags because my com server is a COM automation server (exe).

无论我做什么,错误信息都是不变的。我甚至尝试过不使用任何清单并得到同样的错误。 

No matter what I do, the error message is unchanging. I even tried using no manifest whatsoever and get the same error. 

谢谢,

Jimmy

推荐答案

如果您所写的内容是正确的,那么免注册的COM将无效。免注册COM仅适用于DLL(进程中)服务器。使用免注册COM,无法激活可执行(进程外)服务器。
If what you wrote there is correct, then registration free COM will not work. Registration free COM only works for DLL (in process) servers. Executable (out of process) servers are not activatable using registration free COM.


这篇关于注册免费COM与exe,创建外部清单的问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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