How to transfer a 32-bit typelib to a 64-bit project (whilst preventing nameclashes)
Asked Answered
T

1

6

I've got a type library in a 32-bit Excel add-in app.

I need to translate the whole app to 64-bit.

enter image description here

I can't just copy paste the typelib, because the GUID's will clash with the already installed 32-bit app, ditto for the naming.
What's the best way to translate the application to 64 bit in a way that avoids name-clashes?

Or is there some mechanism that solves the name- and GUID-clashes automatically that I don't know about?

Trixie answered 16/3, 2012 at 14:48 Comment(3)
Windows 64-bit registry v.s. 32-bit registry might help.Secure
So you have an XE2 app with a 32 bit build configuration and a 64 bit build configuration, and you just switch build configurations and rebuild. Right? If david's answer is correct (as I suspect it is) then that's all there is to it.Unicef
@WarrenP That's it. I've not done this with an Excel COM add-in (yet, it's very high on my TODO list), but I did this with a shell extension a few years back. The neat thing is that you use identical code in every respect and just target either x86 or x64. No conditional compilation required at all.Eudora
E
11

32 and 64 bit COM servers are registered in different registry views. So the 32 bit processes and 64 bit processes exist in disjoint GUID namespaces. In other words you use the same GUID for both 32 and 64 bit versions. The registry redirector does the rest.

Eudora answered 16/3, 2012 at 15:26 Comment(1)
Thanks David, I suspected (and hoped) that would be the case.Trixie

© 2022 - 2024 — McMap. All rights reserved.