Dux
Dux

Reputation: 11

Running a 64bit program referencing a 32bit dll using visual studio - C#

I am currently facing a problem where I am referencing a 32bit dll. I tried changing the platform to 86bit which works fine but the requirements are to use a 64bit or 'Any CPU'. When I use the 'Any CPU' platform it somehow does not pick up the dll

Is there a way of using a 32bit dll in 64bit program? I also read about a workaround of 'wrapping' which was not clear... can someone elaborate

Upvotes: 0

Views: 455

Answers (1)

Richard
Richard

Reputation: 108975

Is there a way of using a 32bit dll in 64bit program?

In the same process: No.*

However, you could host the dll in a separate child process via something like the Add In Framework (which supports out of process workers).

* Note, I am assuming this dll is either natively compiled, or .NET but compiled explicitly for 32bit only.

Upvotes: 1

Related Questions