(C) Copyright 2001, Serge Ryvkin
TRasObject component allows to developer to use remote access service (usually, modem dialup) in simplest way. The developer can create, modify and delete connections, dial selected connection and disconnect. The component is realized on base of Microsoft Remote Access Service API, translated for Delphi by Davide Moretti. It is checked on Windows 95 (with additional MS DLL library RINAPH.DLL), Windows 95 OSR2, Windows 98, Windows 98 SR1, Windows ME, Windows 2000. Free version of the component is compiled by Borland Delphi 5.0.
You can use free of charge for commercial and non commercial purposes compiled version of the component and source code of test application. If you want to purchase component source code, you can do it through ShareIt! registration service pressing the following button.
Unpack received file RasObject.zip to separate folder. From Delphi IDE select Component | Install Packages and the button Add. In dialog select RasPack.bpl file and press Open button. Package will be installed, and the TRasObject component will appear on palette Ryvkin.
To compile properly the application with the component, .dcu files must be in the same folder as RasPack.bpl file.
TRasObject is standard Delphi component. It can be placed on form or data module, developer can adjust properties and set events and use its possibilities.
Usually developer needs to realize simple task to allow his application to access to the RAS - manage connection entries, dial and hang up. TRasObject allows it! You can manage connections (create, modify, rename, delete), dial synchronously of asynchronously and hang up. Through components properties you can receive full and real time updated list of available and active connections, and assign event to receive RAS status.
Developer can use PhoneBook to access to full list of available connections. The list is updating dynamically with refresh interval, selected by RefreshInterval property. This list is read-only. Dynamic updates available during runtime only.
Developer can use ActiveNames during design time to access to full list of names of active connections. The list is updating dynamically with refresh interval, selected by RefreshInterval property. This list is read-only. Dynamic updates available during runtime only. During runtime it would be more convenient to use ActiveConnections field.
ActiveConnections: array of TRasObjectActiveConnection
type TRasObjectActiveConnection = record Handle: Pointer; // Connection handle Name: string; // Name in phonebook DeviceType: string; // Used device type DeviceName: string; // Used device name Status: string; // Status string end;
Parameters: TRasObjectParameters
type TRasObjectParameters = class .......public Domain: string; // MS Domain name Username: string; // User name Password: string; // Password PhoneNumber: string; // Phone number CallbackNumber: string; // Callback number procedure Clear; // Clear parameters function IsEmpty: boolean; // Check, if all parameterss are empty end;
Developer can use this field to store and retrieve RAS call parameters from phonebook entry using methods .
constructor Create(aOwner: TComponent);
function CreateEntry: boolean;
function EditEntry(const EntryName: string): boolean;
function RenameEntry(const EntryName: string; const NewEntryName: string): boolean;
function DeleteEntry(const EntryName: string): boolean;
OnStatusChange: procedure(Sender: TObject; IsError: boolean; StatusString: string)
Serge Ryvkin
to@ryvkin.com