I added to the reference the OpenHardwareMonitorLib.dll
Now I added in my code: using OpenHardwareMonitor.Hardware;
.
Then I did in the top form level: Isensor Sensor;
But I can't "new" it i cant create an instance of it and I'm getting null exception on it in the constructor:
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;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
ISensor Sensor;
public Form1()
{
InitializeComponent();
string t = Sensor.Name;
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void label1_Click(object sender, EventArgs e)
{
}
}
}
Cannot create an instance of the abstract class or interface 'OpenHardwareMonitor.Hardware
I tried ot look in the source code in the code.google.com site: http://code.google.com/p/open-hardware-monitor/source/browse/#svn%2Ftags%2F0.3.2%2FWMI
But i dont want to use all this code. I downloaded the program Open Hardware Monitor and except the exe file there is a dll file im using now in my project i was sure i can use the dll to use it easier. All i want for now is to get the temperature of the video card gpu.