load 32/64 bit DLL

  • Thread starter Thread starter jjhii
  • Start date Start date
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
 
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.
 
Back
Top