Something is not right. What are the EXACT steps you are taking? Do you have Runtime packages enabled or disabled?pidgi2009 wrote:No, it definitly does not work.
I will try something else.
To upgrade to XE4 or not to?
Moderator: 2ffat
Re: To upgrade to XE4 or not to?
Remy Lebeau (TeamB)
Lebeau Software
Lebeau Software
Re: To upgrade to XE4 or not to?
you may try the following ...
in the very first line in your source code (project file source code) add the
#define _WIN32_WINT 0x0500
this will give compile time errors for API function calls that are not available in Windows 2000 (value 0x0500)
The error will show the source line where the unavailable function is used
HTH
in the very first line in your source code (project file source code) add the
#define _WIN32_WINT 0x0500
this will give compile time errors for API function calls that are not available in Windows 2000 (value 0x0500)
The error will show the source line where the unavailable function is used
HTH
Re: To upgrade to XE4 or not to?
@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:
function GetSystemTimes; external kernel32 name 'GetSystemTimes';
and modify it as
function GetSystemTimes; external kernel32 name 'GetSystemTimes' delayed;
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.
@minas
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. 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.
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:
function GetSystemTimes; external kernel32 name 'GetSystemTimes';
and modify it as
function GetSystemTimes; external kernel32 name 'GetSystemTimes' delayed;
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.
@minas
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. 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.
Re: To upgrade to XE4 or not to?
the good news are that W1002 is a warning[Avertissement in French] not an error... 
so , the ListeDeGard.exe did it to run under Windows 2000?

so , the ListeDeGard.exe did it to run under Windows 2000?
Re: To upgrade to XE4 or not to?
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?
No, it does not run in Windows 2000
No, it does not run in Windows 2000
Re: To upgrade to XE4 or not to?
a simple XE4-compiled application ,without any additional component library(like LMD) does it run in window 2000(with or without #define _WIN32_WINNT 0x0500)?
I haven't either , XE4 - Win2000 to try all these ...
In the case of ListeDeGard.exe the error message in runtime, was about GetSystemTimes?
I haven't either , XE4 - Win2000 to try all these ...
In the case of ListeDeGard.exe the error message in runtime, was about GetSystemTimes?
Re: To upgrade to XE4 or not to?
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: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.
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: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:
function GetSystemTimes; external kernel32 name 'GetSystemTimes';
and modify it as
function GetSystemTimes; external kernel32 name 'GetSystemTimes' delayed;
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:5- Using the new .exe file at work, I notice that it does work on the stations that are running Windows XP SP2
That proves that your app is still static linking to GetSystemTimes() 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.
minas's suggest has no effect in this situation, as the problem originates from Delphi code, not C++ code.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.
That translates as "The 'DELAYED' symbol is platform-specific". That is just a warning, not an error.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"
Remy Lebeau (TeamB)
Lebeau Software
Lebeau Software
Re: To upgrade to XE4 or not to?
'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.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?
Remy Lebeau (TeamB)
Lebeau Software
Lebeau Software
Re: To upgrade to XE4 or not to?
@gambit47: OK, did what you suggest, rebuilt, will try it at work today. Update tonight.
Re: To upgrade to XE4 or not to?
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.
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.
Re: To upgrade to XE4 or not to?
Then your changes are not being compiled into your app, unless something else in your app is using Windows.GetSystemTimes() statically outside of TThread.pidgi2009 wrote:Nope, exactly same message, stating that the entry point of GetSystemTimes() is impossible to find in the Kernell dll.
Remy Lebeau (TeamB)
Lebeau Software
Lebeau Software
-
- Posts: 1
- Joined: Sat Oct 10, 2020 1:45 am
Re: To upgrade to XE4 or not to?
I always use XE2 for the software I make for the hospital, and sometimes XE4 for me at home. It is generaly easier and faster to stay in XE2, but I am trying to use the new strenghts in cross compiling with XE4.
I have upgraded to XE3 then XE4 (in fact, I have been with Borland and the like since the very beginning!), and bought the LMD and TMS components for each of those versions. If there is an easy workaround to make my apps run on those old systems with XE4, I would be happy as it would give more value to my "investments"!
I have upgraded to XE3 then XE4 (in fact, I have been with Borland and the like since the very beginning!), and bought the LMD and TMS components for each of those versions. If there is an easy workaround to make my apps run on those old systems with XE4, I would be happy as it would give more value to my "investments"!
UK Travelers can check application form for applying AZ visa for UK nationality holdershere.