Einzelnen Beitrag anzeigen

Razor
(Gast)

n/a Beiträge
 
#6

Re: C++ 2 Delphi, Core2duo/quad Reading

  Alt 27. Aug 2007, 21:13
Zitat:
@Razor:

I would say its very complex to translate C code into Delphi, and another problem is the driver you have. Every driver contains other methods with different calling parameters, so nobody knows how to access your specific driver.

The simplest way is to read the Intel® 64 and IA-32 Architectures Software Developer's Manual, where chapter 13 (Power And Thermal Management) contains the needed ways to gain the core temperatures. Before that you have to check the processor requirements, and if they are available (via the CPUID command, some bits in the Feature capabilities). The CPUID command is accessable in combination with Delphi itself, for the MSR access you need a device driver with ring 0 access and a delphi application with admin rights to load it.

If you have the routines to read MSR and CPUID functions, the temperature readout is quite simple. Just read the chapter 13 within the above Intel document. If there are other questions just ask. But be sure that nobody translates C code or wrote the Delphi code for you.

Hope that helps...

This is the driver i use.Will this do or it wont?

Another interesting code


Delphi-Quellcode:
function cDrvIface.ReadMSR(ulECX:DWord; var MSRreg:tmsr):boolean;
begin
  result:=false;
  FillChar(MSRreg, SizeOf(MSRreg), 0);
  if not isLoad then exit;
  if Assigned(fOSMethods[WindowsVer].RMSR) then
       result:=fOSMethods[WindowsVer].RMSR(ulECX, MSRreg);
end;
[edit=SirThornberry]delphi-tags replaced with quote-tags and quote-tags replaced with delphi-tags - Mfg, SirThornberry[/edit]
Angehängte Dateien
Dateityp: rar driver_567.rar (8,3 KB, 37x aufgerufen)
  Mit Zitat antworten Zitat