Good day,
I'm working on a project, and would like to know how to target both both 32 + 64 bits Windows OSes with the same exe, if possible.
My initial idea was to build the app for 32 bits, this way it would work on both 32/64 Windows.
But, as I need to use some external DLLs that can be 64 bits, my 32bit exe wont be able to load them.
Is there any way to build a single exe that will work on both systems and can load either DLL (32/64 bits) using some internal logic?
On normal apps one usually has the option to download each exe, but I see malware that says it works on both platforms.
Some workarounds that I've thinking about:
a) Get the Dropper to find the Windows type and download the compatible exe (32/64).
b) Download an Installer (32bits) with both exes packed, find the Windows type and execute the compatible exe (32/64)
c) Use only one single 64 bit exe , and deprecate 32 bit Windows.
Any help will be appreciated.
Thank you
Jun 17, 2020 06:01 PM
(This post was last modified: Jun 17, 2020 06:02 PM by hichigo.)
32 bits programs can work on 64 bit systems but 64 bit programns cant work on 32 bit systems so you can just use 32 bit program
It'd be nice to know what language you're using, but nonetheless I have a viewpoint on compatibility that has recently changed.
For the longest time, I tried as often as possible to use the 32-bit version of whatever programs I used even on 64-bit machines. Namely because for years I used everything on two computers, one 32-bit and the other 64-bit. The cross-compatibility aspect fit better back then than it does now. I did a reset on my newest machine a few weeks ago and decided to update all of my backups to 64-bit. Stuff like IDEs, small system tools, libraries, etc. (Unrelated, but I also switched from RAR to 7-Zip after something like 15 years.)
My standpoint on the gist of it all now out of the way, I say just deprecate the 32-bit all together. 64-bit machines continue to become increasingly common over time, and now it's at the point where the number of desktop users who consistently run 32-bit most if not all the time is so low that their market portion makes little difference (in most cases). From what I've seen over the past five or so years, the 32-bit operating systems are soon to be phased out completely. That being said, I say it's best to cut targeting 32-bit.
The way you describe it makes your situation sound a bit strange to me. If I'm processing it correctly, your program requires a few 64-bit-only libraries. If that's the case, and those libraries do not offer 32-bit versions, you're inherently forced to target 64-bit only right from the get go.
Jun 19, 2020 05:33 AM
(This post was last modified: Jun 19, 2020 05:54 AM by thegeist.)
(Jun 17, 2020 01:41 PM)thegeist Wrote: Good day,
I'm working on a project, and would like to know how to target both both 32 + 64 bits Windows OSes with the same exe, if possible.
My initial idea was to build the app for 32 bits, this way it would work on both 32/64 Windows.
But, as I need to use some external DLLs that can be 64 bits, my 32bit exe wont be able to load them.
Is there any way to build a single exe that will work on both systems and can load either DLL (32/64 bits) using some internal logic?
On normal apps one usually has the option to download each exe, but I see malware that says it works on both platforms.
Some workarounds that I've thinking about:
a) Get the Dropper to find the Windows type and download the compatible exe (32/64).
b) Download an Installer (32bits) with both exes packed, find the Windows type and execute the compatible exe (32/64)
c) Use only one single 64 bit exe , and deprecate 32 bit Windows.
Any help will be appreciated.
Thank you
Thanks for the reply. Yes I know this, the problem is that a 32bit app can not load 64bit dlls.
(Jun 17, 2020 06:01 PM)hichigo Wrote: 32 bits programs can work on 64 bit systems but 64 bit programns cant work on 32 bit systems so you can just use 32 bit program
Thank you for your lengthy input.
I'm coding in C++ with MingW G++ compiler (started on the 64bit one and went back to the 32bit one, before I stumbled with the DLLs issue).
Yes, my problem is mainly loading 64bits DLLs from a 32bit app.
Like you say, maybe, the easiest option is to deprecate 32 and target 64 only (which has the biggest market share).
Cheers
|