Delphi-PRAXiS
Seite 3 von 4     123 4      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi openlibsys.org Open source driver (https://www.delphipraxis.net/113252-openlibsys-org-open-source-driver.html)

Muetze1 6. Mai 2008 13:20

Re: openlibsys.org Open source driver
 
Zitat:

Zitat von devidespe
Set a debug breakpoint before the line:

Delphi-Quellcode:
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.

FAlter 6. Mai 2008 13:26

Re: openlibsys.org Open source driver
 
Hi,

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

Delphi-Quellcode:
procedure InitializeDll(); stdcall; external 'WinRing0x64.dll';
Mfg
FAlter

Razor 6. Mai 2008 18:58

Re: openlibsys.org Open source driver
 
Static loading trouble only dynamic loading will probably solve this but i have no IDEA how to do it! :?



Delphi-Quellcode:
 procedure InitializeDll(); stdcall; external 'WinRing0.dll';

This one works 100% But as i have vista x64 then its no good.

Razor 6. Mai 2008 19:33

Re: openlibsys.org Open source driver
 
Liste der Anhänge anzeigen (Anzahl: 1)
I did it for AMD core reading...

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

People please test! :-D

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);
   }
}

Razor 7. Mai 2008 12:06

Re: openlibsys.org Open source driver
 
Zero comments and 2 downloads thats pathetic! :pale:

Muetze1 7. Mai 2008 12:10

Re: openlibsys.org Open source driver
 
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?

Razor 7. Mai 2008 12:11

Re: openlibsys.org Open source driver
 
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.

Phoenix 7. Mai 2008 12:16

Re: openlibsys.org Open source driver
 
Zitat:

Zitat von Razor
This what ive done so far,error comes up i uploaded the image..
Delphi-Quellcode:
   procedure InitializeDll(); stdcall; external 'WinRing0x64.dll';

:wall:

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...

Razor 7. Mai 2008 12:18

Re: openlibsys.org Open source driver
 
Thanks Phoenix for the clearing stuff out,i didn't know that...No really thanks.
I will upload images via DP uploading system.. :)

Razor 7. Mai 2008 18:21

Re: openlibsys.org Open source driver
 
Liste der Anhänge anzeigen (Anzahl: 1)
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. :roll:

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;


Alle Zeitangaben in WEZ +1. Es ist jetzt 10:21 Uhr.
Seite 3 von 4     123 4      

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