Page 1 of 1

SDK CoreTemp return 0

Posted: Wed Feb 10, 2016 3:51 pm
by sirious
Hi,

I tried to use this code but when I execute the app, shows me only 0 and the CPUName -323199535839638910000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000

Thanks for your help.

Code: Select all

#include <iostream>
#include <stdio.h>
#include "stdafx.h"

#define WIN32_LEAN_AND_MEAN
#include <Windows.h>

#include "Shared Memory Libraries/GetCoreTempInfo.h"

#pragma comment(lib, "Shared Memory Libraries/x86/GetCoreTempInfo.lib")
//#pragma comment(lib, "Shared Memory Libraries/x64/GetCoreTempInfo.lib")

/*int _tmain(int argc, _TCHAR* argv[])
{
	return 0;
}*/

int main()
{
	CoreTempProxy coreT;

	coreT.GetData();

	for (int i = 0; i < 256; i++)
	{
		printf("Temp %i = %f\n", i, coreT.GetTemp(i));
	}

	printf("CPU = %f", coreT.GetCPUName());

	getchar();
	return 0;
}

Re: SDK CoreTemp return 0

Posted: Sat Feb 20, 2016 11:31 pm
by The Coolest
Is Core Temp running when you try to run your app? You have to keep Core Temp running to access all the data, the SDK is simply a 'shortcut' to access Core Temp's shared memory data.
In case it's running, the CPUName field consists of a character array, it's not a numerical value.
I'm not sure what you are trying to do exactly, but posting your full code will help. And also take a look at the provided C samples in the SDK zip file.