The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

How can I impliment a Reg-Free COM on Win2000 OS

The WinXP manifest (Reg-free) paradigm is so elegant,
http://msdn.microsoft.com/msdnmag/issues/05/04/RegFreeCOM/
It solves the COM dll "Hell" perfectly. So I guess whether we can impliment a Reg_Free COM under Win2000 OS, I have tried many times, all failed at end. Can anybody gives me a strategy. Thanks ahead
Arthur Jiang Send private email
Thursday, July 26, 2007
 
 
I'm fairly sure that all Windows 2000 offered was COM Redirection via .local files.

http://msdn2.microsoft.com/en-us/library/aa375142.aspx

This is even turned off by default on Vista.
Codger
Thursday, July 26, 2007
 
 
Thanks to Codger, I know that the DotLocal file can make the dll redirect, but I do want to find a way that can isolated COM as Reg-free COM manner, namely we even don't need to register the COM DLL to the registry. is it possible?

Friday, July 27, 2007
 
 
Outsource Your projects as low as $20/ hr.
Ashish Sahni Send private email
Friday, July 27, 2007
 
 
There are a variety of techniques that you can use for registry-free COM without that manifest method.

There are different techniques for different situations.

If you want to create a COM object that is defined in your own code, you can just use C++ new to create it instead of using CoCreateInstance.

If your class implements IDispatch, you need to make sure the type library is loaded directly from the DLL instead of from the registry.

If you want to create an object that is implemented in a particular DLL, you can load the DLL and call its DllGetClassObject directly.

If another component that you don't control is going to call CoCreateInstance to create your object, you can register it at runtime by using CoRegisterClassObject, that will make the other component's call to CoCreateInstance work even though you don't have stuff in the registry.

If you need marshaling support, you can call CoRegisterPSClsid to register your proxy handler.

Most of the basic registry use in COM is just a labeling method to provide a path to the DLL for example. If you already know this path you can usually do the same steps that COM does behind the scenes to make things work without putting anything into the registry.

It is very nice to have stuff running registry free, when your program is self-contained without registry dependencies you can do stuff like put it on a thumb drive and run it somewhere else without doing an "install".
Michael G
Friday, July 27, 2007
 
 
Many thanks to Michael G.
Arthur Jiang
Sunday, July 29, 2007
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz