Login | Register

[Solved]SDK CoreTempProxy.GetTemp returns 0

User feature requests
Planned features for Core Temp
  • Author
    Message

[Solved]SDK CoreTempProxy.GetTemp returns 0

Postby ThaPear » Sat Jun 13, 2015 1:30 pm

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.
ThaPear
New User
 
Posts: 2
Joined: Sat Jun 13, 2015 1:25 pm

Re: SDK CoreTempProxy.GetTemp returns 0

Postby The Coolest » Tue Jun 16, 2015 2:19 pm

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.
Member of our O/C Folding @ Home team
"<The_Coolest> you can't unwaste wasted CPU cycles" - Start FOLDing now!
Main rig:
Core i7 2600K 3.4GHz @ 4.5GHz (Scythe Mugen2) / Mobo: Biostar TP67XE / SSD: Crucial M4 128GB (+ HDDs) / GPU: HD5450 / Mem: 4x4GB DDR3-1600 G.Skill 4GBXL RipJaws X - 16GB total / PSU: Seasonic S12II 620W.
Secondary rig:
Core i3 540 3.06GHz @ Stock / Mobo: MSI H55M-ED55 / GPU: Integrated / Mem: 2x2GB DDR3-1600 G.Skill 4GBRL RipJaws - 4GB total / PSU: FSP ATX350-PNR 350W.

Core Temp - Accurate temperature monitor for Intel's Core/Core 2 and AMD64 processors
User avatar
The Coolest
Site Admin
Site Admin
 
Posts: 2961
Joined: Tue Feb 18, 2003 7:48 pm
Location: Tel Aviv, Israel

Re: SDK CoreTempProxy.GetTemp returns 0

Postby ThaPear » Tue Jun 16, 2015 2:22 pm

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.
ThaPear
New User
 
Posts: 2
Joined: Sat Jun 13, 2015 1:25 pm

Re: [Solved]SDK CoreTempProxy.GetTemp returns 0

Postby The Coolest » Tue Jun 16, 2015 2:24 pm

Oh, alright.
Glad you got it working :)
Member of our O/C Folding @ Home team
"<The_Coolest> you can't unwaste wasted CPU cycles" - Start FOLDing now!
Main rig:
Core i7 2600K 3.4GHz @ 4.5GHz (Scythe Mugen2) / Mobo: Biostar TP67XE / SSD: Crucial M4 128GB (+ HDDs) / GPU: HD5450 / Mem: 4x4GB DDR3-1600 G.Skill 4GBXL RipJaws X - 16GB total / PSU: Seasonic S12II 620W.
Secondary rig:
Core i3 540 3.06GHz @ Stock / Mobo: MSI H55M-ED55 / GPU: Integrated / Mem: 2x2GB DDR3-1600 G.Skill 4GBRL RipJaws - 4GB total / PSU: FSP ATX350-PNR 350W.

Core Temp - Accurate temperature monitor for Intel's Core/Core 2 and AMD64 processors
User avatar
The Coolest
Site Admin
Site Admin
 
Posts: 2961
Joined: Tue Feb 18, 2003 7:48 pm
Location: Tel Aviv, Israel

Return to Development

Who is online

Users browsing this forum: No registered users and 1 guest