Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Loading native COM DLLs in 64bit environment

I have a 32bit/64bit COM DLLs in C++: mycom32.dll, mycom64.dll. Both of them are exactly the same but mycom32.dll is compiled for 32bit and mycom64.dll is compiled for 64bit. That means that BOTH DLLs have the same UUID and the same CLSID!

Now, sometimes I want to use this COM from 32bit processes and sometimes I want to use this COM from 64bit processes.

Is it possible to load the correct DLL without creating two different CLSIDs and check during runtime if the process is 32bit/64bit?

like image 317
TCS Avatar asked Apr 26 '11 14:04

TCS


1 Answers

It should be possible to register both of them without issue; this is part of what Registry Redirection is supposed to solve.

Here's a more detailed explanation of how this works.

like image 161
Luke Avatar answered Sep 24 '22 22:09

Luke