The Init() Function
Public Sub Init()
On Error Resume Next
' Set the User Agent to our own App name
sUserAgent = "Horoscope component v1.0"
' Call the Term subroutine to run Error Checking
Term
' Initialize all variables
hUrlFile = 0
sContents = scBlankStr
sLastError = scBlankStr
sStatus = scBlankStr
' Call the Internet Server API to open Internet session
hInternetSession = InternetOpen(sUserAgent, INTERNET_OPEN_TYPE_PRECONFIG, vbNullString, vbNullString, 0)
bInitialized = CBool(hInternetSession)
End Sub