AGB  ·  Datenschutz  ·  Impressum  







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

Notebook temperature?

Ein Thema von Razor · begonnen am 9. Aug 2007 · letzter Beitrag vom 13. Aug 2007
Antwort Antwort
Seite 2 von 2     12   
Daniel G
(Gast)

n/a Beiträge
 
#11

Re: Notebook temperature?

  Alt 9. Aug 2007, 21:44
Relax folks, relax...
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#12

Re: Notebook temperature?

  Alt 9. Aug 2007, 21:49
Yea no problemo Daniel,its just that i dont need to experiment i asked if someone knows or has tried to code cpu temperature that works on notebook?
  Mit Zitat antworten Zitat
fLaSh11
(Gast)

n/a Beiträge
 
#13

Re: Notebook temperature?

  Alt 10. Aug 2007, 01:06
Zitat von Razor:
how can i read it through delphi code
u could try to use Hier im Forum suchenWMI ; Bei Google suchenDelphi WMI.
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#14

Re: Notebook temperature?

  Alt 10. Aug 2007, 18:00
Okay..

-Where do i get EC(Embeded Controler)Name ?
-How can i if its even possible to change notebook's fan speed,its in bios and it changes with temperature and cpu usage.
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#15

Re: Notebook temperature?

  Alt 13. Aug 2007, 16:14
Now the thing is that this wont work on my motherboard i get error that it isnt supported,but i have a question can it work on notebooks?

I found this info on www.delphi-forum.de


Delphi-Quellcode:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs,WbemScripting_TLB,activex, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    procedure WMIdata(Sender: TObject);
    function GetWMIstring2 (wmiHost, wmiClass, wmiProperty : string):string;
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}
function TForm1.GetWMIstring2 (wmiHost, wmiClass, wmiProperty : string):string;
var // These are all needed for the WMI querying process
  Locator: ISWbemLocator;
  Services: ISWbemServices;
  SObject: ISWbemObject;
  ObjSet: ISWbemObjectSet;
  SProp: ISWbemProperty;
  Enum: IEnumVariant;
  Value: Cardinal;
  TempObj: OleVariant;
  SN: string;
begin
  try
  Locator := CoSWbemLocator.Create;
   Services := Locator.ConnectServer(wmiHost, 'root\wmi', '', '', '','', 0, nil);
  ObjSet := Services.ExecQuery('SELECT * FROM '+wmiClass, 'WQL',
    wbemFlagReturnImmediately and wbemFlagForwardOnly , nil);
  Enum := (ObjSet._NewEnum) as IEnumVariant;
  while (Enum.Next(1, TempObj, Value) = S_OK) do
  begin
    SObject := IUnknown(tempObj) as ISWBemObject;
    SProp := SObject.Properties_.Item(wmiProperty, 0);
    if VarIsNull(SProp.Get_Value) then
      result := ''  
    else
    begin
      SN := SProp.Get_Value;
      result := SN;
    end;
  end;
  except
   on exception do
    result := '';
   end;
end;
 procedure TForm1.WMIdata(Sender: TObject);
var tmpstr : string; cputemp : Integer;
begin
tmpstr := getWMIstring2('','MSAcpi_ThermalZoneTemperature','CurrentTemperature');
  if tmpstr <> 'then
  Begin
    cputemp:= (StrToInt(tmpstr) - 2732) div 10;
    form1.caption := IntToStr(cputemp) + ' °C'
  end else
   form1.Caption := 'ERROR';
end;

procedure TForm1.Button1Click(Sender: TObject);
var tmpstr : string; cputemp : Integer;
begin
tmpstr := getWMIstring2('','MSAcpi_ThermalZoneTemperature','CurrentTemperature');
  if tmpstr <> 'then
  Begin
    cputemp:= (StrToInt(tmpstr) - 2732) div 10;
    form1.caption := IntToStr(cputemp) + ' °C'
  end else
   form1.Caption := 'ERROR';
end;
end.
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 2 von 2     12   


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:19 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