Click here to Skip to main content
15,896,480 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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?
Posted

1 solution

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
 
Share this answer
 
Comments
GhostEx 9-Jun-11 2:21am    
Thanks a lot for your particular reply. I will try it ~ :)
GhostEx 9-Jun-11 2:32am    
If possible, would you please have a look at this question about famous 0x80070005 of DCOM ?
http://www.codeproject.com/Questions/208555/DCOM-80070005-Error-On-Windows-7

Best regards to you :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900