-=-
.
.....
  
 
RSS
Direkomendasikan menggunakan brower Opera/Chrome/Firefox. Resolusi minimal 1024x768 | Powered by ____ |
 
  
 
Nikmati Delphi-ID dalam berbagai versi tampilan :
Basic View (LOW Bandwidth)
Default View (Full)
Mobile Edition
Main Menu
..:: onWebTools ::..
..:: onLastPosts ::..
goto Postjumlah komponen maksimal dalam sebuah project(6)
 by d4mnf1y32
 on 21.May at 12:16
goto Posttanya grayscale to biner dengan scanline(1)
 by luckynvic
 on 20.May at 20:44
goto Posttanya looping biner to matriks(1)
 by luckynvic
 on 20.May at 20:10
goto Postsql error:acces denied for user....(2)
 by nasbms
 on 19.May at 16:54
goto Postpemanggilan frame(4)
 by nasbms
 on 19.May at 16:14
goto Posttanya AvLock(0)
 by azuriza
 on 19.May at 11:24
goto PostGet TDBEdit Value Menggunakan LookUp Grid(10)
 by henry_sys
 on 18.May at 11:27
goto Postmenghitung record dalam perulangan(4)
 by idhiel
 on 16.May at 13:53
goto Posttanya ascii(4)
 by mas_kofa
 on 16.May at 12:11
goto PostRawPrint Untuk Delphi XE2(0)
 by adewijaya
 on 15.May at 22:34
goto Postdatabase error..(4)
 by idhiel
 on 15.May at 15:57
goto Postbekasi, pt arila putra mahkota(3)
 by mas_kofa
 on 15.May at 15:37
goto Postbagaimana cara membaca file *.doc dg delphi?(0)
 by ficky
 on 15.May at 06:14
goto Posttanya biner to matriks(13)
 by diandewi
 on 14.May at 20:30

..:: onLast Articles ::..
..:: New Download ::..
Pascal-id.Org
Feeds -  Popular -  Latest
RE: The Longue
8 months, 3 weeks ago
RE: belajar pascal
8 months, 3 weeks ago
RE: The Longue
8 months, 3 weeks ago
RE: belajar pascal
8 months, 3 weeks ago
RE: Perkenalan dan Absen
8 months, 3 weeks ago
RE: Alhamdulillah Buka Puasa Bersama
8 months, 4 weeks ago
RE: تَقَبَّلَ اللهُ مِنَّا وَمِنْكَ - Selamat Hari Raya Idul Fitri
8 months, 4 weeks ago
Lintas Situs
«
free web site stats and visitor tracking

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
dedidavidbalaOffline
Location:
32 Post subject: Mas2,ibu2,ade2,Sesepuh D-I coba masuk sini<<Tar Aja, t  PostPosted: 16/Jun/2011 17:07
onConfident


Joined: 14-May-2011
Posts: 20

Status: Offline
sebelumnya salam kenal,,dan maaf masi newbie''jgn ketawa ya kk??
mas boleh minta bantuannya ngak'' saya berencana buat CPU temperatur(pengukur panas atau normal satu PC atau leptop)
      Quote:
hanya satu aja pintaQ..pengukur CPU temperatur?

bagaimana saya dapatkan coding itu...helpp

ini referensi dari MSND cuma tiadak bisa saya jalankan..pusing.com
ada yg bisa jalankan dan jelasin maksudnya apa....
      Quote:

Delphi 7 - Detect temperature CPU dengan Delphi
Untuk membuat program yang bisa digunakan untuk mendeteksi temperature PC cukup menggunakan WMI classes Win32_TemperatureProbe dan Win32_Fan, caranya adalah :

Import Microsoft WMIScripting V1.x library

Component->Import Component->Import type library->Next->"Select the library"->Next->Add unit to project->Finish.

Contoh Code//

      Code:


program GetWMI_Info;

{$APPTYPE CONSOLE}

uses
  ActiveX,
  Variants,
  SysUtils,
  WbemScripting_TLB in '..\..\..\Documents\RAD Studio\5.0\Imports\WbemScripting_TLB.pas';

procedure ShowTemperatureInfo();
var
  WMIServices: ISWbemServices;
  Root       : ISWbemObjectSet;
  Item       : Variant;
  I          : Integer;
begin
 {
 http://msdn.microsoft.com/en-us/library/aa394493%28VS.85%29.aspx
 The Win32_TemperatureProbe  WMI class represents the properties of a temperature sensor (electronic thermometer).
 Most of the information that the Win32_TemperatureProbe WMI class provides comes from SMBIOS.
 Real-time readings for the CurrentReading property cannot be extracted from SMBIOS tables.
 For this reason, current implementations of WMI do not populate the CurrentReading property.
 The CurrentReading property's presence is reserved for future use.
 }

  Writeln('Temperature Info');
  Writeln('----------------');

  WMIServices := CoSWbemLocator.Create.ConnectServer('.', 'root\cimv2','', '', '', '', 0, nil);
  Root  := WMIServices.ExecQuery('Select * FROM Win32_TemperatureProbe','WQL', 0, nil);
  for I := 0 to Root.Count - 1 do
  begin
    Item := Root.ItemIndex(I);
      Writeln('Accuracy                        '+VarToStr(Item.Accuracy));
      Writeln('Availability                    '+VarToStr(Item.Availability));
      Writeln('Caption                         '+Item.Caption);
      Writeln('Config Manager Error Code       '+VarToStr(Item.ConfigManagerErrorCode));
      Writeln('Config Manager User Config      '+VarToStr(Item.ConfigManagerUserConfig));
      Writeln('Creation Class Name             '+VarToStr(Item.CreationClassName));
      Writeln('Current Reading                 '+VarToStr(Item.CurrentReading));
      Writeln('Description                     '+VarToStr(Item.Description));
      Writeln('Device ID                       '+VarToStr(Item.DeviceID));
      Writeln('Error Cleared                   '+VarToStr(Item.ErrorCleared ));
      Writeln('Error Description               '+VarToStr(Item.ErrorDescription));
      Writeln('Install Date                    '+VarToStr(Item.InstallDate));
      Writeln('Is Linear                       '+VarToStr(Item.IsLinear));
      Writeln('Last Error Code                 '+VarToStr(Item.LastErrorCode));
      Writeln('Lower Threshold Critical        '+VarToStr(Item.LowerThresholdCritical));
      Writeln('Lower Threshold Fatal           '+VarToStr(Item.LowerThresholdFatal));
      Writeln('Lower Threshold NonCritical     '+VarToStr(Item.LowerThresholdNonCritical));
      Writeln('Max Readable                    '+VarToStr(Item.MaxReadable));
      Writeln('Min Readable                    '+VarToStr(Item.MinReadable));
      Writeln('Name                            '+VarToStr(Item.Name));
      Writeln('Nominal Reading                 '+VarToStr(Item.NominalReading));
      Writeln('Normal Max                      '+VarToStr(Item.NormalMax));
      Writeln('Normal Min                      '+VarToStr(Item.NormalMin ));
      Writeln('PNP Device ID                   '+VarToStr(Item.PNPDeviceID));
      Writeln('Power Management Capabilities   '+VarToStr(Item.PowerManagementCapabilities));
      Writeln('Power Management Supported      '+VarToStr(Item.PowerManagementSupported));
      Writeln('Resolution                      '+VarToStr(Item.Resolution));
      Writeln('Status                          '+VarToStr(Item.Status));
      Writeln('Status Info                     '+VarToStr(Item.StatusInfo));
      Writeln('System Creation Class Name      '+VarToStr(Item.SystemCreationClassName));
      Writeln('System Name                     '+VarToStr(Item.SystemName));
      Writeln('Tolerance                       '+VarToStr(Item.Tolerance));
      Writeln('Upper Threshold Critical        '+VarToStr(Item.UpperThresholdCritical));
      Writeln('Upper Threshold Fatal           '+VarToStr(Item.UpperThresholdFatal));
      Writeln('Upper Threshold NonCritical     '+VarToStr(Item.UpperThresholdNonCritical));
      Writeln('');
  end;
end;

procedure  ShowCPUFanInfo();
var
  WMIServices: ISWbemServices;
  Root       : ISWbemObjectSet;
  Item       : Variant;
  I          : Integer;
begin
 {
  http://msdn.microsoft.com/en-us/library/aa394146%28VS.85%29.aspx
  The Win32_Fan WMI class represents the properties of a fan device in the computer system. For example, the CPU cooling fan.
 }
  Writeln('CPU FAN Info');
  Writeln('----------------');
  WMIServices := CoSWbemLocator.Create.ConnectServer('.', 'root\cimv2','', '', '', '', 0, nil);
  Root  := WMIServices.ExecQuery('Select * FROM Win32_Fan','WQL', 0, nil);
  for I := 0 to Root.Count - 1 do
  begin
    Item := Root.ItemIndex(I);

    Writeln('ActiveCooling                     '+VarToStr(Item.ActiveCooling));
    Writeln('Availability                      '+VarToStr(Item.Availability));
    Writeln('Caption                           '+VarToStr(Item.Caption));
    Writeln('Config Manager ErrorCode          '+VarToStr(Item.ConfigManagerErrorCode));
    Writeln('Config Manager UserConfig         '+VarToStr(Item.ConfigManagerUserConfig));
    Writeln('Creation ClassName                '+VarToStr(Item.CreationClassName));
    Writeln('Description                       '+VarToStr(Item.Description));
    Writeln('DesiredSpeed                      '+VarToStr(Item.DesiredSpeed));
    Writeln('DeviceID                          '+VarToStr(Item.DeviceID));
    Writeln('ErrorCleared                      '+VarToStr(Item.ErrorCleared));
    Writeln('ErrorDescription                  '+VarToStr(Item.ErrorDescription));
    Writeln('InstallDate                       '+VarToStr(Item.InstallDate));
    Writeln('LastErrorCode                     '+VarToStr(Item.LastErrorCode));
    Writeln('Name                              '+VarToStr(Item.Name));
    Writeln('PNPDeviceID                       '+VarToStr(Item.PNPDeviceID));
    Writeln('PowerManagement Capabilities      '+VarToStr(Item.PowerManagementCapabilities));
    Writeln('PowerManagement Supported         '+VarToStr(Item.PowerManagementSupported));
    Writeln('Status                            '+VarToStr(Item.Status));
    Writeln('StatusInfo                        '+VarToStr(Item.StatusInfo));
    Writeln('SystemCreation ClassName          '+VarToStr(Item.SystemCreationClassName));
    Writeln('SystemName                        '+VarToStr(Item.SystemName));
    Writeln('VariableSpeed                     '+VarToStr(Item.VariableSpeed));
    Writeln('');
  end;

End;


begin
  try
    CoInitialize(nil);
        ShowTemperatureInfo();
        ShowCPUFanInfo();
        Readln;
    CoUninitialize;
  except
    on E:Exception do
    Begin
        CoUninitialize;
        Writeln(E.Classname, ': ', E.Message);
        Readln;
    End;
  end;
end.
Very Happy Very Happy Rolling Eyes Rolling Eyes
 
 View user's profile Send private message  
Reply with quote Back to top
DookieOffline
Location:
Post subject: Re: Mas2,ibu2,ade2,Sesepuh D-I coba masuk sini<<Tar Aj  PostPosted: 20/Jun/2011 22:49
onNovice


Joined: 03-Nov-2007
Posts: 15

Status: Offline
Pake Delphi berapa bro??....ga ada masalah tuh dengan koding yg bro berikan...
hasil outputx nanti muncul pada command prompt aja
 
 View user's profile Send private message  
Reply with quote Back to top
DookieOffline
Location:
Post subject: Re: Mas2,ibu2,ade2,Sesepuh D-I coba masuk sini<<Tar Aj  PostPosted: 20/Jun/2011 22:52
onNovice


Joined: 03-Nov-2007
Posts: 15

Status: Offline
coba check di http://theroadtodelphi.wordpress.com/category/wmi/
untuk contoh2 penggunaan WMI...mudah2an bisa membantu[/url]
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic





Powered by PNphpBB2 © 2003-2009 The Zafenio Team
Credits


| Register | Lost Password ? |