EXE免费注册COM错误 [英] Registration Free COM errors with EXE

查看:105
本文介绍了EXE免费注册COM错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用EXE公开的COM功能。我已经使用Visual Studio 2010(在Windows7 / x64计算机上)创建了一个C#项目,并添加了对该EXE的引用,然后将Isolated标志设置为true。构建解决方案时,对于它公开的每个类都会出错。

I'm trying to use COM functions exposed by an EXE. I've created a C# project using Visual Studio 2010 (on a windows7/x64 machine) and added the reference to that EXE, then set the Isolated flag to true. When I build the solution, I get errors for each of the classes that it exposes.


问题隔离COM参考'FNCClient11Lib':注册表

'HKEY_CURRENT_USER\SOFTWARE\CLASSES\CLSID {e49b30c9-6d7e-48f5-91da-f2f0414c6a13} \InProcServer32'
缺少值'((默认)')。

Problem isolating COM reference 'FNCClient11Lib': Registry key 'HKEY_CURRENT_USER\SOFTWARE\CLASSES\CLSID{e49b30c9-6d7e-48f5-91da-f2f0414c6a13}\InProcServer32' is missing value '(Default)'.

这些条目在该位置的注册表中不存在,但确实存在于此(下)

These entries don't exist in the registry in that location but DO exist here (below)


HKEY_CURRENT_USER\软件\类\Wow6432Node\CLSID {E49B30C9-6D7E-48F5-91DA-F2F0414C6A13}

HKEY_CURRENT_USER\Software\Classes\Wow6432Node\CLSID{E49B30C9-6D7E-48F5-91DA-F2F0414C6A13}




  • 在构建时有什么方法可以将其指向注册表中的正确位置吗?

  • 我可以引用EXE吗?到目前为止,我所看到的所有示例都仅引用DLL。

  • 推荐答案

    类型库包含在COM界面中标记为不可创建的类。您可以通过使用OLE / COM Viewer(以Admin身份),导航到导致问题的类型库,将其打开并查找CoClass定义来进行检查。如果使用报告的uuid的那个被声明为不可创建的,那么您就知道了。另外,在VS对象浏览器中,这些类不会在接口中公开构造函数。

    This problem occurs when the type library contains classes that are marked as 'uncreatable' in the COM interface. You can check this by using the OLE/COM Viewer (as Admin), navigating to the type library that causes the problem, opening it and look up the CoClass definitions. If the one using the reported uuid is declared 'uncreatable', you got it. Also, in the VS object browser, these clases don't expose a constructor in the interface.

    我的解决方案是使用这些类的公共构造函数重建COM组件。

    My solution was to rebuild the COM component with a public constructor for these classes but of course this is only possible if you have the sources.

    最后,虽然还有其他原因导致这种症状,但是...

    Finally, there may be other reasons for this symptom though ...

    这篇关于EXE免费注册COM错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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