Login | Register

Getting error: CoreTemp_Not_Found why ?

User feature requests
Planned features for Core Temp
  • Author
    Message

Getting error: CoreTemp_Not_Found why ?

Postby Chocolade » Tue Dec 27, 2011 10:20 am

Im using c#(csharp) and i did this code:


Code: Select all
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
using OpenHardwareMonitor.Hardware;
using OpenHardwareMonitor.Collections;
using OpenHardwareMonitor;
using GetCoreTempInfoNET;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
         System.Timers.Timer RefreshInfo;
         CoreTempInfo CTInfo;

        public Form1()
        {
            InitializeComponent();
            CTInfo = new CoreTempInfo();
            //Sign up for an event reporting errors
            CTInfo.ReportError += new ErrorOccured(CTInfo_ReportError);

            //Initiate a Timer.
            RefreshInfo = new System.Timers.Timer();
            RefreshInfo.Interval = 1000;
            RefreshInfo.Elapsed += new System.Timers.ElapsedEventHandler(RefreshInfo_Elapsed);

            //Get info manually.
            RefreshInfo_Elapsed(null, null);

            //Start Timer counter.
            RefreshInfo.Start();

            //Press return to exit.
            Console.ReadLine();

            //Kill the timer/
            RefreshInfo.Stop();
            RefreshInfo.Dispose();

        }
        private void Form1_Load(object sender, EventArgs e)
        {
        }
        private void label1_Click(object sender, EventArgs e)
        {
        }

        private void RefreshInfo_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
        {
            //Clear the screen and post the title.
            //Console.Clear();
            //Console.WriteLine("Core Temp shared memory reader:\n");
            label1.Text = "Core Temp shared memory reader:\n";

            //Attempt to read shared memory.
            bool bReadSuccess = CTInfo.GetData();

            //If read was successful the post the new info on the console.
            if (bReadSuccess)
            {
                uint index;
                char TempType;
                if (CTInfo.IsFahrenheit)
                    TempType = 'F';
                else
                    TempType = 'C';
                label2.Text = "CPU Name: " + CTInfo.GetCPUName;
                label3.Text = "CPU Speed: " + CTInfo.GetCPUSpeed + "MHz (" + CTInfo.GetFSBSpeed + " x " + CTInfo.GetMultiplier + ")";
                label4.Text = "CPU VID: " + CTInfo.GetVID + "v";
                label5.Text = "Physical CPUs: " + CTInfo.GetCPUCount;
                label6.Text = "Cores per CPU: " + CTInfo.GetCoreCount;
                for (uint i = 0; i < CTInfo.GetCPUCount; i++)
                {
                    label7.Text = "CPU #{0}"+ i;
                    label8.Text = "Tj.Max: " + CTInfo.GetTjMax[i] + "°" + TempType;
                    for (uint g = 0; g < CTInfo.GetCoreCount; g++)
                    {
                        index = g + (i * CTInfo.GetCoreCount);
                        if (CTInfo.IsDistanceToTjMax)
                            label9.Text= "Core #{0}: {1}°{2} to TjMax, {3}% Load"+ index+ CTInfo.GetTemp[index]+ TempType+ CTInfo.GetCoreLoad[index];
                        else
                            label10.Text = "Core #{0}: {1}°{2}, {3}% Load"+ index+ CTInfo.GetTemp[index]+ TempType+ CTInfo.GetCoreLoad[index];
                    }
                }
            }
            else
            {
                Console.WriteLine();
                label1.Text = "Internal error name: " + CTInfo.GetLastError;
                Console.WriteLine("Internal error value: " + (int)CTInfo.GetLastError);
                Console.WriteLine("Internal error message: " + CTInfo.GetErrorMessage(CTInfo.GetLastError));
            }
        }

        private void CTInfo_ReportError(ErrorCodes ErrCode, string ErrMsg)
        {
            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine(ErrMsg);
            Console.ResetColor();
        }

    }
}


No errors in runtime code but when im running to the program i see in label1 the error: CoreTemp_Not_Found

I have windows 7 64bit and gtx 580 video card. I wanted to get/display the video card gpu temperature.

Thanks for helping.
Chocolade
New User
 
Posts: 1
Joined: Tue Dec 27, 2011 10:14 am

Re: Getting error: CoreTemp_Not_Found why ?

Postby The Coolest » Tue Dec 27, 2011 10:40 am

Hi,

Do you have Core Temp actively running in the background when you try this?
Currently the shared memory library gives you access to Core Temp's data when it's running, this is not a standalone Core Temp module.
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