RasMan v1.60 A shareware application to monitor
your Dial-Up Networking Connections (Obsolete)
&
CRasMonitor
v1.60 The MFC class to monitor connections as used by RasMan
(Obsolete)
RasMan
Welcome to RasMan, A shareware application to monitor all of your Dial-Up Networking
connections. There are numerous online timers already out on the Internet, so you
may say why another one.
I have evaluated numerous online timers but none of them provided exactly what
I wanted. Some of the problems were:
- For such a simple requirement some of the program were overly complicated
or had special requirements.
- None of the programs out there were able to accurately take into account
the many different costing rules being used by ISPs and telecom providers.
- The types of reporting available in some programs were limited or non-existent.
What I wanted was a nice flexible program, small in size, unobtrusive and easy
to use. So with that in mind here is a list of RasMan features:
- The size of RasMan.exe itself is just 100k and the code inside it has been
designed in such a way to affect system performance as little as possible.
- The program leaves all of the reporting and costing issues to an external
program. This leaves RasMan to the job of monitoring connections and leaves
all the complications of costing / reporting to more capable programs.
- Instead of providing reporting, RasMan generates a log file which can be
easily imported into programs such as Microsoft Excel. The format itself is
totally customizable.
- The program is simple to use. Just run it and forget about it, until you
want to review your Internet usage.
Leaving the reporting up to a program such as Excel means that you are free to
implement whatever reporting/costing you want using all the powerful functionality
programs such as this provides.
The enclosed file contains the RasMan application
and help file as a standard Windows Installer MSI file.
Installation Requirements
- The program is for Windows 2000, Windows XP, Windows 2003 or Windows Vista
only. It will not run on Windows 9x.
- You must have the VC 2005 SP1 Redist files installed. If you do not have
these installed then you can download it from
http://www.naughter.com/download/vcredist_x86.exe
and then simply run this exe before you run the RasMan install. Note that the
install will warn if you do not have these files installed.
Updates
8 January 2017
- Please note that I have not worked on this application in many years and
is considered obsolete as broadband Internet connections have become ubiquitous.
V1.60 (2 February 2007)
- Now uses v1.08 of my CPdh class.
- Now uses v1.21 of my DDXFile class.
- Now uses v1.26 of my CHLinkCtrl class.
- Now uses v1.01 of my DynData class.
- Now uses v1.57 of my CTrayNotifyIcon class.
- Now uses a ini file located in "\Documents and Settings\All Users\Application
Data\PJ Naughter\RasMan" (assuming you are running Windows XP or 2000,
the location will be slightly different on Vista) for configuration. Because
of this breaking change existing registered versions will need to be reregistered.
- The default location of the log file now defaults to ""\Documents
and Settings\All Users\Application Data\PJ Naughter\RasMan".
- The default name for the log file is now "RasMan.csv".
- Updated the documentation to use the same style as my web site.
- Code is now built and delivered using VC 2005 SP1.
- Binary which is now shipped is Unicode and requires Windows 2000 or later.
- Reworked the registration mechanism to improve the security.
- Code now uses the authors DTime+ for date and time formatting.
- Auto start option now uses HKEY_CURRENT_USER instead of HKEY_LOCAL_MACHINE
registry location.
- Fixed a bug on the Output settings page where you try to move an item up
when it was already at the top.
- Fixed a bug on the Output settings page where you try to move an item down
when it was already at the bottom.
- Fixed a bug where the schema.ini file is not deleted if you first enable
this setting on the Output settings page and then disable it.
- The program now uses the more user friendly SHFileOperation to handle deletion
of the log file. By default the deleted log file is now sent to the Recycle
bin, although you can override this setting by holding down the shift key before
you select the "Delete Log File" menu item.
- Program now prevents multiple dialogs from appearing from the context menu.
- Button controls on "Output" settings tab are now correctly enabled
/ disabled.
- The supervisor password is no longer stored as plain text in the ini file.
- "Start Rasman automatically" setting is now detected on startup
based on the current state of the value in the registry.
- Application now correctly closes if you select the Quit Now button from
the register dialog if shown via the tray icon context menu.
- Application is now provided as a standard Windows Installer MSI file created
using Wix v3
V1.51 (1 June 2003)
- Now uses v1.07 of my CPdh class.
- Now uses v1.17 of my DDXFile class.
- Now uses v1.12 of my HKLM class.
- Now uses v1.24 of my CHLinkCtrl class.
- Now uses v1.07 of my CHookWnd class.
- Now uses v1.48 of my CTrayNotifyIcon class.
- Fixed a minor issue with duplicate mnemonics on the first settings page.
- Now the program optionally logs failed connections. Thanks to "aaliut"
for this suggestion.
- Now includes support for online and accumulated reminders.
- Now does not include the text "Rasman: " in the tray icon tooltip
text.
- App is now compiled in VC 6 instead of VC 5.
- Updated documentation to include links to online registration, spell check,
and various other minor items.
V1.5 (19 December 2001)
- Now uses v1.5 of my CRasMonitor class.
V1.47 (30 April 2001)
- Now uses v1.05 of my CPdh class.
- Now uses v1.43 of my CRasMonitor class.
- Now uses v1.14 of my DDXFile class.
- Now uses v1.1 of my HKLM class.
- Now uses v1.43 of my CRasMonitor class.
V1.46 (8 May 2000)
- Fixed a problem on NT where the PDH counters were being freed prior
to the being added to the m_Connections array.
- Also now allows the PDH counter names to be customized via an advanced registry
value. Thanks to Toni Zeitler for finding and help fix these two problems
- Also updated the documentation with regard to non - English versions of
NT (See requirements below).
- Update the documentation with regard to Windows 2000 (See requirements below).
- Now also supports online registration, see below:
V1.45 (25 January 2000)
- Removed a long term memory leak which was occurring on NT.
- Fixed a problem where the Field delimiter combo box and Fields to include
list box were been populated with duplicates which you switched tabs.
- Now uses v1.03 of my CPdh class.
- Now uses v1.41 of my CRasMonitor class.
- Now uses v1.23 of my CHLinkCtrl class.
- Now uses v1.4 of my CTrayNotifyIcon class.
V1.44 (15 September 1999)
- Updated RasMan to work correctly in languages which do not use the "."
symbol as the decimal separator.
- Now supports outputting a "Dial + Connect Duration" which combines
the dialing duration with the Connect Duration"
V1.43 (13 September 1999)
- Updated product name from RasMon to RasMan to avoid conflict with a similarly
named application from Microsoft.
- Now uses v1.02 of CPdh class of the authors, which fixes more problems discovered
when the application is run on NT.
V1.42 (8 September 1999)
- Updated install instructions to ensure RasMan works correctly on NT.
V1.41 (5 September 1999)
- Fixed a bug which was causing an access violation when the first RAS connection
was detected when RasMan was run on NT.
- Now uses v1.01 of my CPdh class.
- Updated the documentation to include my full postal address.
- Updated my email address in the documentation.
V1.4 (21 February 1999)
- Now includes bytes sent, bytes received and connection speed as possible
field values.
- A "schema.ini" file can now be output. This allows other programs
to connect to the CSV log file which RasMan generates through DAO as if it were
a native database table. This is of use when developing applications which use
the RasMan log files for reporting purposes.
- A parental / supervisor mode has now been added which when activated prevents
someone from inadvertently changing the settings or closing the program without
knowing the correct password.
- A hide function has been added to hide the tray icon of RasMan. This can
be used in conjunction with the supervisor mode for discreet background monitoring
of Dial-Up networking connections. For example in a home setting where the children
use the family computer to connect to the Internet.
- An auto start option has been added to allow RasMan to be started automatically
when Windows boots. This uses the registry instead of the StartUp start menu
group. This is to make the running of RasMan more discreet. Again this is useful
in conjunction with the hide function as described above.
- Fixed a crash when settings were been edited and you selected one of the
buttons when no items were selected.
- When a field is removed from the list, the item above the old item is now
selected.
- Nag screen and about box were showing the wrong version number, that has
now been fixed.
- Limitations on bytes sent, bytes received and connection speed have been
documented.
- Installation requirements have now been expanded.
- Settings were previously being lost because they were being stored in the
HKEY_CURRENT_USER part of the registry. All values are now stored under HKEY_LOCAL_MACHINE.
This means if you have previously registered RasMan, then you will need to reregister.
A default list of fields will also be used, so you may need to customize your
settings again.
- Renamed the "General" tab to be "Output".
V1.3 (2 February 1999)
- Now includes a menu option to delete the log file.
- Now uses v1.32 of my CTrayNotifyIcon class.
- The program now only logs dial-up connections which were successfully made.
- View & Delete menu options are now disabled if the log file does not
exist
- The program writes out recovered ras records when restarted in the event
of an unexpected application or OS crash.
- The program now stores all settings under the HKEY_LOCAL_MACHINE registry
key instead of HKEY_CURRENT_USER. This will affect both registered keys as well
as your log file settings.
- Updated the documentation to describe how you import the data in Microsoft
Excel 97.
V1.23 (17 November 1998)
- Added support for 2 new formats. See the settings section in the help file
for further details.
- Product is now shareware instead of freeware. This means that it will bring
up a nag screen each time it is run until you register the program
V1.22 (11 November 1998)
- Fixed a crash which was occurring when you selecting one of the buttons
in the settings dialog if no item was selected in the fields list box.
- Updated the version info in the about box.
V1.21 (9 November 1998)
- Default extension for the log file is now ".txt" instead of ".log".
This will ensure that the file association required for the view the log file
will work on a default Windows setup.
- Updated the message box text when the log file fails to be shown.
- Updated the help file to explain the "view the log file" error
message.
V1.2 (6 November 1998)
- The filename of the log file RasMan uses is now customizable.
- All the fields and the formats used in the log file are customizable.
- Major optimization added to reduce memory usage (c. 3 MB) on NT when Ras
service is not running. Thanks to Daniel Harth for this very neat optimization.
- Internally the code now uses a hidden window to perform the monitoring instead
of a worker thread. This helps avoid potential deadlock problems which can occur
as previously the code used a worker thread.
- Tidied up the help file.
- A context menu option is now available in RasMan to display the log file.
V1.1 (26 July 1998)
- Updated to include the time in the tray tooltip text when connected.
- tray icon is changed to red when connected.
V1.0 (5 July 1998)
CRasMonitor
This class forms the basis of the code for RasMan. It uses window messages to
notify client code of various ras events. These include notification of connections
being made and closed. Some of the its features include:
- Simple and clean C++ interface.
- The code works on both Windows 9x and Windows NT, 2000, XP, 2003 and Vista.
The RAS API itself is very OS dependent with some of its functions only available
on Windows NT 4 or later.
- The code has been designed in such a way that it has a minimum impact on
the performance of the OS.
- The classes are fully Unicode compliant.
The enclosed zip file contains just the
CRasMonitor source code. Since RasMan is now shareware the code for it is not now
included.
Copyright
- You are allowed to include the source code in any product (commercial, shareware,
freeware or otherwise) when your product is released in binary form.
- You are allowed to modify the source code in any way you want except you
cannot modify the copyright details at the top of each module.
- If you want to distribute source code with your application, then you are
only allowed to distribute versions released by the author. This is to maintain
a single distribution point for the source code.
Updates
8 January 2017
- Please note that I have not worked on this code in many years and is considered
obsolete as broadband Internet connections have become ubiquitous.
v1.60 (2 February 2007)
- Updated copyright details
- Updated the code to clean compile on VC 2005.
- Replaced all calls to ZeroMemory with memset.
- Code now uses new C++ style casts rather than old style C casts where necessary.
- Optimized CRasMonitor constructor code
- Addition of a CRASMONITOR_EXT_CLASS and macro which makes the class easier
to use in an extension dll.
- TAPI line is now opened with LINECALLPRIVILEGE_MONITOR in CRasMonitor::GetRasTAPIDetails
method.
v1.51 (16 July 2003)
- Now gets Caller ID number, Caller ID name, Called ID Number, Called Name,
Connected ID number, Connected ID Name, Displayable Address, Called Party and
comment fields from TAPI for each call.
v1.5 (19 December 2001)
- Code now tries to use RasGetConnectionDetails in preference to any of the
other methods. This new API is available from Windows 2000 onwards.
- Moved typedefs into namespace of class to avoid polluting the global namespace
- Made all static data and methods non-static. This makes the code more multi-thread
safe in addition to the code being cleaner.
- Reworked how the NT Performance names can be tweaked by client apps
- Reviewed all the TRACE statements to ensure they were comprehensive and
accurate.
- Optimized checking of the Ras service state when running on NT.
- Removed need to keep an outstanding handle on the SCM throughout the lifetime
of the code when running on NT.
v1.43 (30 April 2001)
- Updated copyright messages.
- Fixed a problem where the code would not run correctly on Win 9x.
- Connection speed for a connection is now reported on via a call to TAPI
just like the way the SDK sample RasBaud operates.
- Provision of the following defines which allow fine grained control over
what API's RasMonitor pulls in:
RAS_MONITOR_NO_DYNDATA
RAS_MONITOR_NO_PDH
RAS_MONITOR_NO_TAPI
v1.42 (8 May 2000)
- Fixed a problem on NT where the PDH counters were being freed prior to the
being added to the m_Connections array.
- Also now allows the PDH counter names to be customized via an advanced registry
value. Thanks to Toni Zeitler for finding and help fix these two problems
v1.41 (25 January 2000)
- Removed a memory leak which was occurring on NT where the CPdhCounter instances
in the GetInitialConnectionDetails and GetCurrentConnectionDetails functions
were not being tidied up. This has been accomplished by restructuring the code
to create and add the counters to the performance once of in the CRasConnection
constructors.
v1.4 (21 February 1999)
- Synced version number up to the same version as RasMan application.
- Now reports the following additional statistics: Connection speed (Bytes
/ Second) (on Windows 95, 98 only), Bytes sent (Windows 95, 98 & NT) and
Bytes received (Windows 95, 98 & NT)
- Update the usage instructions about what is required on client machines.
v1.21 (2 February 1999)
- Fixed a compile problem which was occurring when code was compiled for UNICODE.
- Fixed a crash which was occurring when the code was run on NT and you do
not have Ras installed.
- When running on NT, the code now only uses SC_MANAGER_ENUMERATE_SERVICE
privileges when connecting to the Service Configuration Manager.
- CRasConnection connection now includes a standard MFC Serialize method.
- CRasMonitor now has a standard MFC Serialize method. This can be incorporated
into an app to prevent ras events being lost if the application or OS were to
crash. This is used in the authors RasMan application to ensure no ras records
were lost even if the machine crashed while any ras connection was in progress.
17 November 1998
- Removed sample app as RasMan application is now shareware. All that is now
included is the source code, header file and associated documentation.
11 November 1998
- Source code updated to match v1.22 release of RasMan.
9 November 1998
- Source code updated to match v1.21 release of RasMan.
v1.2 (6 November 1998)
- Major optimization added to reduce memory usage (c. 3 MB) on NT when Ras
service is not running. Thanks to Daniel Harth for this very neat optimization.
- Internally the code now uses a hidden window to perform the monitoring instead
of a worker thread. This helps avoid potential deadlock problems which can occur
as previously the code used a worker thread.
- Now uses window messages instead of virtual functions to implement class
customization
v1.1 (1 October 1998)
- Updated code to include a virtual OnDial method
- Optimized the code by using CArray::ElementAt
- Added the following member variables to CRasConnection: Dial Time, whether
or not the connection is currently connected, Dial Duration and the RAS handle
- Renamed the connection variable of CRasConnection
- Updated the sample program to v1.1
- Updated the version info in the sample app to include the build date
- Fixed a problem when enumerating more than one ras connection at a time.
- Sample app now uses LoadImage instead of LoadIcon to avoid the shell first
scaling up to 32*32 and then back to 16*16.
- What this means is that the icons RasMan puts in the tray notification area
will not look blurred.
- Fixed a memory leak in CRasMonitor::DoCheck() when multiple connections
were being enumerated.
- Included a new selection of tray icons in the sample app.
- Updated the documentation to reflect the name changes and the new member
variables and methods
- Added a popup menu item to bring up the help file.
30 July 1998
- v1.1 binary was built with VC 6.0 instead of VC 5 meaning that when the
program would fail to load on a machine with a VC 5 MFC42.DLL.
26 July 1998
- RasMan sample application had been updated to v1.1. Changes made include:
Updated to include the time in the tray tooltip text when connected and tray
icon is changed to red when connected.
v1.0 (13 July 1998)
- Initial Release to the public.