Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 494
  • Last Modified:

retrieve bios date using delphi

Hi,

I use Delphi 6.
Under WinXP I used following code to retrieve bios information

Function GetBIosInfo: string;
var
BiosDate, BiosName, BiosVersion, BiosNum: String;
begin
try
    BiosDate:=string(pchar(ptr($ffff5)));
    BiosName:=string(pchar(ptr($ffa68)));
    BiosVersion:=string(pchar(ptr($fe061)));
    BiosNum:=string(pchar(ptr($fec71)));
    Result := BiosDate; //BiosName, BiosVersion etc
except
    Result := 'no result';
end;
end;

Moved to Win 7 I noticed that there is no result. Code withing try is not ecexuted.

I also noticed answerID=1215430. Trying it was ineffective too, giving a compiling error in the line
  Selector := AllocSelector(DSeg);  // undeclared identifier: AllocSelector
(Might be more compiling errors in later laines)

Could you please propose something?

Best regards
Nikiforos
0
nikif
Asked:
nikif
2 Solutions
 
ste5anSenior DeveloperCommented:
I'm surprised that this really worked on all machines. Did this really work on NT windows? Cause the only direct available BIOS I know where addressable in DOS.

Newer computers don't have a BIOS anymore, they have UEFI. So you should explain why you want to interact with the hardware.

Maybe this is what you're looking for: ...read the ROM-BIOS?
0
 
MerijnBSr. Software EngineerCommented:
I agree with ste5an, besides, this is tricky stuff and might be different for different bioses and operating systems.

I would either use something commercial like:
http://www.mitec.cz/msics.html

Or try to get this info through WMI:
https://msdn.microsoft.com/en-us/library/aa394077%28v=vs.85%29.aspx
http://delphi.xcjc.net/viewthread.php?tid=46207
http://stackoverflow.com/questions/9939725/get-bios-uuid-from-c-or-delphi-from-win32
0
 
nikifAuthor Commented:
Thank you both. I really ignored the status of new machines. I recently went to Win7, so I tried to have some of my applications in the the W7 environment
nikif
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now