Preferred way of dll registration

Paul Vriens paul.vriens.wine at gmail.com
Thu Feb 25 04:43:39 CST 2010


Hi Jacek,

On 02/24/2010 09:30 PM, Jacek Caban wrote:
> 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

I see you already sent some atl patches ;)

>
>> 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

The registration in atl is currently with some 'hardcoded' values in the 
C-files. Wouldn't it be beneficiary to move these strings to the atl.rgs 
file? Than you wouldn't truly need a line of C code when things need to 
be changed?

The above is not really an issue of course if we have autogenerated code 
for the registration.

-- 
Cheers,

Paul.



More information about the wine-devel mailing list