[Solved]SDK CoreTempProxy.GetTemp returns 0

User feature requests
Planned features for Core Temp
Post Reply
ThaPear
New User
Posts: 2
Joined: Sat Jun 13, 2015 1:25 pm

[Solved]SDK CoreTempProxy.GetTemp returns 0

Post by ThaPear »

I'm trying to use the SDK to get the temperature of my CPU, but it returns 0 for every index I enter.

I downloaded the SDK from here.
CoreTemp itself is perfectly able to get my temperatures as seen here:
Image

I've created a new project and tried it with the most basic code I could think of, but it still doesn't work.
The mini project:

Code: Select all

#include <iostream>

#define WIN32_LEAN_AND_MEAN
#include <Windows.h>

#include "CoreTempInterface/GetCoreTempInfo.h"

//#pragma comment(lib, "CoreTempInterface/lib/x64/GetCoreTempInfo.lib")
#pragma comment(lib, "CoreTempInterface/lib/x86/GetCoreTempInfo.lib")

int main()
{
	CoreTempProxy ctp;
	
	for(int i = 0; i < 256; ++i)
	{
		printf("temp %i = %f.\n", i, ctp.GetTemp(i));
	}

	system("pause");

	return 0;
}
Last edited by ThaPear on Tue Jun 16, 2015 2:22 pm, edited 1 time in total.

User avatar
The Coolest
Site Admin
Site Admin
Posts: 3379
Joined: Tue Feb 18, 2003 7:48 pm
Location: Tel Aviv, Israel
Contact:

Re: SDK CoreTempProxy.GetTemp returns 0

Post by The Coolest »

I would suggest you first take a good look at the sample code provided with the SDK.
You must make a 'ctp.GetData();' call before you have access to temperature or any other data.
Main rig:
AMD Ryzen 9 5950X (True Spirit 140 Direct) / Mobo: Asrock Fatal1ty X470 / EVO 970 500GB + WD Blue 250GB + HDD / GPU: Dell RX 570 4GB / Mem: 2x16GB DDR4-3200 G.Skill 32GTZKW TridentZ - 32GB total / PSU: Seasonic Prime Ultra Gold 650W
NAS:
Core i7 2600K 3.4GHz @ 4.3GHz (Scythe Mugen2) / Mobo: Biostar TP67XE / 2x Inland Pro 120GB + HDDs / GPU: ATi Mach64 VT2 / Mem: 4x4GB DDR3-1600 G.Skill 8GBXL RipJawsX - 16GB total / PSU: Seasonic S12II 620W.
Secondary rigs:
Core i3 7130U / MiniPC / SanDisk SDSSDP-128G / GPU: Intel HD 620 / Mem: 1x8GB DDR3L-1600
Xeon X3430 2.40GHz @ 3.06GHz or Core i3 540 3.06GHz @ 4.0GHz (Freezer 7 Pro) / Mobo: MSI H55M-ED55 / PNY CS1111 240GB / GPU: ATI FirePro V3800 / Mem: 4x2GB DDR3-1600 G.Skill 4GBRL RipJaws - 8GB total / PSU: Seasonic S12II 620W
AMD Phenom II X4 B93 / Mobo: ASUS M2A-VM / GPU: ATI Radeon Xpress X1250 / Crucial M4 120GB / Mem: 2x2GB DDR2-800 - 4GB total / PSU: Antec 380W.

Core Temp - Accurate temperature monitor for Intel's Core/Core 2 and AMD64 processors

ThaPear
New User
Posts: 2
Joined: Sat Jun 13, 2015 1:25 pm

Re: SDK CoreTempProxy.GetTemp returns 0

Post by ThaPear »

The Coolest wrote:I would suggest you first take a good look at the sample code provided with the SDK.
You must make a 'ctp.GetData();' call before you have access to temperature or any other data.
Thanks for the quick reply.
I had solved it but was unable to delete the post until it was accepted by a moderator.

User avatar
The Coolest
Site Admin
Site Admin
Posts: 3379
Joined: Tue Feb 18, 2003 7:48 pm
Location: Tel Aviv, Israel
Contact:

Re: [Solved]SDK CoreTempProxy.GetTemp returns 0

Post by The Coolest »

Oh, alright.
Glad you got it working :)
Main rig:
AMD Ryzen 9 5950X (True Spirit 140 Direct) / Mobo: Asrock Fatal1ty X470 / EVO 970 500GB + WD Blue 250GB + HDD / GPU: Dell RX 570 4GB / Mem: 2x16GB DDR4-3200 G.Skill 32GTZKW TridentZ - 32GB total / PSU: Seasonic Prime Ultra Gold 650W
NAS:
Core i7 2600K 3.4GHz @ 4.3GHz (Scythe Mugen2) / Mobo: Biostar TP67XE / 2x Inland Pro 120GB + HDDs / GPU: ATi Mach64 VT2 / Mem: 4x4GB DDR3-1600 G.Skill 8GBXL RipJawsX - 16GB total / PSU: Seasonic S12II 620W.
Secondary rigs:
Core i3 7130U / MiniPC / SanDisk SDSSDP-128G / GPU: Intel HD 620 / Mem: 1x8GB DDR3L-1600
Xeon X3430 2.40GHz @ 3.06GHz or Core i3 540 3.06GHz @ 4.0GHz (Freezer 7 Pro) / Mobo: MSI H55M-ED55 / PNY CS1111 240GB / GPU: ATI FirePro V3800 / Mem: 4x2GB DDR3-1600 G.Skill 4GBRL RipJaws - 8GB total / PSU: Seasonic S12II 620W
AMD Phenom II X4 B93 / Mobo: ASUS M2A-VM / GPU: ATI Radeon Xpress X1250 / Crucial M4 120GB / Mem: 2x2GB DDR2-800 - 4GB total / PSU: Antec 380W.

Core Temp - Accurate temperature monitor for Intel's Core/Core 2 and AMD64 processors

Post Reply

Return to “Development”