Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Delphi] Get Real Date (BiosDate) ?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
h4c0r-BG
Master Cheater
Reputation: 0

Joined: 29 Nov 2006
Posts: 449
Location: The yogurt country

PostPosted: Mon Jun 02, 2008 4:21 pm    Post subject: [Delphi] Get Real Date (BiosDate) ? Reply with quote

I'd like to use the hardware clock date in my delphi application but i do not know how to.

I've looked in google for "biosdate delphi" but results like this were found:

Code:
function BiosDate: String;
begin
   result := string(pchar(ptr($FFFF5)));
end;


Which returns this:




=====================================


I found in the net a whole program which gets full info about the bios:

Code:
function TForm1.GetBiosInfo(var NameBios, Copyright, Info,
  Datum: String): Boolean;
const
  BiosName      = $FE061;
  BiosCopyright = $FE091;
  BiosInfo      = $FEC71;
  BiosDate      = $FFFF5;
begin
  Result := True;

  try
    NameBios := String(PChar(Ptr(BiosName)));
  except  end;

  try
    Copyright := string (PChar (Ptr(BiosCopyright)));
  except  end;

  try
    Info := string (PChar (Ptr(BiosInfo)));
  except  end;

  try
     Datum := string (PChar (Ptr(BiosDate)));
  except  end;
end;


But the result is not good:



I've attached the program if somebody wants to explore it's code.
link if can not see attachment


I want to ask all of you if there is some other alternative way to get the REAL date of today because user can change the windows date very easily and my application could be fooled.

Thank you all for reading my post. I hope somebody could help me.



The Extension 'zip' was deactivated by an board admin, therefore this Attachment is not displayed.


_________________

Back to top
View user's profile Send private message
Estx
Expert Cheater
Reputation: 0

Joined: 04 Mar 2008
Posts: 172

PostPosted: Tue Jun 03, 2008 12:11 am    Post subject: Reply with quote

GetSystemTime API
GetLocalTime API

SYSTEMTIME structure

Is that what you're looking for? Gets date/time (UTC/GMT) from the current system's clock.
Back to top
View user's profile Send private message
h4c0r-BG
Master Cheater
Reputation: 0

Joined: 29 Nov 2006
Posts: 449
Location: The yogurt country

PostPosted: Tue Jun 03, 2008 6:24 am    Post subject: Reply with quote

The problem is the same.

I allready use GetSystemTime Function so i tried GetLocalTime();

I've good nice example here of GetLocalTime(); but if i still change my windows clock date my program shows the edited date, not the real (3 June 2008).

And about "SYSTEMTIME", couldn't see it in Delphi ...

So do you have any other good ideas, about extracting some system files the last modified date or something like that? I just need ideas.

_________________

Back to top
View user's profile Send private message
Estx
Expert Cheater
Reputation: 0

Joined: 04 Mar 2008
Posts: 172

PostPosted: Tue Jun 03, 2008 7:48 am    Post subject: Reply with quote

Using WMI scripting you can obtain the following from the BIOS
Code:
  uint16 BiosCharacteristics[];
  string BIOSVersion[];
  string BuildNumber;
  string Caption;
  string CodeSet;
  string CurrentLanguage;
  string Description;
  string IdentificationCode;
  uint16 InstallableLanguages;
  datetime InstallDate;
  string LanguageEdition;
  String ListOfLanguages[];
  string Manufacturer;
  string Name;
  string OtherTargetOS;
  boolean PrimaryBIOS;
  datetime ReleaseDate;
  string SerialNumber;
  string SMBIOSBIOSVersion;
  uint16 SMBIOSMajorVersion;
  uint16 SMBIOSMinorVersion;
  boolean SMBIOSPresent;
  string SoftwareElementID;
  uint16 SoftwareElementState;
  string Status;
  uint16 TargetOperatingSystem;
  string Version;
(taken from MSDN)

Come to think of it, the BIOS date/time is synced with the Windows Core time.

What are you trying to achieve anyway? There will most likely be a better way.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8588
Location: 127.0.0.1

PostPosted: Tue Jun 03, 2008 9:12 am    Post subject: Reply with quote

http://www.delphi3000.com/articles/article_2763.asp

Check that link. It goes into a bit of detail as to why you get errors. (I dunno Delphi so I'm not sure if theres working code there to solve the issue.)

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites