On StackOverflow, the problem of 64bit vs 32bit for VBA programming arises quite often on SO. I can't claim this will be a definitive blog post but here I gather some thoughts and links that I believe would lead to generic solution.
Firstly, Microsoft has not left 32-bit components completely hanging. It does have an inter-operability technology for this, its called Windows on Windows (WOW), this was invented for the 16bit vs 32bit years ago. WOW also exists for the 32-bit vs 64-bit, it sometimes called Wow64_32 to distinguish from previous generation.
You would have thought Wow64_32 would be enough for 32-bit components to be inter-operable in-process for 64 bit clients. Unfortunately one cannot load win32 modules into a win64 process space. Instead one must use a surrogate as outlined in this article Registering the DLL Server for Surrogate Activation. Using a surrogate process means one can keep 32-bit components separate from 64-bit clients.
Links
- Registering the DLL Server for Surrogate Activation
- Wikipedia - Windows on Windows
- 32-bit and 64-bit Application Data in the Registry
- 64-bit client call to 32-bit COM/ATL server EXE fails
- Accessing 32-bit DLLs from 64-bit code
- SO - Out-of-Proc-COM-Server (x86): dllhost.exe looks in wrong registry path
- SO - ActiveX component can't create object when creating Lotus.NotesSession in VBA 64-bits
- Technet - Install COM Components (to COM+)
- Technet - Component Services
No comments:
Post a Comment