Visual Basic .NET and CoreTempInfoNET.dll

User feature requests
Planned features for Core Temp
Post Reply
FranzBauer
New User
Posts: 1
Joined: Sat Mar 12, 2011 8:10 pm

Visual Basic .NET and CoreTempInfoNET.dll

Post by FranzBauer »

Hey Guys!

Sorry for my English - I can't it really good. It is translated with Google Translator.

I have tried to use the CoreTempInfoNET Library to read the Temperature.
Tried with this Code in VB2008:
Imports CoreTempInfoNET

Public Class Form1
Dim CTInfo As New CoreTempInfo

Private Sub Form1(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Class

Private Sub btn1_click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn1.Click
lbl1.Text = CTInfo.GetTemp(0) ' Error
End Sub

End Class
I get an error at the commented position:

The Object reference is not set to an object instance.
But I do not know where is my mistake.
Other Librarys works without problems!

Can you find my mistake?

regards
FranzBauer

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

Re: Visual Basic .NET and CoreTempInfoNET.dll

Post by The Coolest »

Here you go:

Code: Select all

Imports GetCoreTempInfoNET

Public Class Form1
    Dim CTInfo As New CoreTempInfo
    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        If (CTInfo.GetData()) Then
            TextBox1.Text = CTInfo.GetTemp(0)
        End If
    End Sub
End Class
GetData() must be called before you can access the rest of the information
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”