来自C ++客户端的分层无注册表COM访问 [英] Hierarchical Registry-free COM access from C++ client

查看:93
本文介绍了来自C ++客户端的分层无注册表COM访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个C ++客户端访问一些免注册的C ++ COM DLL。



我按照这里的说明:



COM组件的免注册激活:演练 [ ^ ]



并让我的客户端工作得很好。



然而,我的并排DLL会调用很多其他COM。

这些内部COM似乎无法正常工作。



为了澄清,我有COM A和COM B.

我做我的客户端内部的CreateInstance到COM A并且它可以工作。

在COM内部有一个CoCreateInstance到COM B,这似乎不起作用。



清单文件描述了所涉及的所有COM,并且我确保正在读取清单文件(如果我故意弄乱COM A的条目,客户端说它c找不到指定的模块。



我曾经设法让这组DLL作为.NET的免注册COM工作C#应用程序,你把所有相关的DLL都作为引用,在构建时注册COM,在运行时取消注册它们工作。



但是,在C ++中我不喜欢我不知道相当于添加引用是什么。



任何帮助,非常感谢!

I''ve got a C++ client accessing some registry-free C++ COM DLLs.

I followed instructions here:

Registration-Free Activation of COM Components: A Walkthrough[^]

and got my client working almost OK.

However, my side-by-side DLL calls into many other COMs.
These internal COMs appear not to be working.

To clarify, I have COM A and COM B.
I do a CreateInstance inside my client to COM A and it works.
Inside COM A there is a CoCreateInstance to COM B and this appears not to work.

The manifest file describes all the COMs involved, and I have made sure the manifest file is being read (if I deliberately mess up the entry for COM A, the client says it can''t find the specified module).

I''ve only ever managed to get this set of DLLs to work as registry-free COMs from a .NET C# application, where you stick all relevant DLLs in as references, register the COMs at build time, unregister at run time and they work.

However, in C++ I don''t know what the equivalent of adding references is.

Any help, greatly appreciated!

推荐答案

在C ++中,相当于添加引用是使用#importcomserverdllnameex:#importtest.dll
In C++ equivalent of adding reference is using #import "comserverdllname" ex:#import "test.dll"


这篇关于来自C ++客户端的分层无注册表COM访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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