RRUZ / tsmbios

Library to access the SMBIOS using Object Pascal (Delphi, FPC).
https://theroadtodelphi.wordpress.com/
202 stars 72 forks source link

Samples cannot be compiled on D5 and D7 #12

Closed Sharky444 closed 9 years ago

Sharky444 commented 9 years ago

The feature description states:

Supports Delphi 5, 6, 7, 2005, BDS/Turbo 2006 and RAD Studio 2007, 2009, 2010, XE, XE2, XE3, XE4, XE5, XE6, XE7

Unfortunately all the examples cannot be compiled in Delphi 5 and 7. In 90% of cases because of such a line of code:

  for LBaseBoard in SMBios.BaseBoardInfo do

The code will work if the line is changed to something like this:

  for i := Low (SMBios.BaseBoardInfo) to High(SMBios.BaseBoardInfo) do
  begin
    LBaseBoard := SMBios.BaseBoardInfo[i];
RRUZ commented 9 years ago

Hi I'm aware of this, the support for the old Delphi versions was added later to the project, so some sample projects was not updated to run on older versions of Delphi. Anyway these are just samples of how use the project.