I need to access a 32bit dll from a 64bit exe
I know I read all about surrogate process, and I was able to create a surrogate COM but it either all works in 32bit or all works in 64bit.
What wou开发者_开发问答ld be the correct structure?
1) 32.dll <- 64.com <- 64.exe 2) 32.dll <- 32.com <- 64.exe
I tried both of the above but I did not succeed to call the 32.dll?
I'm not too informed about the surrogate COM you refer to but I've solved this problem (Using a 32bit dll from a 64bit exe) by introducing a COM object in the middle:
32.dll <-> 32bit-out-of-process-com-server.exe <-> 64.exe.
Sorry this might be what you mean by 32.com, not sure, but make sure the intermediate COM object lives in an .exe (out of process) and not in a dll. This is for the same reason you can't load the original 32.dll into the 64 bit process.
This is defenetly what you want: 32.dll <- 32.com <- 64.exe If it does not work, show more details HOW it does not work.
Also, if you are not doing much calls, you may communicate via sockets (just a backup plan).
精彩评论