AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) Delphi openlibsys.org Open source driver
Thema durchsuchen
Ansicht
Themen-Optionen

openlibsys.org Open source driver

Ein Thema von Razor · begonnen am 5. Mai 2008 · letzter Beitrag vom 14. Aug 2009
Antwort Antwort
Seite 3 von 4     123 4      
Muetze1
(Gast)

n/a Beiträge
 
#21

Re: openlibsys.org Open source driver

  Alt 6. Mai 2008, 14:20
Zitat von devidespe:
Set a debug breakpoint before the line:

ring := LoadLibrary(PChar(Pfad)); and check the content of the Pfad variable. Maybe some backslash is missing.
This can't happen, because FileExists() would fail in that case...

The DLL references some other DLLs that can not be found or exports in that DLLs could not be found.
  Mit Zitat antworten Zitat
Benutzerbild von FAlter
FAlter

Registriert seit: 21. Jul 2004
Ort: Ostfildern
1.096 Beiträge
 
FreePascal / Lazarus
 
#22

Re: openlibsys.org Open source driver

  Alt 6. Mai 2008, 14:26
Hi,

why loading the DLL with LoadLibrary when using start-time linking in this line?

procedure InitializeDll(); stdcall; external 'WinRing0x64.dll'; Mfg
FAlter
Felix Alter
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#23

Re: openlibsys.org Open source driver

  Alt 6. Mai 2008, 19:58
Static loading trouble only dynamic loading will probably solve this but i have no IDEA how to do it!



 procedure InitializeDll(); stdcall; external 'WinRing0.dll';
This one works 100% But as i have vista x64 then its no good.
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#24

Re: openlibsys.org Open source driver

  Alt 6. Mai 2008, 20:33
I did it for AMD core reading...

However it needs testing so people with AMD 64 K7 cpus.

People please test!

Needs translation!

Delphi-Quellcode:
void ReadTemp(HWND hWnd)
{
   DWORD eax, edx;

   RdmsrEx(0x19C, &eax, &edx, 1);

   eax &= 0x007F0000;
   eax = eax >> 16;

   SetDlgItemInt(hWnd, IDC_STATIC1, -(int)eax, TRUE);

   RdmsrEx(0x19C, &eax, &edx, 1 << 1);

   eax &= 0x007F0000;
   eax = eax >> 16;

   SetDlgItemInt(hWnd, IDC_STATIC2, -(int)eax, TRUE);

   if(numCPU == 4){
      RdmsrEx(0x19C, &eax, &edx, 1 << 2);

      eax &= 0x007F0000;
      eax = eax >> 16;

      SetDlgItemInt(hWnd, IDC_STATIC3, -(int)eax, TRUE);

      RdmsrEx(0x19C, &eax, &edx, 1 << 3);

      eax &= 0x007F0000;
      eax = eax >> 16;

      SetDlgItemInt(hWnd, IDC_STATIC4, -(int)eax, TRUE);
   }

}
Angehängte Dateien
Dateityp: rar amd_ct_133.rar (208,4 KB, 42x aufgerufen)
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#25

Re: openlibsys.org Open source driver

  Alt 7. Mai 2008, 13:06
Zero comments and 2 downloads thats pathetic!
  Mit Zitat antworten Zitat
Muetze1
(Gast)

n/a Beiträge
 
#26

Re: openlibsys.org Open source driver

  Alt 7. Mai 2008, 13:10
What you want? I have no AMD CPU and I tried it on my old K6-2, but it does not work (as expected). So whats your problem?
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#27

Re: openlibsys.org Open source driver

  Alt 7. Mai 2008, 13:11
No it works good the author of Core temp tested it on his X2.He says its quite good.

But Muetze what about the Intel core reading?The c++ code above.
  Mit Zitat antworten Zitat
Benutzerbild von Phoenix
Phoenix
(Moderator)

Registriert seit: 25. Jun 2002
Ort: Hausach
7.641 Beiträge
 
#28

Re: openlibsys.org Open source driver

  Alt 7. Mai 2008, 13:16
Zitat von Razor:
This what ive done so far,error comes up i uploaded the image..
   procedure InitializeDll(); stdcall; external 'WinRing0x64.dll';


1.) Please attach images directly to your posts and do not link to external images. That would brake the post if the external source vanishes.

2.) WinRing0x64.dll seems to be a dll for 64 bit systems.
You DO know that you can't load (or even execute) 64bit code in 32bit processes?

As long as CodeGear does not support a 64bit compiler (which will be somewhere at the end of 2009 telling from the current roadmap) you simply can't work with that 64bit dll in Delphi...
Sebastian Gingter
Phoenix - 不死鳥, Microsoft MVP, Rettungshundeführer
Über mich: Sebastian Gingter @ Thinktecture Mein Blog: https://gingter.org
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#29

Re: openlibsys.org Open source driver

  Alt 7. Mai 2008, 13:18
Thanks Phoenix for the clearing stuff out,i didn't know that...No really thanks.
I will upload images via DP uploading system..
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#30

Re: openlibsys.org Open source driver

  Alt 7. Mai 2008, 19:21
After running this delphi 2007 starts acting weird its creating and exiting threads like nuts...
A picture bellow..


And then it wont even show the temperature I am starting to get left out and boored.

Delphi-Quellcode:
procedure TForm1.FormCreate(Sender: TObject);
VAR
EAX,EDX:DWORD;
Temperature ,delta,maxcores,x,TJunction:integer;

begin
InitializeDll();
cxCpu401.Available.Available:=maxcores;

Rdmsr($00EE,EAX,EDX);
IF EAX and $40000000 = 0 then TJunction := 100 Else TJunction := 85;
form1.Caption:=inttostr(TJunction);


For X := 1 to MaxCores do
Begin
Delta := TJunction;
SetThreadAffinty(X) ;// makes that the function now runs on core X //this<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<,
Rdmsr($019,EAX,EDX);
If HiWord(EAX) and $8000 > 0 then
Delta := HiWord(EAX) and $7F; // Delta-value from the temperature for reading TJunction
Temperature := TJunction-Delta;
End;
Miniaturansicht angehängter Grafiken
d2007_threads_142.jpg  
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 3 von 4     123 4      


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 15:40 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