Page 1 of 1
CPU TDP
Posted: Wed Mar 13, 2013 3:00 pm
by JulioCesarSF
Hi,
I'm doing a project for college and I'm having difficulty getting the TDP processor.
Where do I find the api to get the TDP?
thank you
Re: CPU TDP
Posted: Wed Mar 13, 2013 10:43 pm
by The Coolest
There is no API for TDP. Every CPU vendor chooses a different method of accessing this information.
In either way, it has to be direct access to hardware, which would require you to use a kernel-mode driver.
Re: CPU TDP
Posted: Fri Mar 15, 2013 3:49 am
by JulioCesarSF
Ty!
What about cpu voltage?
I'm trying to get it from Win32_Processor WMI class and it is always 1 (CurrentVoltage).
Code: Select all
procedure TForm2.GetKernelPerfStateInfo;
const
WbemUser ='';
WbemPassword ='';
WbemComputer ='localhost';
wbemFlagForwardOnly = $00000020;
var
FSWbemLocator : OLEVariant;
FWMIService : OLEVariant;
FWbemObjectSet: OLEVariant;
FWbemObject : OLEVariant;
oEnum : IEnumvariant;
volt : uInt16; //uint16 word
volt2 : uInt32; //uint32 longword
v : longword;
begin;
FSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator');
FWMIService := FSWbemLocator.ConnectServer(WbemComputer, 'root/CIMV2', WbemUser, WbemPassword);
FWbemObjectSet:= FWMIService.ExecQuery('SELECT * FROM Win32_Processor','WQL', wbemFlagForwardOnly);
oEnum := IUnknown(FWbemObjectSet._NewEnum) as IEnumVariant;
while oEnum.Next(1, FWbemObject, v) = 0 do
begin
NullStrictConvert := False;
Volt := FWbemObject.CurrentVoltage; //uint16
volt2 := FWbemObject.VoltageCaps; //uint32
Label5.Caption := 'Current Vcore : ' + IntToStr(Volt) + ' v VoltageCaps : ' + IntToStr(Volt2) + ' v';
FWbemObject:=Unassigned;
end;
end;
Re: CPU TDP
Posted: Fri Mar 15, 2013 8:04 am
by The Coolest
Same reply as with TDP.
I don't use WMI as you can't rely on it to provide you with solid and accurate information.