TTapi 3.2

Introduction
How to Register
Contacting Us

TTapi Properties
TTapi Methods
TTapi Events

 

 

 

 

 

 

 

Introduction

TTapi encapsulates the functionality of the Windows95/98/NT RAS API including the RAS API extensions and the Windows 95 Dial-Up Networking upgrades. It provides Delphi programmers with a simple, powerful interface to extend their applications with remote access.

TTapi is compatible with and has been extensively tested with Windows 95, Windows 98 and WindowsNT 4.0 in real-world, commercial applications.

This component is a limited-time shareware component which will not work after the trial 30-day period. After the trial period, you must register to unlock it.

 

How to Register

The registration cost for TTapi is $25.00 (US).

Click Here for details on how to register.

 

 

Contacting Us

Web: http://www.astcorp.net
Sales: sales@astcorp.net
Support: support@astcorp.net

 

 

 

 

 

 

 

TTapi Properties

DeviceName: String (Read-Only)

After successfully connecting, DeviceName contains the description of the device used for the connection. For example: "Generic 14.4Kbps Modem".

DeviceType: String (Read-Only)

After successfully connecting, DeviceType contains the description of the type of device used for the connection. For example: "Modem".

Connections: TStringList (Read-Only)

After a call to EnumConnections, Connections contains a list of active RAS connections.

PhonebookEntries: TStringList (Read-Only)

After a call to GetPhonebookEntries, PhonebookEntries contains a list of Dial-Up Networking entries configured on this system.

DeviceEntries: TStringList (Read-Only)

After a call to EnumDevices, DeviceEntries contains a list of RAS devices configured on this system.

RasInitialized: Boolean (Read-Only)

Indicates whether or not RAS could be initialized. This property is set on Create. When FALSE, it usually indicates that RAS is not installed on this system

Connected: Boolean (Read-Only)

Indicates whether or not TTapi is currently connected to a dial-up server.

MinimizeDialWindow: Boolean (Windows 95/98 only)

If MinimizeDialWindow is TRUE, TTapi will minimize the dial-up window which appears after successfully connecting.

EntryName: String

Use EntryName to tell TTapi which RAS entry to use.

PhoneNumber: String

Use PhoneNumber to dial a different phone number than the one configured in the RAS entry. If left empty, the configured phone number will be used.

CallbackNumber: String

Use CallbackNumber to specify a different callback number than the one configured in the RAS entry. If left empty, the configured callback number will be used.

Username: String

Use Username to login with a different account than the one configured in the RAS entry. If left empty, the configured account name will be used.

Password: String

Use Password to login with a different password than the one configured in the RAS entry. If left empty, the configured password will be used.

Domain: String

Use Domain to specify the domain to authenticate on login. This is normally only necessary when dialing a Windows NT dial-up server.

RedialAttempts: Integer

Use RedialAttempts to specify the number of times to retry the connection on connection failure.

RedialPause: Byte

Use RedialPause to specify the number of seconds to wait between redial attempts.

PhonebookPath: String (Windows NT only)

Use PhonebookPath to specify a different phonebook than the default.

SynchronousDial: Boolean

If set to TRUE, the connection attempt will be synchronous. The Connect function will return only after the attempt is completed. Otherwise, Connect will return immediately.

 

TTapi Methods

GetConnectStatus

Function GetConnectStatus: LongInt

Returns the status of the current connection.

 

Disconnect

Function Disconnect: LongInt

Disconnects the current connection.

 

Connect

Function Connect: Longint

Attempts to connect to the entry specified in EntryName.

If SynchronousDial has been enabled, the return contains the connection handle. Otherwise, the return value is not used.

 

GetPhoneBookEntries

Procedure GetPhoneBookEntries

Retrieves a list of configured RAS phonebook entries.

After the call has returned, PhonebookEntries has been populated with the list of entries.

 

RasCreateEntry

Procedure RasCreateEntry(hHandle: hWnd; var dwRetVal: DWord)

Launches the RAS Create New Entry wizard.

hHandle

The application’s main window handle or application handle.

dwRetVal

A buffer to contain the return value of the API call.

For compatibility with TTapi 2.0 only.

 

CreateEntry

Function CreateEntry(hHandle: hWnd): Boolean

Launches the RAS Create New Entry wizard.

hHandle

The application's main window handle or application handle.

Returns True if the wizard was successfully executed. This does not necessarily indicate that an entry was created.

 

DeleteEntry

Function DeleteEntry(EntryName: String): Boolean

Deletes the specified entry.

EntryName

The display name of the entry to be deleted.

Returns True if the entry was successfully deleted.

 

EditEntry

Function EditEntry(hHandle: hWnd; EntryName: String): Boolean

Launches the RAS Entry Properties dialog.

hHandle

The application's main window handle or application handle.

EntryName

The display name of the entry to be edited.

Returns True if the wizard was successfully executed.

 

RenameEntry

Function RenameEntry(OldEntryName, NewEntryName: String): Boolean

Renames the entry specified in OldEntryName.

OldEntryName

The current display name of the entry.

NewEntryName

The new display name of the entry.

Return True is the entry was successfully renamed.

 

GetDialParams

Function GetDialParams(EntryName: String): Boolean

Retrieves the login parameters used in the last successful connection.

EntryName

The display name of the entry for which to retrieve information.

Returns True if the information was retrieved. TTapi's properties are populated by the information.

 

SetDialParams

Function SetDialParams: Boolean

Saves the login parameters specified for the RAS entry.

Returns True if the information was successfully stored.

 

EnumConnections

Function EnumConnections: Boolean

Enumerates all current RAS connections.

Returns True if the call is successful. The connections are saved in Connections.

 

GetHandleByName

Function GetHandleByName(EntryName: String): LongInt

Gets the connection handle of the RAS entry specified.

EntryName

The display name of the entry for which to retrieve information.

Returns 0 if the entry name is not found or the entry is not connected.  Otherwise, returns a handle to the current connection.

 

DelayedConnect

Procedure DelayedConnect( iDelaySecs: Integer )

Attempts to connect to the entry specified after a delay.

iDelaySecs

The number of seconds to wait before attempting to connect.

 

GetDeviceEntries

Procedure GetDeviceEntries

Loads the configured RAS devices into the DeviceEntries list.

 

GetEntryProperties

Function GetEntryProperties( var lpbEntryStruct: TEntry ): Boolean

Loads the entry configuration for the current entry into lpbEntryStruct.

lpbEntryStruct

A pointer to a TEntry record type.

Returns TRUE if the configuration could be loaded.  Otherwise, returns FALSE. 

 

SetEntryProperties

Function SetEntryProperties( lpbEntryStruct: TEntry ): Boolean

Overwrites the current entry's configuration with the one passed in lpbEntryStruct. 

lpbEntryStruct

A pointer to a TEntry record type.

Returns TRUE is successful.  Otherwise returns FALSE.

 

IPAddress

Function IPAddress: String

After a successful connection, returns the IPAddress negotiated with the server.

 

ServerIPAddress

Function ServerIPAddress: String

After a successful connection, returns the IPAddress of the RAS server.

 

IPXAddress

Function IPXAddress: String

After a successful connection, returns the IPX Address negotiated with the server.

 

NetBeuiAddress

Function NetBeuiAddress: String

After a successful connection, returns the NetBeui Address negotiated with the server.

 

Handle

Function Handle: LongInt

After a successful connection, returns a handle the RAS connection.

 

SetHandle

Procedure SetHandle( h: LongInt )

Sets TTapi's entry handle to the handle passed in h.

h

A handle to an existing RAS connection.

 

TTapi Events

OnConnect

Property OnConnect: TNotifyEvent

OnConnect is triggered when a connection to the dialup host has been established. 

 

OnConnectFail

Property OnConnectFail: TRasStateEvent

OnConnectFail is triggered when a connection to the dialup host could not be successfully established. When OnConnectFail has been triggered, all redial attempts have been completed.

 

OnDisconnect

Property OnDisconnect: TRasStateEvent

OnDisconnect is triggered when the connection to the dialup host has been lost. This will only occur after OnConnect.

 

OnNotify

Property OnNotify: TRasStateEvent

OnNotify is triggered whenever the dialing state has changed.