AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Comparing functions

Ein Thema von Razor · begonnen am 28. Aug 2007 · letzter Beitrag vom 8. Nov 2007
 
DevidEspenschied

Registriert seit: 7. Sep 2006
Ort: Berlin
444 Beiträge
 
Delphi 12 Athens
 
#32

Re: Comparing functions

  Alt 8. Nov 2007, 11:16
Wow, that was tricky.

Some things to notice. First of all, if you declare a procedure with the name amd64x2, it is better to call it. So the correct FormCreate procedure would be:

Delphi-Quellcode:
procedure TForm1.FormCreate(Sender: TObject);
begin
  isLoadDr := GetInstance.LoadDriver;
  if not isLoadDr then MessageBox(form1.Handle,'Couldn''t Start I/O Driver! Some features will be disabled!', 'Couldn''t Start I/O Driver!', MB_ICONINFORMATION)
  else amd64x2;
end;
The next thing is within amd64x2, where you have the following if line:

cxCpu401.Available.Available=2 According to the TcxCPU40 component this line checks, if there is more then one physical core. But that is not correct, because my AMD Athlon 64 +3400 does have only one core (here the value 1) and that core provides internal temperature readings via #THERMPRIP. So the line should be updated to:

cxCpu401.Available.Available IN [1..2] And the last, but most catastrophically thing, is the exception, which is generated with the line:

GetInstance.IPCIIORef.GetPCIRDWord(0,24,$03,$E4,pdata); within TForm1.Timer1Timer. And I doesn't have the time to check this within the OMCDrv unit, because there are so many types, classes and structurtes. I would suggest, you manipulate this program somehow to read a basic PC port, such as the parallel port ($378) or the CMOS port ($70) to make sure, that your core reading routine works fine. The results from these port readings could be shown via the ShowMessage function, and compared with a simple DOS reading. Herefore you could create a simple DOS application like:

Delphi-Quellcode:
program dosporttest;
uses crt, dos;
begin
  clrscr;
  writeln(port[$378]);
  writeln(port[$70]);
  readln;
end.
At least that is always my way to verify a windows based hardware near function.
Devid
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:28 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz