Handling of COM registration in mixed project types - Advanced Installer Community
R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Handling of COM registration in mixed project types

Hi,

the new COM View gives me some headache. How do I handle the registration of COM files in mixed projects properly?

In my scenario I have to register our API for third party application. The API is written in C++ and consists of two parts with the same file name, one for x32 and one for x64. The internal C++ code is the same for both platforms (including registration details), only the output type is different. I use an AI mixed project type, which contains both APIs.

The following scenarios have to be covered:
a) 32-Bit API is installed and registered on a x86 platform --> no problem, works with the new COM module fine, after some fine tuning (not all keys seems to be extracted, I have added them manually)
b) 32-Bit and 64-Bit API is installed and registered on x86 platform

The problematic part is b), because after fixing a) it is not possible to extract the same CLSIDs, Interfaces and TypeLibs again. In the past I cheated a bit with the help of a property based HKCR\CLSID and TypeLib section. But Interfaces are trickier to cheat, because Its not possible to copy/past the existing keys (this is due to the fact, that the registry view now hides the sections covered by the COM View.

I tried to move the Interfaces to a new component, but the registration is only done on x86 or x64 part, not both (with registry reflection NOT disabled).

The expected behaviour should be:
1a) 64-Bit file is installed to c:\Program Files\foo\api.dll
1b) 64-Bit registration (HKCR\CLSID, HKCR\Interface, and HKCR\TypeLib is pointing to this file)
2a) 32-Bit file is installed to c:\Program Files (x86)\foo\api.dll
2b) 32-Bit registration (HKLM\SOFTWARE\Wow6432Node\Classes\CLSID, HKLM\SOFTWARE\Wow6432Node\Classes\Interface, and HKLM\SOFTWARE\Wow6432Node\Classes\TypeLib is pointing to this file)
3) other common registry details are added (like HKCR\API.API ProgIDs)

The final goal is, that both 32-Bit and 64-Bit programs can call the API, but accordingly to their platform they either load the 64-bit or 32-part of the registration. This can be manually achieved by e.g. regsvr32 API.dll (for 32-Bit dll and 64-bit dll)

Any tricks, cheats, hints how to handle this situation?

See post here from me, its related but I wanted to move this question to a new post.

Regards,

Roland
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Handling of COM registration in mixed project types

Hello Roland,

Unfortunately, in our last version it is not possible to handle this scenario. Currently this is an Advanced Installer limitation and you cannot register both flavors of a COM through the same installation project (e.g. mixed package). Our development team has already started to work on this improvement and hopefully it will be available soon. We will let you know when the improvement will be available. Until then, as a workaround, you can downgrade to a previous Advanced Installer version which allows you to use a property-based registry key for all of your COM registration registries.

Thank you for your patience and understanding.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Handling of COM registration in mixed project types

Hello Roland,

This improvement has been added in version 11.2 of Advanced Installer released on May 21st, 2014.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”