i have a 32 com library and would like to use its functionality by a 64 bits application , i 've searched on the internet and managed to get this workaround
HKey_Classes_Root\Wow6432Node\CLSID\[GUID]
REG_SZ (string)
Value. Name should be AppID and data should be the same COM object GUID you have just searched forHKey_Classes_Root\Wow6432Node\AppID\
REG_SZ (string)
Value, and call it DllSurrogate. Leave the value empty
HKey_Local_Machine\Software\Classes\AppID\
but it does not work on Windows 7 64 bits , the main problem is when i do the step 6 i found the key already existed, any body knows why ? or how can i overcome it ?
the documentation here is very brief
On 64-bit Windows, a 64-bit process cannot load a 32-bit dynamic-link library (DLL). Additionally, a 32-bit process cannot load a 64-bit DLL.
To put it in simple words, if you run a 32-bit program on a 64-bit machine, it will work fine, and you won't encounter any problems. Backward compatibility is an important part when it comes to computer technology. Therefore, 64 bit systems can support and run 32-bit applications.
In short: You can't link a 32-bit app to a 64-bit library. You can run a 32-bit application, using 32-bit shared libraries on a 64-bit OS (at least all the popular 32-/64-bit processors such as AMD, Intel and Sparc). But that doesn't involve any libraries.
So, what you need to do here is start up this 32bit COM component in its own process, ie by calling CoCreateInstance with CLSCTX_LOCAL_SERVER.
Either this will be straight forward with the existing DLL, or if not you should wrap it with your own 32bit simple COM component which supports running as a local server...
Trying to tweak the registry is a no-win game - use the Dll as it was intended and save yourself the pain.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With