InetStat ActiveX Control
Download Now (about 1.5 MB)
The InetStat OCX provides a simple way to get the status of your Dialup Internet connection under Windows 95/98. InetStat provides a single event (no methods or properties are required). The InetStatusChanged event is generated when the Dialup connection is established or terminated, and an event is generated once per second as long as the Dialup connection is maintained.
InetStat OCX is for Windows 9x, only, and Windows NT/Windows 2000 may be of interest, here are two links that provide details about these versions of Windows. VBnet, the Visual Basic Developers Resource Centre, http://www.mvps.org/vbnet provides code samples. Bill McCarthy has a web site called PlatformVB. Bill provides information on RAS, including dialup monitoring (performance monitoring) statistics for Windows 9x and Windows NT/Windows 2000.
This OCX is a solution to a frequently asked question.
There are five parameters that are provided as arguments in the InetStatusChanged event. These are:
Connected (Boolean) - Indicates the current Dialup Adapter connected status. This flag follows the modem CD status (True = connected, False = disconnected).
BytesSent (Long) - Reflects the total number of bytes sent since the current connection was established.
BytesReceived (Long) - Reflects the total number of bytes received since the current connection was established.
SendThroughput (Integer) - Average throughput (in bytes/second) for data sent since the current connection was established.
ReceiveThroughput (Integer) - Average throughput (in bytes/second) for data received since the current connection was established.
You should run InetStat before you dial and connect. All statistics are reset to zero when InetStat is instantiated -- so if InetStat reflects send and receive statistics (totals) after the program using InetStat starts. All send and receive status numbers are set to zero when the connection is terminated.
Here is a simple example of how this event might be used:
Private Sub InetStatus1_InetStatusChanged(ByVal Connected As Boolean, ByVal BytesSent As Long, ByVal BytesReceived As Long, _
ByVal SendThroughput As Integer, ByVal ReceiveThroughput As Integer)
Debug.Print Connected, BytesReceived, BytesSent, SendThroughput, ReceiveThroughput
Of course, real code would actually display one or more of these parameters, or otherwise use them for more utilitarian purposes!
This ActiveX control is provided free, without warranty of any kind. You are free to use it for any purpose that you deem reasonable, but the author is not responsible for any such use (or misuse), or for any damage that might result from its use. Treat this software like you would any beta software. It may work as described, but if it does not, you got what you paid for.
Source Code (VB6) is available from the author. The cost is US$10.00. Send a check for US$10.00 or use this link for credit card orders, with your request to:
Hard & Software
12962 West Louisiana Avenue
Lakewood, CO 80228
Include your name, address, phone number, and email address. A ZIP file containing the source code will be sent as an attachment to the email address that you specify. If you cannot receive email attachments, indicate that fact and I will send the source code on a floppy disk. Allow one week for delivery of source code by email, and one to four weeks (depending on where you are) for delivery of source code on floppy disk by surface mail.
You can send me email saying that you are mailing a check or credit card order, if you want. However, I won't be able to send out the source code until your check has been received, or notification that your credit card payment has been credited.