1

I do release that its not possible to load 64bit dll into 32bit dll in the same process. However i can put my 64bit dll into com and access that com from my 32bit app. Can anyone provide me a sample for doing so? Are there any other means to solve this issue?

Note: I cannot build the 64bit dll to 32 bit as its external 3rd party dll and i cannot convert my 32bit process to 64 bit as its a very huge application.Converting that to 64bit would require me many years.

Any help would be appreciated

9
  • 1
    You can use COM exe server or any other way of inter-process communications (sockets, pipes, global events, shared memory, Windows messaging etc.). Decide which way is better for you. Commented May 29, 2014 at 6:07
  • Where can i find an example of doing so using COM exe server? Commented May 29, 2014 at 6:10
  • 1
    search for "out-of-process" COM server. You can also use DCOM. I heard it's possible to use dllhost.exe (comes with Windows) to turn an in-process COM server into a DCOM server although I'm not srue about the details Commented May 29, 2014 at 6:12
  • Does the COM server contain a type library or is it accompanied with one? Commented May 29, 2014 at 7:46
  • @MattMcNabb you heard correctly; its called a DLL Surrogate, and if your component is conforming (it doesn't take much) you can do this. I've done it the other way around (64-bit process hitting up a 32-bit surrogate-hosted in-proc-COM-lib) and can testify it can be done. Commented May 29, 2014 at 7:48

1 Answer 1

1

you can leverage process communication about access 64bit from 32bit Process.
Below are some steps.

  1. Make a COM server, example, you can modify project property to generate 64bit program.

  2. Define and implement com interface, in COM server, you load 64bit dll, and wrapper dll function.

  3. 32bit App call COM server interface(CLSCTX_ACTIVATE_64_BIT_SERVER), send data by parameter and get result.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.