Jump to content

win32 exe compiled in Delphi11 does not run on W2000

Recommended Posts

A 'legacy' environment - with 'old...' applications running on Windows Server 2000.

I have a support application running on the same server that was developed in earlier versions

of Delphi and lastly compiled in Delphi 10.4.2.


I recently compiled the same app in Delphi 11 - win32 and tried to run that app om W2000.

'not a valid win32 application'.

Just to test and verify that it is Delphi 11 and not the app---

I created a test VCL app with a FORM and no manifest or other 'newer' project options enabled

and tried to run that on w2000.  - same message.

(*Just Curious and want to learn*) - I know W2000 is no longer a valid o/s to work with (maybe now that win32 apps would not work on XP!).


what internal new 'feature' in Delphi 11 causes the compilation to create a win32 app exe in the file that is not recognized now?

-the answer may be in a Delphi 11 release note ?

Thanks in advance

Share this post

Link to post


This might help

  • Can no longer build executables for Windows XP without customization:
    • Project Options->Building->Delphi Compiler->Linking->Set OS Version fields in PE Headers (and Set SubSystem Version fields in PE Headers" to 5.1 (it now defaults to 6.0)
    • If you use System.Threading, then need to change GetTickCount64 references to a new routine matching something like the code below and then use a modified system.thread.dcu in your projects (or update \lib\win32\debug and \lib\win32\release with new versions of System.Threading.dcu)
    • More info from Michal Mutl on Delphi PRAXIS forum message
function _GetTickCount64: UInt64;
if TOSVersion.Major<6 then
  Result := TThread.GetTickCount
  Result := TThread.GetTickCount64;
  • XP Compatibility notes

    • As reported by Marco Cantu on Delphi PRAXIS, better HighDPI support was the reason for the PE header change. And the GetTickCount was un intentional.
    • Changing the PE format to target newer versions was a design decision. It's the same Visual Studio does. And it does make a difference in the results when invoking some HighDPI related Windows APIs. They fail to return the right value if the app is for XP, so if you change the PE setting (doable) you'll have some trouble on the latest systems. The introduction of an XP breaking issue with GetTickCount64 was not intentional and discussed. We don't test on XP by design, no one in the beta did, most likley. While we don't officially support XP, such a simple change is doable -- as long there is zero impact on newer systems and it costs a limited time. I doubt we'll release a patch for it, though...
  • Like 1

Share this post

Link to post


thank you for this information.

I had to set the PE Versions to 5.0 to get the O/S to recognize it, and now it runs.

regards and all the best!

Share this post

Link to post
2 hours ago, Martin Sedgewick said:

Excellent, although Kudos should go to @Darian Miller for maintaining the resource.


Thanks.  I'm glad someone uses it besides me!   😃


And if anyone has other info to add to the page, just let me know.

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now