I compiled a program with TD 7.0.3 at 32 bit. I cannot do else (the pc is W10 pro 32 bit).
This program doesn't run on a XP machine 32 bit. I get "This program is not a valid win32 application".
Until TD6.0 all runs well.
Why? 32 bit are 32 bit even on XP. Or not?
Many thanks to all.
- Founder/Site Admin
- Posts: 1114
- Joined: 24 Feb 2017, 09:12
- Location: Gouda, The Netherlands
In fact, the TD runtime uses newer Windows API functions which are not present on Windows XP. This is the reason why TD 6.3 (and up) build applications will fail to run on XP.
So it has nothing to do with the "bitness" of the executable. The executable/TD runtime is not compatible with the very old XP API's.
More info can be read here, from the old Gupta forum:
https://support.guptatechnologies.com/s ... 18&t=11874
For those who can not access the gupta forum, I will place the most interesting last post from there below:
Posted by: wardies
FYI, we have found a solution based on the information in the following articles, to force the EXE to be WinXP compatible.
A Stack Overflow answer to the question: What is special about the executables compiled with Visual Studio 11 which results in that the executables cannot be executed on Windows XP?
That links to Instructions for creating an application that modifies EXE headers to be WinXP compatible
Also, because cdlli63.dll references InitializeCriticalSectionExNew() in kernel32.dll and this function is not available in the WinXP version of kernel32.dll, we had to:
- Write a wrapper DLL that translates this to InitializeCriticalSectionAndSpinCount() (which is available); and
- Modify the cdlli63.dll binary to point to our custom dll (overwriting the text "kernel32.dll" with "kexxxx32.dll").
The solution is a bit convoluted (it would be easier to just have an option to build for XP compatibility) but seems stable on WinXP and no issues found yet. Testing continues.
I supposed something like this. Many customers are still using XP. This was an internal software and I can solve in other way, but happy to know it for my customers.
Thank you. I will try the workaround suggested.
Who is online
Users browsing this forum: [Ccbot] and 0 guests