load 32/64 bit DLL

J

jjhii

I have a C# project that is compiled as "Any CPU". I build the installer
using either 32 bit or 64 bit which works fine. Most of the application
works in both 32 and 64 bit modes.

I have one set of windows that pulls function from a C++/Mananged DLL I
wrote which obviously only works in either 32/64 depending on how I compile
it which makes building the project a real pain.

Is there some way to either load the correct version based on running
enviroment or set the correct version when building the setup or something
else? There should be a nicer way of handling this.

Thanks in advance,
John
 
T

Tim Roberts

jjhii said:
I have a C# project that is compiled as "Any CPU". I build the installer
using either 32 bit or 64 bit which works fine. Most of the application
works in both 32 and 64 bit modes.

I have one set of windows that pulls function from a C++/Mananged DLL I
wrote which obviously only works in either 32/64 depending on how I compile
it which makes building the project a real pain.

Is there some way to either load the correct version based on running
enviroment or set the correct version when building the setup or something
else? There should be a nicer way of handling this.

I solved this exact problem by changing the C# code from AnyCPU to Win32.
Since a 32-bit app runs fine on Win64, it still works.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top