我已经建立了一个COM DLL.如何让其他人远程使用我的COM? [英] I have build a COM DLL.How can I let other people use my COM remotely ?

查看:65
本文介绍了我已经建立了一个COM DLL.如何让其他人远程使用我的COM?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经构建了一个COM DLL,并将其注册到我的计算机上.

现在,我想将此COM共享给我的朋友,但不将此DLL复制给他们.

如何让其他人远程使用我的COM?

在这种情况下最合适的解决方案是什么?

我应该使用Com +还是DCOM?但是我对此没有任何经验.有什么例子吗?并且我应该修改我的COM DLL代码吗?技术

首先-您需要分发从COM对象创建的proxystub.dll-需要在客户端和服务器端的两者中注册(regsvr32)-它负责''de /远程处理呼叫

其次-客户端需要使用CoCreateInstanceEx 来获取远程引用(此处为测试目的,在服务器为localhost时请求REMOTESERVER将会失败)

第三-您需要了解CLSID和APPID之间的联接

关于第三点,MS向导在此方面无法提供帮助,而DCOMCNFG只是使问题感到困惑...

确保您的< object> .rgs声明了APPID,然后确保您的< COCLASS> .rgs引用了APPID(不会自动发生)

完成所有排序后,DCOMCNFG应该是您的联络点;但是,默认的计算机限制可能会造成影响


I have build a COM DLL, and register it on my computer.

Now I want to share this COM to my friends ,but without copy this DLL to them.

How can I let other people use my COM remotely ?

What''s the most proper solution in this case?

Should I Use Com+ or DCOM? But I don''t have any experience on that. Is there any example? And Should I modify my COM DLL code?

解决方案

DCOM is what you need, however, that falls into the ''badly documented, poorly supported'' realm of MS technology

First - you need to distribute the proxystub.dll that is created from your COM object - it needs to be registered (regsvr32) at both the client and server end - it is responsible for ''de/remoting'' the call

Second - the client needs to use CoCreateInstanceEx to get a remote ref (caveat here for testing, asking for a REMOTESERVER when the server is localhost will fail)

Third - you need to understand the join between the CLSID and the APPID

As regards third, the MS wizards fail spectacularly to help you out here, and DCOMCNFG just confuses the issue ...

Ensure that your <object>.rgs declares the APPID, then ensure that your <COCLASS>.rgs references the APPID (neither happens automatically)

Once that is all sorted, DCOMCNFG should be your point of call; however, the default machine limit may get in the way


这篇关于我已经建立了一个COM DLL.如何让其他人远程使用我的COM?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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