@gambit47: Here are the steps I used:1- load the very same project in XE4 instead of XE2, both (XE2 and XE4) installed on the same computer.

2- Go to 'C:\Program Files (x86)\Embarcadero\RAD Studio\11.0\source\rtl\win', find the Winapi.Windows.pas file, make o copy of it, then open the Winapi.Windows.pas file itself (not the copy), find the following line:

3- save the file, then add it to my project (using the Project->Add from the menu).4- rebuild all the project, making sure the Project-Òptions->Packages->Runtime packages is set as false.5- Using the new .exe file at work, I notice that it does work on the stations that are running Windows XP SP2, but most stations use a Citrix session, which is running Windows 2000, and the program does not run on those last, with a message stating that the entry point of GetSystemTimes() is not found in the Kernell.

@minasOne of the project, the simplest, is named ListeDeGarde, thus the main file is ListeDeGarde.cpp. I add the #define you showed as the very first line, above the #include <vcl.h>, rebuilt all, no spurious message. BUT, (there is always a BUT) with or without that #define, as I recompile there are a few dozen lines stating that:"[DCC Avertissement] Winapi.Windows.pas(33698): W1002 Le symbole 'DELAYED' est spécifique à une plate-forme"(Sorry, my system is in French).

I do use a few third party components in my project, namely LMD, JVCL, and Indy components. But on this project, only LMD components.

pidgi2009 wrote:Here are the steps I used:1- load the very same project in XE4 instead of XE2, both (XE2 and XE4) installed on the same computer.

Don't open older projects in newer IDE versions. The migration rarely works correctly. Create a new project in the newer version, then add your existing source files to it as needed.

pidgi2009 wrote:2- Go to 'C:\Program Files (x86)\Embarcadero\RAD Studio\11.0\source\rtl\win', find the Winapi.Windows.pas file, make o copy of it, then open the Winapi.Windows.pas file itself (not the copy), find the following line:

This is wrong. You must modify the copy, not the original (and you should save the copy into your app's source folder, don't leave it in the original folder, and do not rename the file either), and then add the modified copy to your project so it gets compiled and linked into your executable.

pidgi2009 wrote:5- Using the new .exe file at work, I notice that it does work on the stations that are running Windows XP SP2

Because GetSystemTimes() exists in XP SP2, so you would not see an error about it, even if your app is still static linking to it instead of delay-loading it.

pidgi2009 wrote:but most stations use a Citrix session, which is running Windows 2000, and the program does not run on those last with a message stating that the entry point of GetSystemTimes() is not found in the Kernell.

That proves that your app is still static linking to GetSystemTimes() instead of delay loading it.

pidgi2009 wrote:One of the project, the simplest, is named ListeDeGarde, thus the main file is ListeDeGarde.cpp. I add the #define you showed as the very first line, above the #include <vcl.h>, rebuilt all, no spurious message.

minas's suggest has no effect in this situation, as the problem originates from Delphi code, not C++ code.

pidgi2009 wrote:BUT, (there is always a BUT) with or without that #define, as I recompile there are a few dozen lines stating that:"[DCC Avertissement] Winapi.Windows.pas(33698): W1002 Le symbole 'DELAYED' est spécifique à une plate-forme"

That translates as "The 'DELAYED' symbol is platform-specific". That is just a warning, not an error.

pidgi2009 wrote:That is my understanding, that the message is only a warning. But maybe it could mean that Windows 2000 does not support the 'delayed' directive?

'delayed' is a compiler/linker feature that is implemented by the RTL at runtime. The OS does not know anything about it. The warning is simply telling you that 'delayed' is not a cross platform feature, should you want to compile your code for multiple platforms, that is all.

Nope, exactly same message, stating that the entry point of GetSystemTimes() is impossible to find in the Kernell dll.I will once again redo everything from scratch once again tonight and retry my application tomorrow, but until I do find a good and effective workaround, my advice would be to stay away from XE4 if you plan to build applications for older systems (and they are plenty, everywhere, sorry Embarcadero). If that is not working tomorrow, I will uninstall XE4 from my system, and I have already decided not to 'upgrade' (?) to XE5, and to keep from renewing my support plan from Embarcadero.