Preferred way of dll registration

Jacek Caban jacek at codeweavers.com
Wed Feb 24 14:30:26 CST 2010


Hi Paul,

On 2/24/10 8:59 PM, Paul Vriens wrote:
> Hi,
>
> We seem to have 2 different approaches for dll registration:
>
> 1) a regsvr.c file with all the necessary functions and registry 
> information.
> 2) an inf file and some code to register/unregister the dll.

3) IRegistrar from atl.dll

> The first one is the most common in our source but I can remember a 
> comment from AJ about favoring the latter (or at least something like 
> "maybe we should start using inf files for registration").
>
> Thoughts?

I think both 2) and 3) are way better than regsvr.c. It avoids code 
duplication and you can add much more custom registries without a single 
line of C (I'd call it more flexible, but it's more a better 
flexibility/efforts factor). IRegistrar is much simplier than .inf 
parser, so it has fewer builtin features. Most useful things may be 
handled IRegistrar and very simple code in DllRegisterServer 
implementation to pass some string replacements. Using it would also 
require moving atliface.idl to include directory. Its advantage is that 
.rgs files are much cleaner as they represent keys as a tree (see 
dlls/atl/atl.rgs for an example).

I usually use .inf files, but if we'd be considering standardization, my 
vote would go for IRegistrar and I'm surely all for limiting regsvr.c use.

Thanks,
     Jacek



More information about the wine-devel mailing list