devxlogo

Tip Bank

A VBScript Hit Counter

I created this Hit Counter to keep track of the use of our Company Intranet. On the SQL Server (in our case MSSQL 7), you will need to have a

Dynamic Constants

In applications that cannot be recompiled (e.g., apps that are installed on a customer’s machine as binaries only), values of constants may change occasionally. For example, exchange rates and the

Leading Blanks in Input

By default, std::cin ignores leading whitespaces when it reads input from the keyboard or file. For example, if you execute the following statement: char name[10];cin>>name; and the user enters the

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

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