June 23, 2001

IsFileInCache – Check whether a file is in the Internet cache

Private Declare Function GetUrlCacheEntryInfo Lib “wininet.dll” Alias _ “GetUrlCacheEntryInfoA” (ByVal sUrlName As String, lpCacheEntryInfo As Any, _ lpdwCacheEntryInfoBufferSize As Long) As Long’ Check whether the file identified by the URL passed as parameter’ is present in the Internet cache’ Example:’ MsgBox “File is saved in cache: ” & IsFileInCache’ (“http://www.vb2themax.com/vbmaximizer/demo.asp”)’

GetSystemInfo – Retrieve system information using Active Directory

‘ Get system information using Active Directory” Returns True if successfull” Returns the following information in its parameters’ ComputerName’ DomainName’ PDC Name’ UserName” NOTE: requires a reference to the Active DS Type libraryFunction GetSystemInfo(ComputerName As String, DomainName As String, _ PDCName As String, UserName As String) As Boolean Dim sysInfo

GetCpuDescription – Get information on the CPU using Active Directory

‘ Get a description of the processor using Active Directory” NOTE: requires a reference to the Active DS Type libraryFunction GetCpuDescription() As String Dim thisComputer As ActiveDs.IADsComputer Dim thisService As ActiveDs.IADsServiceOperations ‘ we need this object to retrieve computer name Dim sysInfo As New ActiveDs.WinNTSystemInfo ‘ retrieve the AD object

AddToIEFavorites – Add a URL to the IE’s favorites

‘ Add an URL to the IE’s favorites by sending a client side JavaScript to IE’ sURL is the URL that the link will point to’ sDescr is the description displayed in the Favorites menu” Example:’ AddToIEFavorites “www.vb2themax.com”, “VB-2-The-Max: the ultimate VB source”Sub AddToIEFavorites(ByVal sURL As String, ByVal sDescr As

IsConnectedToInternet – Check whether there is an Internet connection

Private Declare Function InternetGetConnectedState Lib “wininet.dll” (ByRef _ lpSFlags As Long, ByVal dwReserved As Long) As LongConst INTERNET_CONNECTION_MODEM = 1Const INTERNET_CONNECTION_LAN = 2Const INTERNET_CONNECTION_PROXY = 4Const INTERNET_CONNECTION_MODEM_BUSY = 8′ return True if there is an active Internect connection” optionally returns the connection mode through’ its argument (see INTERNET_CONNECTION_* constants)’ 1=modem,