Delphi Developers
Delphi TMagRas Release Notes

Delphi
Home Page

Platform Differences and DLLs

TMagRas is reasonably windows version independent making use of , but there are are specific limitations. The DUNInfo property in TMagRasCon shows the actual DUN version, based on the rasapi32.dll version number.

Windows 95 Retail - came with DUN 1.0 which did not support phonebook editing, an extra DLL rnaph.dll is supplied with TMagRas that adds this support. It is not needed for any subsequent Windows release. No support for performance statistics or ISDN. Can be upgraded by DUN 1.2 or 1.3 from http://www.microsoft.com/windows95/downloads/default.asp. No longer supported.

Windows 95 OSR2 - came with DUN 1.1 which supports phonebook editing and ISDN, but still no performance statistics. Can be upgraded by DUN 1.2 and 1.3. No longer supported.

Windows 95 with DUN 1.2, 1.3 or 1.4 - supports phonebook editing and performance statistics using TMagRasPer. Although ISDN multilink is supported by the Windows property pages, the RAS API was never updated for Win9x so multilink entries can not be created by the component. rnaph.dll is no longer needed. Performance statistics are read from simple registry keys. No longer supported.

Windows 98 - came with DUN 1.3, see comments above.

Windows ME - came with DUN 1.3, see comments above.

DUN 1.4 became available in 2001 for Windows 95, 98 and 98SE. The main RAS DLL has not changed since 1.3, so it can not be easily identified, but it provides better security.

Windows NT4 SP0 - had the same RAS functionality as Windows 95, but not supported by TMagRas.

Windows NT4 SP1 and later - RAS changes included extended dialling (ConnectNT method), multilink support (sub entries), phonebook files, and the actual telephone number dialled by RAS. Performance statistics usually originate from a special registry key, but sometimes these 'disappear' so an alternative is to use pdh.dll that is supplied with TMagRas but which provides slightly less detailed information. Performance statistics do not include the modem connection speed, which must be obtained from TAPI using TMagTapi. Can not delete a sub entry, only a whole connection entry. All entries are usually in the same system wide phonebook file. Note the RAS APIs can not access all the parameters set-up in the Windows property pages.

Windows 2000 - finally added new RAS statistics functions which include the modem connection speed. Also added a lot of new security stuff for phonebook entries. There are multiple phonebook files, one for 'all users' and one for each defined user. Enumerating phonebook entries returns the location of each entry, and this should be used when editing the entry so it's saved in the correct file. Note the RAS APIs can still not access all the parameters set-up in the Windows property pages.

Windows XP - adds a RAS function to delete sub entries, also some extra phonebook entry stuff allowing some of the new properties added in Windows 2000 to be accessed via the RAS APIs.

Windows 2003 - no known differences from XP.

Windows Vista - RAS supports IPv6. RasEditPhonebookEntry and RasCreatePhonebookEntry are no longer supported, RasSetEntryDialParams does not set the password correctly. Applications generally run without administrator rights which prevents updating 'All Users' Phonebooks.

Windows Server 2008 (Longhorn) - same as Vista, except programs again have administrator rights as standard.

Windows XP Warning

There is a bug in the Delphi 3/4/5/6 VCL for TListView when run on Windows XP with a manifest file to force the new v6 common controls (with rounded corner buttons). comctrls.pas needs to be patched otherwise immediate exceptions occur. The compiled version of RASDEMO4.EXE will work with a manifest file, your compiled version might not, so remove the RASDEMO4.EXE.MANIFEST file to revert to the v5 common controls.

Changes in TMagRas Release 5.30

1 - Added bDefaultCreds property for TMagRasCon and TMagRasEdt, which should be set true before calling PutDialProps, GetDialProps, PutDialParams or GetDialParams functions to set user name and password for 'anyone who uses this computer', which may be needed as well as setting Phonebook Location to all users on Vista.


Changes in TMagRas Release 5.21


1 - Ensure that the MagRasPhoneFiles array is completed with default phonebook names when the TMagCon and TMagEdt components are created, rather than when RAS is initialised, so setting PBLocation always sets the PhonebookPath file correctly.

2 - It's no longer possible to set the PhonebookPath property except on NT4, to avoid conflicts with PBLocation.

3 - Updated all the example applications with PBLocation so they all work on Vista.

4 - Updated MSIEDefConn for Vista.
 

Changes in TMagRas Release 5.2

1 - Finally tested on Windows Vista RTM and Longhorn (Windows Server 2008) beta 3. Unfortunately Microsoft no longer supports several RAs APIs in Vista, but has not documented this in MSDN. Also, most application now run without administrator rights which means connection entries in the 'All Users' phonebook can not be edited. So this release changes the default for new entries to the 'Current User' phonebook for Vista and later. Note that Longhorn programs have administrator rights as standard.

2 - In the Demo4 program, moved Windows version information to the Network tab and show Windows version information as well, also use IsProgAdmin (in magsubs1) to show whether the application has admin rights and can therefore edit 'All User' phonebook entries. If a non-admin user attempts to save a 'All User' entry, the RAS APIs should fail with 'access denied', but this is not reliable and sometimes the API seem to work. Note that both Vista and Windows Server 2008 are Windows version 6.0 with the ProductType differentiating them (similarly to NT4 Workstation and Server).

3 - TMagRasCon and TMagRasEdt each have a new PBLocation property which should be set to REN_AllUsers or REN_User before calling most methods, Win2K/XP default to REN_AllUsers, Vista/2008 to REN_User. Generally, this property is copied from the PBLocation in TEntryRec which is returned when enumerating the connection entry list (MagRasGetEntryList). Setting the PBLocation property automatically sets the correct phonebook file name. If your application specifically set the phonebook file path, this code should be skipped and replaced by setting PBLocation.

4 - In the Demo4 program, Quick New now allows the phonebook location to be set. Note the example programs have not yet been updated with PBLocation.

5 - The CreatePhonebook and EditPhonebook methods that bring up Microsoft dialogs now call RasEntryDlg since the original RAS functions no longer work in Vista. The Demo4 program also has new buttons to bring up the Microsoft DUN and Dialling dialogs.

6 - PutDialProps and GetDialProps in MagRasEdt now use RasPutCredentials and RasGetCredentials similarly to PutDialParams and GetDialParams in  MagRasCon, so work correctly with Vista.

7 - The IP Helper units have been removed, they now have their own package distributed separately. There is a new package MagentaSubs that contains magsubs1, magsubs4 and magclasses, which is common to other Magenta components. Packages for Delphi 4, 5 and 2005 are no longer supplied since these compilers are rarely used. Delphi 2006 and 2007 both use the magras100.dpk.

Pending - allow for wrapping performance counters over 4 gigs.
Pending - update example projects and help

Changes in TMagRas Release 5.1

1 - Added initial support for Windows Vista (and maybe Longhorn), by updating changed APIs. Vista supports IPv6, but TMagRas does not yet, due
to lack of any way to test it.

2 - PutDialProps and GetDialProps withe NT4 and later now use the RasPutCredentials and RasGetCredentials APIs instead of RasSetEntryDialProps
and RasGetEntryDialProps. This change seems to allow passwords to be sometimes saved in Vista Beta 2, but currently only for connections created
by some Vista dialogs. Hopefully Microsoft will fix these issues for the Vista release candidate due in September.

3 - Made some literals in magsubs1 conditional, which should allow TMagRas to be used with C++ Builder.


Changes in TMagRas Release 5.0


1 - Validate the SubEntry before dialling.

2 - To simplify distribution, the IP Helper components are now distributed separately, ditto the WMI and SMART components.
 

Changes in TMagRas Release 4.94

1 - Fixed a problem on Windows XP and later that meant details of only the first connection returned by GetConnections was accessible, this
only effected multi-link and VPN over dial-up.

2 - Added MSIEAutoDialOpt to set all three MSIE auto dial options, and fixed MSIEDefConn to work properly on XP. The Network tab of the RAS demo program reflects the new auto dial options.

3 - Added SCutSpecLinkEx and SCutAddLinkEx to create improved DUN short cuts, with configurable icons and description, and to make the short
cut available to all logons.

4 - TMagRas has been thoroughly tested on Windows 2003, but there are no new RAS features and no changes have been made.


Changes in TMagRas Release 4.91

1 - TMagRas now supports an unlimited number of RAS devices, previously there was a limit of 30 devices. This change was primarily needed to allow TMagRas to be supported on Windows 2003 beta (effectively the server version of Windows XP), since about 260 devices are returned, mostly identical VPN devices. Something similar happened with W2K beta, so these extra VPN devices may disappear before the final release. Quick testing on .NET server did not show any other problems.

Changes in TMagRas Release 4.90

1 - TMagRas now supports an unlimited number of connection entries, previously there was a maximum limit of 100, after which none were displayed atall. This was done by making MagRasEntryRecs a dynamic array (Delphi 4 and later). There is a new test program to create and delete multiple DUN connection entries, up to 999 at a time (but don't try that many). This is primarily to allow RAS applications to be tested with hundreds of test entries.

2 - Added typeBroadband to TPType for Windows XP.

3 - Updated the main demo application to allow multi-link ISDN to be tested. A new 'ISDN link' drop down list allows all links to be dialled, or a single link only. The second link can then be dialled later, to provide bandwidth on demand. Note that not all ISPs will allow a second link to be added later, it is usually a problem where the two calls get answered by different access servers which can not multilink them. There are currently cosmetic problems in the demo monitoring the second link because the connection handle changes during dialling, which seems very bizarre. More testing is being done. 

4 - IPHelper and it's demo application have been improved to show DNS server allocated to specific adaptors.

Changes in TMagRas Release 4.80

1 - Added the ability to add shortcuts (or links) to the windows desktop for both programs and non-file object such as DUN connections or printers. These functions are in magsubs2. Special directories, such as Printers, can also be indexed. There's a new demo/test program for these functions called scuttest.

2 - Added TConnectionList.CheckIndex which is used to validate the argument to all Connections properties, to avoid possible 'listindex out range' errors accessing connections that have already dropped.

3 - Moved MagRasOSVersion to magsubs1 so it's available without initialising RAS APIs. This may need changes to applications that   check MagRasOSVersion to import the magsubs1 instead of magrasapi.

4 - Corrected MSIEDefConn to set the correct registry key for a default connection in Windows XP.

5 - Fixed major memory leaks in the IP Helper IpHlpIfTable and Get_AdaptersInfo functions, created IpHlpAdaptersInfo which returns TAdaptorRows.

6 - Currently MagRasAdm may only be used to monitor incoming calls to Windows NT4 RAS Server. With Windows 2000 (and .Net Server), RRAS (Routing and Remote Access Service) is used instead. Most of the work on monitoring RRAS has now been done, unfortunately it has not been fully tested since our Windows 2000 server with RRAS installed does not respond as expected to the APIs. It's not known if this is a problem with the underlaying windows APIs or our implementation of them. The new unit is included with this distribution as magrasadm-new.pas in case any users have RRAS working and need this functionality before we are able to finish it properly.

Note that 4.80 is only available as source for registered users, and that the help file has not been updated from 4.71.

 

Changes in TMagRas Release 4.71

1 - Fixed potential bug in TMagRasCon.Create checking the RASAPI32.DLL version failed if the DLL is not installed and raised an exception, bug was introduced in 4.7.

2 - On W2K and XP, make sure that both phonebook files exist, creating if necessary. Create path if necessary before creating empty phonebook file.

3 - Added DirectoryExists and ForceDirs to Magsubs1 to support previous fix, which avoids linking in FileCtrl which brings in the dreaded Forms and bloats many projects.

 

Changes in TMagRas Release 4.7

1 - Tested on Windows XP final build 2600, no changes needed since 4.62.

2 - Added IsDestReachable and IsNetAlive functions using the Synchronization Manager SENSAPI.DLL that comes with MSIE5 and later. These allow a quick test for internet connectivity, but are not totally reliable.

3 - Added MSIEAutoDial and MSIEDefConn which allow some MSIE Internet Options to be set, effectively enabling auto dial for specified entry.

4 - No longer provided compiled DCUs for Delphi 3 since Int64 types are now used in the demo program to display statistics to 4 gig. 4.61 will remain available for D3, or the source can be licensed and modified to remove Int64s.

5 - Installation of the compiled DCUs has changed slightly, all the files necessary are now in the compiler version subdirectory, to avoid copying any from the root (this means several duplicate files in the archive, but eases installation).

6 - Added TCPIPMon to the demo programs to illustrates use of the IP Helper APIs, corrected OS version check in EXPERF for Windows XP.

 

Changes in TMagRas Release 4.62

1 - Added support for Windows XP, tested on RC1 build 2505. XP appears to be fully backward compatible with Windows 2000 so old applications should continue working OK on XP with earlier TMagRas releases. But XP adds new elements to the RASCONN and RASENTRY structures, which are TRasConnWXP and TRasEntryWXP. MagRasOSVersion nows returns OSWXP for Windows XP, if your application uses this (possibly for performance statistics) it will need to be changed. TConnectionList has new Flags and LogonSessId properties to support multiple users being logged onto windows at the same time. TMagRasEdt has 10 new binary and 6 other properties, mostly seem to work, but no proper MSDN documentation yet (most of the new stuff was in Windows 2000, but never supported by RASAPI32)

2 - Deleting subentries on Windows XP only, if the number of subentries is reduced. On earlier OS, it's necessary to delete the entry before saving it to delete old subentries, but this causes the password to be lost so is not done automatically by this component.

3 - Corrected MagRasGetEntryRecs to convert ISDN11-0 to ISDN1 on Windows XP.

4 - In MagRasPer, performance statistics now allow for Win9x DWORD counters wrapping after 4 gigs of total data since a reboot, but maximum data for a session is 4 gigs. NT4/W2K should have been 4 gigs already, but that assumes the Microsoft APIs wrap correctly. Yes, 4 gigs on a modem is a lot, but some ADSL and cable modems also use RAS and can do that in 24 hours.

5 - The TMagRas distribution now includes three new files, iphelper.pas, iphlpapi.pas and dnshelper.pas. These were not originated by Magenta Systems, but have been heavily updated and tested on recent OSs. IP Helper is only available for Win98, WinMe, W2K and XP, although some functions work on NT4 with SP5 or greater. It is included here since it allows access to dynamic DNS server addresses and provides performance statistics for network adaptors. dnshelper uses other techniques to get DNS info for Win95 and NT4. The DNS server address is primarily of interest to those using a DNS lookup component.

6 - The RASDEMO4 program has been updated to support the new RAS features in Windows XP. The Online listView shows connection Flags and LUID (for multiple logons). Full Properties has a new XP tab showing new entry options. A new Network tab shows some stuff from the IP Helper API including dynamic DNS addresses for the PC.

Changes in TMagRas Release 4.61

1 - Recompiled with the final Delphi 6 release.

2 - Fixed a possible bug in MagRasGetEntryList that could have raised a error if there are installed connection entries.

3 - Added GetMACAddresses to return one or more network card MAC address for the local or others PCs, see DEMO4.PAS for usage (it's not in the help file yet).

Changes in TMagRas Release 4.60

1 - Improved the means of listing phonebook entries (aka DUN connections), in order to return extra information for W2K, and also to get common information for all entries with a single function call. This is all done with new functions (not a component) in MagRasEnt, with the MagRasEntryRecs data array being filled by MagRasGetEntryList (minimal info) or MagRasGetEntryRecs (detailed info). Use of the new functions is illustrated on the Entry List tab in the demo program. On NT4/W2K the new functions read the physical phonebook INI files directly since this is up to 100 faster than using API calls. GetPhoneBookEntries is still available, but now uses the new functions.

MagRasGetEntryList fills MagRasEntryRecs with sorted entry names and phonebook paths (W2K only), MagRasGetEntryRecs is similar but also fills phone number, devices and ports, MagRasGetPhoneBookFile loads MagRasPhoneBookInf from rasphone.pbk files, MagRasIsPhoneBookNew checks if rasphone.pbk files have changed since last read, and MagRasGetEntryKey returns keyed data for an entry in MagRasPhoneBookInf.

2 - Finally got around to testing PhoneBookPath, simplified some related code. On W2K, PhoneBookPath must be used to save the entries in the correct phonebook, PhoneBookPath is found from the new MagRasEntryRecs array once MagRasGetEntryList or MagRasGetEntryRecs has been called. To save a new entry on W2K, get the correct phonebook file name from MagRasPhoneFiles (see Demo program). Only administrators can save entries in the All Users phonebook.

3 - Added a new component TMagRasAdm which uses the RasAdmin APIs to monitor incoming RAS connections to NT4 Server, they don't work with NT4 Workstation  incoming calls. These APIs provide similar functionality to the Remote Access Admin application, showing which ports are configured to answer calls, and the status of those in-use. Note there is another set of APIs for RRAS (Routing and Remote Access Service) that are not currently supported by TMagRasAdm. The APIs work in both NT4 and W2K, but only appear to monitor NT4 Server (they work across a LAN).

4 - Moved some common functions to MagSubs1 and MagRasEnt to avoid duplicated code.

Changes in TMagRas Release 4.51

1 - Removed ConnectEx/ConnectNT 4.50 fix for fSubEntry not allowed as zero so that W2K will again dial multilink.

2 - Default fSubEntry on creation to 1 so W2K does not dial multilink (unless set to 0).

3 - Recognise Windows Whistler (aka 2002 or net), only basic testing so far, seems OK. Whistler added one new RAS API, RasDeleteSubEntry, but this is not supported yet in TMagRasEdt.

4 - Corrected DisConnectEx so the timeout actually works and state events are notified while waiting for timeout. Existing applications may now get one or more events that should have happened before, but didn't.

5 - Added TEncryptionType = encryptOptional which is the 'Typical' default in W2K, and prevent the Windows dialog showing custom encryption.

6 - Added bCustomScript property for W2K.

7 - In TAPI event handler, only de-allocate calls in idle event, not when disconnected.

Changes in TMagRas Release 4.50

1 - All literals in the RAS and TAPI components have been moved to resource strings for translation in magrasstr.pas and magtapistr.pas. The Delphi wizard can then be used to convert the strings into a resource file, or the files could be changed to functions which return different languages dynamically.

2 - Added onStateEvent (as an alternative to onStateChanged) which buffers dial callback state messages to avoid dialling being blocked and possible reentrancy issues (since callback can not be stopped). It uses a queue to avoid missing rapidly changing events. The event returns TRasStateRec with all the state properties, rather than reading component properties that may have already been changed by subsequent state changes. Note that CurDevName, CurDevType and ConnectPhoneNr are only set if the event source is status (not dial).

This change has fixed a long term cosmetic problem in the demo program where a second row appeared incorrectly in the ListView while a call was being dialled.

3 - GetConnectStatusEx now updates CurDevName and CurDevType since the W2K final now sets these correctly. ConnectPhoneNr is returned by NT4/W2K. These settings are very useful to see if RAS connected using the device specified in the phonebook entry (it may choose others) and to see what phone number was really dialler (note it's the dialable format usually starting with T (for tone dialling) and may include a calling card number, so it not really suitable for displaying to users.

4 - Added ConnectNT similar to ConnectEx but NT4/W2K only, supports dialextensions for paused states and speaker on/off. The handle passed must be zero to dial a new call, a non-zero handle will resume dialling a call that has been paused for a callback number or authentication. Note that paused states have not been tested yet!!

5 - Fixed an occasional problem in NT4 where performance statistics failed by optionally using PDH.DLL (which must be redistributed) when the normal registry version fails. Tests show that only the RAS Total object returns any data, so the RAS Port object code is currently disabled.

6 - In the TAPI component, on NT some ISDN had channel names starting from 0 not 1, so now allocate ports sequentially, 1/2/3/4 Win9x/NT, 2/1/4/3 W2K. Also minor change to ensure call not returned if deallocated. Increased VPN modems to 30. OnTapiStatus now sets tinfo2 to disconnect reason.

Changes in TMagRas Release 4.41

1 - Corrected Str2IP so that it correctly converts IP addresses with a single last digit and without trailing spaces (function rewitten). This problem meant that PutAllEntryProps sometimes ignored IP addresses, unless they had trailing spaces (which TMaskEdit added in the demo programs).

2 - Added IsIPStr to check an ASCII representation of an IP address is valid.

3 - Improved validation of IP addresses, stop numbers > 255 and zero first.

4 - In TMagRasCon, CreatePhonebook and EditPhonebook now both need Application.Handle passed as a parameter. This avoids the Forms unit being included in some apps. Graphics and Control units now conditional as well to ease linking.

Changes in TMagRas Release 4.40

1 - Added a help file and seven new simple example programs.

2 - Recognise Windows ME (sort of)

3 - Compiled as TComponent again to allow use as an NT service. Previously TMagRas was descended from TCustomControl to allow use in an ActiveX (and may still be conditionally compiled by changing the CUSTCNTL directive in the source). Warning: this change means that applications compiled with TMagRas 4.0 to 4.3 will throw up errors on the Height and Width properties that are now removed (but were never used).

4 - Minor tidying up of unused properties and code.

5 - Added DPK package files to build a package from the TMagRas and TMagTAPI components, to ease installation. BPL/DPL/DCP files are not supplied since these would double the zip size.

Changes in TMagRas Release 4.30

1 - This version has been tested with Windows 2000 build 2195, which is the final retail version. GetDialParams no longer returns the connection password, but what Microsoft call a 'handle' that is 16 asterisks. Passing this 'handle' back to SetDialParams causes the existing password to be unchanged, and so Connect causes the existing password to be used. So if your applications checks that what is saved is also returned, it will fail under W2K. Avoided what appears to be a bug in W2K whereby dialling properties were lost after saving an entry and it's subentries - now save a second time after doing the subentries, silly but it works.

2 - Added Str2IP to TMagRasEdt to convert and validate IP addresses.

3 - Added DUNVersion and DUNInfo properties to TMagRasCon to return the DUN version. A look-up table uses the build of RASAPI.DLL (in DUNVersion) to create a version description like 'DUN 1.1/Win95/OSR2' (in DUNInfo).

4 - Corrected PhoneNumber being ignored for dialling (error in 4.00 and later), so the number dialled was always the default from the phonebook entry. You should set PhoneNumber to blank before calling Connect to use the default number.

5 - GetEntryProperties now completes LocalPhoneNumber not PhoneNumber, to avoid confusion when dialling calls.

6 - Added GetTransCaps which gets modem and country dialling properties so we can offer better display of canonical numbers (we need to know the local city code). The function completes DialProps, DialLocation, DialCard and DialCountry for the current dialling location. Full informtation on the content of these records is in the TAPI API info.

7 - Added UseCountryAndAreaCodes and PromoteAlternates properties for use with dialling properties, and EntryOptions which is 32-bits of flags where other properties are needed.

Changes in TMagRas Release 4.20

1 - Make sure Win9x modem device configuration set correctly for new or edited connections/phonebooks. Previously an error would appear when attempting to access modem properties when editing a phonebook using the normal dialog. Also set default modem device configuration when updating Win9x connections, if it's missing.

2 - Structures are now available to edit the Win9x modem device info, but the properties are not currently being processed.

3 - Corrected GetEntryProperties canonical phone number on NT4/W2K when area code set but dialling properties disabled.

Changes in TMagRas Release 4.10

1 - Performance statistics now support two adaptors for Win9x, so that the devices used for the first two connections can now be monitored separately. Note that Windows does not say which adaptor is monitoring which connected, so they must be allocated sequentially.

2 - A performance statistics reset now clears all arrays so 'all' stats restart correctly on NT4.

3 - Added DefCountryId propertry to ease created connections/phonebooks.

4 - No longer store component version on form.

5 - TotSubEntries is now set as 2 for Win9x ISDN multilink, but there are no modem/dial details since the RAS API was never completed by Microsoft.

6 - Changed TConnectionList.Clear to ClearFree to avoid overwrite problem in D3.