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
Antwort Antwort
Seite 6 von 9   « Erste     456 78     Letzte »    
devidespe

Registriert seit: 7. Sep 2006
Ort: Berlin
434 Beiträge
 
Delphi 10.4 Sydney
 
#51

Re: Comparing functions

  Alt 5. Nov 2007, 08:10
Zitat von Razor:
As you can see here i was experimenting something and the below looked like is it gonna happen but should i worry about warning?

Delphi-Quellcode:
procedure tmainfrm.amd64x2start;
var
C0:string;
GetInstance:tomcdrv;
pdata: DWord;
begin

       GetInstance.IPCIIORef.GetPCIRDWord(0,24,$03,$E4,pdata);
       GetInstance.IPCIIORef.SetPCIRDWord(0,24,$03,$E4, pdata and not (1 shl 2));
       GetInstance.IPCIIORef.GetPCIRDWord(0,24,$03,$E4,pdata);
       C0:=Format('%d °C',[(pdata shr 16 and $FF)-49]);
       RzLabel99.caption:=C0;

//But then i get [Warning] Temperatures.inc(117): Variable 'GetInstance' might not have been initialized
Thats because TOMCDrv is a class with an initialization routine, which has to be run first. Begin this procedure with GetInstance.Create()

Zitat von Razor:
Delphi-Quellcode:
procedure tmainfrm.amd64x2start;
var
C0:string;

pdata: DWord;
begin

       OMCDRV.tGetPCIRDWord(0,24,$03,$E4,pdata);
       OMCDRV.tSetPCIRDWord(0,24,$03,$E4, pdata and not (1 shl 2));
       OMCDRV.tGetPCIRDWord(0,24,$03,$E4,pdata);
       C0:=Format('%d °C',[(pdata shr 16 and $FF)-49]);
       RzLabel99.caption:=C0;

//But then i get [Fatal Error]Internal error: BA1993 or [Fatal Error] Internal error: L1333
I've never had that kind of error and the documentation doesn't provide any info.

But why don't you create a large class and add there all functions for port reading, msr reading and so on ? Your unit contains a lot of double functions, e.g. 4 or 5 times the readportbyte function. That could be combined into one class to avoid those kind of error messages.
Devid
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#52

Re: Comparing functions

  Alt 5. Nov 2007, 08:11
Okay i will post the thing i am working on as we speak..
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#53

Re: Comparing functions

  Alt 5. Nov 2007, 08:20
Okay done i get result -49 C but i dont have AMD so yea...
  Mit Zitat antworten Zitat
devidespe

Registriert seit: 7. Sep 2006
Ort: Berlin
434 Beiträge
 
Delphi 10.4 Sydney
 
#54

Re: Comparing functions

  Alt 5. Nov 2007, 08:23
Let me test this project on my Athlon64 and I will get back to you later today.
Devid
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#55

Re: Comparing functions

  Alt 5. Nov 2007, 08:49
Okay the new version with the omc driver so yea go ahead and test it.If you find a bug report back...

[edit=Phoenix]Anhang wg. Copyright entfernt. Mfg, Phoenix[/edit]
  Mit Zitat antworten Zitat
Muetze1
(Gast)

n/a Beiträge
 
#56

Re: Comparing functions

  Alt 5. Nov 2007, 12:56
Zitat von devidespe:
Had the same problem here too and Delphi needs sometimes a complete code compilation (sometimes 2 or 3 times) to know, that a variable is a DWord and not a Cardinal. But that must have mean, that a cardinal type was there previously.
It is a complete normal behaviour, known - at least - since D3. Delphi extends all size-specific to the actual (compiler size) generic types. So LongInt will be shown as Integer, LongWord as Cardinal, etc. The data types are equal for the actual compiler (32 Bit Compiler), so don't care.
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#57

Re: Comparing functions

  Alt 5. Nov 2007, 18:05
Did anybody test this
  Mit Zitat antworten Zitat
mkinzler
(Moderator)

Registriert seit: 9. Dez 2005
Ort: Heilbronn
39.851 Beiträge
 
Delphi 11 Alexandria
 
#58

Re: Comparing functions

  Alt 5. Nov 2007, 18:24
It doesn't work on Vista 64Bit
Markus Kinzler
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#59

Re: Comparing functions

  Alt 5. Nov 2007, 18:27
Hmm driver is 64 bit compliant can you try to look in the code?
  Mit Zitat antworten Zitat
mkinzler
(Moderator)

Registriert seit: 9. Dez 2005
Ort: Heilbronn
39.851 Beiträge
 
Delphi 11 Alexandria
 
#60

Re: Comparing functions

  Alt 5. Nov 2007, 18:34
I ain't a problem of lack of 64bit capability. The programm isn't able to load the IO-driver.
Markus Kinzler
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 6 von 9   « Erste     456 78     Letzte »    


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 19:13 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz