XE5 news

Use this forum for any relevant news.

Moderator: 2ffat

Re: XE5 news

Postby Lena » Wed Dec 25, 2013 9:50 am

del
Last edited by Lena on Tue Dec 31, 2013 1:45 am, edited 1 time in total.
Lena
BCBJ Master
BCBJ Master
 
Posts: 519
Joined: Sun Feb 06, 2011 1:28 pm

Re: XE5 news

Postby pidgi2009 » Wed Dec 25, 2013 11:45 am

OK, Gambit47. Many thanks for you help once again. This is what I did after reading your post:

I located System.Classes.pas, (making a back_up copy, just in case...) located the call as you wrote, then edited it in the following way:

What I found:

class function TThread.GetSystemTimes(out SystemTimes: TSystemTimes): Boolean;
{$IF Defined(MSWINDOWS)}
var
Idle, User, Kernel: TFileTime;
begin
Result := Winapi.Windows.GetSystemTimes(Idle, Kernel, User);
if Result then
begin
SystemTimes.IdleTime := UInt64(Idle.dwHighDateTime) shl 32 or Idle.dwLowDateTime;
SystemTimes.Usertime := UInt64(User.dwHighDateTime) shl 32 or User.dwLowDateTime;
SystemTimes.KernelTime := UInt64(Kernel.dwHighDateTime) shl 32 or Kernel.dwLowDateTime;
SystemTimes.NiceTime := 0;
end;
end;

How I did modify it:

class function TThread.GetSystemTimes(out SystemTimes: TSystemTimes): Boolean;
{$IF Defined(MSWINDOWS)}
var
Idle, User, Kernel: TFileTime;
proc_pj: FARPROC;
begin
proc_pj := GetProcAddress(GetModuleHandle('kernel32'),'GetSystemTimes');
if (proc_pj <> nil) then
begin
Result := Winapi.Windows.GetSystemTimes(Idle, Kernel, User);
if Result then
begin
SystemTimes.IdleTime := UInt64(Idle.dwHighDateTime) shl 32 or Idle.dwLowDateTime;
SystemTimes.Usertime := UInt64(User.dwHighDateTime) shl 32 or User.dwLowDateTime;
SystemTimes.KernelTime := UInt64(Kernel.dwHighDateTime) shl 32 or Kernel.dwLowDateTime;
SystemTimes.NiceTime := 0;
end;
end
else
Result :=false;
end;


Now the question is: how can I make my project(s) use that modified file? Just by adding the modified file in my project files, and rebuilding?

Pierre

Just 'en passant', Happy Christmas to you all!
pidgi2009
BCBJ Veteran
BCBJ Veteran
 
Posts: 53
Joined: Sat Apr 25, 2009 11:44 am

Re: XE5 news

Postby Lena » Fri Dec 27, 2013 2:18 pm

Lena
BCBJ Master
BCBJ Master
 
Posts: 519
Joined: Sun Feb 06, 2011 1:28 pm

Re: XE5 news

Postby rlebeau » Sat Dec 28, 2013 9:03 pm

pidgi2009 wrote:I located System.Classes.pas, (making a back_up copy, just in case...) located the call as you wrote, then edited it in the following way


You edited it wrong, and did not remove the static dependency at all. You are loading the function pointer dynamically, but are still calling the static version instead of using the loaded pointer.

Try this instead:

Code: Select all
class function TThread.GetSystemTimes(out SystemTimes: TSystemTimes): Boolean;
{$IF Defined(MSWINDOWS)}
type
  LPFN_GST = function(var lpIdleTime, lpKernelTime, lpUserTime: TFileTime): BOOL; stdcall;
var
  Idle, User, Kernel: TFileTime;
  lpGetSystemTimes: LPFN_GST;
begin
  @lpGetSystemTimes := GetProcAddress(GetModuleHandle('kernel32'), 'GetSystemTimes');
  Result := Assigned(lpGetSystemTimes);
  if Result then
  begin
    Result := lpGetSystemTimes(Idle, Kernel, User);
    if Result then
    begin
      SystemTimes.IdleTime := UInt64(Idle.dwHighDateTime) shl 32 or Idle.dwLowDateTime;
      SystemTimes.Usertime := UInt64(User.dwHighDateTime) shl 32 or User.dwLowDateTime;
      SystemTimes.KernelTime := UInt64(Kernel.dwHighDateTime) shl 32 or Kernel.dwLowDateTime;
      SystemTimes.NiceTime := 0;
    end;
  end;
end;


pidgi2009 wrote:Now the question is: how can I make my project(s) use that modified file? Just by adding the modified file in my project files, and rebuilding?


Yes, provided that "Build with runtime packages" is disabled in each project. Editing RTL files does not work when Runtime Packages are enabled unless you recompile the RTL itself, which is possible but not trivial to do.
Remy Lebeau (TeamB)
Lebeau Software
User avatar
rlebeau
BCBJ Author
BCBJ Author
 
Posts: 1449
Joined: Wed Jun 01, 2005 3:21 am
Location: California, USA

Re: XE5 news

Postby pidgi2009 » Mon Dec 30, 2013 6:30 am

I did a brand new reinstall of my XE4 on my desktop from zero.
I did edit the System.Classes.pas in my source/rtl directory, exactly as written above here.
I then added the said .pas file to my project.
I did check once again that the checkbox for the runtime packages was unchecked.
I did a complete build of my project, then tried it on the old system.
Always the very same dialog box, stating that the entry point for GetSystemTimes() was not found on this system.
Sigh.....
I surely do something wrong, but i will take a break, i did spend too many hours recently trying to make XE4 usable in my projects on that old system. Thank you nonetheless for trying.

Pierre
pidgi2009
BCBJ Veteran
BCBJ Veteran
 
Posts: 53
Joined: Sat Apr 25, 2009 11:44 am

Re: XE5 news

Postby corbingravely » Wed Jan 22, 2014 3:09 am

I have just heard the start of a new program for the new version of Delphi. But, what I need to know is; if it is true? I would love to enroll myself with it if the program is for real. And thank you in advance.








--------------------------------------
CORBIN GRAVELY
Last edited by corbingravely on Tue Aug 08, 2017 1:27 am, edited 3 times in total.
corbingravely
 
Posts: 7
Joined: Tue Jan 21, 2014 11:08 pm

Re: XE5 news

Postby rlebeau » Wed Jan 22, 2014 1:26 pm

corbingravely wrote:I have just heard the start of a new program for the new version of Delphi. But, what I need to know is; if it is true? I would love to enroll myself with it if the program is for real. And thank you in advance.


I have not heard of any new Delphi/C++Builder version being started yet. Where did you hear that?
Remy Lebeau (TeamB)
Lebeau Software
User avatar
rlebeau
BCBJ Author
BCBJ Author
 
Posts: 1449
Joined: Wed Jun 01, 2005 3:21 am
Location: California, USA

Re: XE5 news

Postby corbingravely » Wed Jan 29, 2014 2:54 am

i actually heard this from a friend of mine. and i actually do not know if he is telling the truth..!!!!!
corbingravely
 
Posts: 7
Joined: Tue Jan 21, 2014 11:08 pm

Re: XE5 news

Postby rlebeau » Wed Jan 29, 2014 2:35 pm

Unless Embarcadero itself publically announces it, then anything you hear has to be treated as rumor/hearsay. If your friend knows something that is not public knowledge yet, then he is breaking NDA agreements (and anyone here would be bound by NDA from confirming it, either).
Remy Lebeau (TeamB)
Lebeau Software
User avatar
rlebeau
BCBJ Author
BCBJ Author
 
Posts: 1449
Joined: Wed Jun 01, 2005 3:21 am
Location: California, USA

Re: XE5 news

Postby Lena » Fri Jan 31, 2014 2:23 am

News about Android and C++ Builder:
Here the evangelist Vsevolod Leonov: http://blogs.embarcadero.com/vsevolodle ... /#comments (Russian) writes that the open beta testing of Android.
Lena
BCBJ Master
BCBJ Master
 
Posts: 519
Joined: Sun Feb 06, 2011 1:28 pm

Re: XE5 news

Postby rlebeau » Sun Feb 02, 2014 7:01 pm

Lena wrote:Here the evangelist Vsevolod Leonov: http://blogs.embarcadero.com/vsevolodle ... /#comments (Russian) writes that the open beta testing of Android.


That is a comment (and one thrown out in passing) on one employee's blog. That is hardly an official announcement by Embarcadero itself.

I cannot confirm or deny whether a C++ Android beta is currently in progress :)
Remy Lebeau (TeamB)
Lebeau Software
User avatar
rlebeau
BCBJ Author
BCBJ Author
 
Posts: 1449
Joined: Wed Jun 01, 2005 3:21 am
Location: California, USA

Re: XE5 news

Postby Lena » Wed Mar 05, 2014 11:06 am

Lena
BCBJ Master
BCBJ Master
 
Posts: 519
Joined: Sun Feb 06, 2011 1:28 pm

Previous

Return to News

Who is online

Users browsing this forum: No registered users and 1 guest

cron