You don't need the
WinHttp
reference - the .NET framework has plenty of built-in classes to do this for you. For example,
the DownloadString
method[
^] from
the System.Net.WebClient
class[
^]:
Option Strict On
Option Explicit On
Imports System.Net
Module Module1
Public Function Version() As Boolean
Dim wc As New WebClient()
Dim WebVer As String = wc.DownloadString("http://www.********.com/upd/webver.txt")
Form1.WebVer.Text = WebVer
Return True
End Function
Public Function Version2() As Boolean
Dim wc As New WebClient()
Dim ClientVer As String = wc.DownloadString("http://www.********.com/upd/clientver.txt")
Form1.ClientVer.Text = ClientVer
Return True
End Function
End Module