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
FOLLOW US
Get the latest news in Application Packaging