// Borland C++ Builder
// Copyright (c) 1995, 1998 by Borland International
// All rights reserved

// (DO NOT EDIT: machine generated header) 'AHMTRASManager.pas' rev: 3.00

#ifndef AHMTRASManagerHPP
#define AHMTRASManagerHPP
#include <ExtCtrls.hpp>
#include <AHMSystemConst.hpp>
#include <AHMSystemClass.hpp>
#include <Dialogs.hpp>
#include <Forms.hpp>
#include <Controls.hpp>
#include <Graphics.hpp>
#include <Classes.hpp>
#include <SysUtils.hpp>
#include <Messages.hpp>
#include <Windows.hpp>
#include <SysInit.hpp>
#include <System.hpp>

//-- user supplied -----------------------------------------------------------

namespace Ahmtrasmanager
{
//-- type declarations -------------------------------------------------------
typedef int THRASConn;

typedef int *PHRASConn;

typedef int TRASConnState;

typedef int *PDWord;

typedef BOOL *PBool;

enum TAHMWinVer { v400, v401, v500 };

#pragma pack(push, 1)
struct TRASDialParams
{
	int dwSize;
	char szEntryName[257];
	char szPhoneNumber[129];
	char szCallbackNumber[129];
	char szUserName[257];
	char szPassword[257];
	char szDomain[16];
	union
	{
		struct 
		{
			int dwSubEntry;
			int dwCallbackId;
			char szPadding2[3];
			
		};
		char szPadding1[3];
		
	};
} ;
#pragma pack(pop)

typedef TRASDialParams *PRASDialParams;

#pragma pack(push, 1)
struct TRasIPAddr
{
	Byte a;
	Byte b;
	Byte c;
	Byte d;
} ;
#pragma pack(pop)

typedef TRasIPAddr *PRasIPAddr;

struct TRasEntry;
typedef TRasEntry *PRasEntry;

struct TRasEntry
{
	int dwSize;
	int Options;
	int dwCountryID;
	int dwCountryCode;
	char szAreaCode[11];
	char pLocalPhoneNumber[129];
	int AlternatesOffset;
	TRasIPAddr IPAddr;
	TRasIPAddr IPAddrDns;
	TRasIPAddr IPAddrDnsAlt;
	TRasIPAddr IPAddrWins;
	TRasIPAddr IPAddrWinsAlt;
	int dwFrameSize;
	int dwNetProtocols;
	int dwFramingProtocol;
	char szScript[260];
	char szAutodialDll[260];
	char szAutodialFunc[260];
	char szDeviceType[17];
	char szDeviceName[129];
	char szX25PadType[33];
	char szX25Address[201];
	char szX25Facilities[201];
	char szX25UserData[201];
	int dwChannels;
	int Reserved1;
	int Reserved2;
	union
	{
		struct 
		{
			int dw5SubEntries;
			int dw5DialMode;
			int dw5DialExtraPercent;
			int dw5DialExtraSampleSeconds;
			int dw5HangUpExtraPercent;
			int dw5HangUpExtraSampleSeconds;
			int dw5IdleDisconnectSeconds;
			char szPortName[129];
			
		};
		struct 
		{
			int dw4SubEntries;
			int dw4DialMode;
			int dw4DialExtraPercent;
			int dw4DialExtraSampleSeconds;
			int dw4HangUpExtraPercent;
			int dw4HangUpExtraSampleSeconds;
			int dw4IdleDisconnectSeconds;
			
		};
		
	};
} ;

#pragma pack(push, 1)
struct TRASDialExtensions
{
	int dwSize;
	int dwfOptions;
	HWND hwndParent;
	int reserved;
} ;
#pragma pack(pop)

typedef TRASDialExtensions *PRASDialExtensions;

#pragma pack(push, 1)
struct TRASConnStatus
{
	int dwSize;
	int RasConnState;
	int dwError;
	char szDeviceType[17];
	char szDeviceName[129];
	char szPadding[2];
} ;
#pragma pack(pop)

typedef TRASConnStatus *PRASConnStatus;

#pragma pack(push, 1)
struct TRASConn
{
	int dwSize;
	int HRASConn;
	char szEntryName[257];
	char szDeviceType[17];
	char szDeviceName[129];
	char szPadding[1];
} ;
#pragma pack(pop)

typedef TRASConn *PRASConn;

#pragma pack(push, 1)
struct TRASEntryName
{
	int dwSize;
	char szEntryName[257];
	char szPadding[3];
} ;
#pragma pack(pop)

typedef TRASEntryName *PRASEntryName;

typedef int __stdcall (*TFNRasDial)(PRASDialExtensions RasDialExtensions, char * PhoneBook, PRASDialParams 
	RasDialParams, int NotifierType, void * Notifier, PHRASConn RasConn);

typedef TFNRasDial *PFNRasDial;

typedef int __stdcall (*TFNRasGetErrorString)(int uErrorValue, char * szErrorString, int cBufSize);

typedef TFNRasGetErrorString *PFNRasGetErrorString;

typedef int __stdcall (*TFNRasHangUp)(int RasConn);

typedef TFNRasHangUp *PFNRasHangUp;

typedef int __stdcall (*TFNRasGetConnectStatus)(int HRASConn, PRASConnStatus lpRasConnStatus);

typedef TFNRasGetConnectStatus *PFNRasGetConnectStatus;

typedef int __stdcall (*TFNRasEnumConnections)(PRASConn pRasConn, PDWord pCB, PDWord pcConnections);
	

typedef TFNRasEnumConnections *PFNRasEnumConnections;

typedef int __stdcall (*TFNRasEnumEntries)(void * Reserved, char * szPhonebook, PRASEntryName lpRasEntryName
	, PDWord lpcb, PDWord lpcEntries);

typedef TFNRasEnumEntries *PFNRasEnumEntries;

typedef int __stdcall (*TFNRasGetEntryDialParams)(char * lpszPhonebook, PRASDialParams lprasDialParams
	, PBool lpfPassword);

typedef TFNRasGetEntryDialParams *PFNRasGetEntryDialParams;

typedef int __stdcall (*TFNRasEditPhoneBookEntry)(HWND hWndParent, char * lpszPhonebook, char * lpszEntryName
	);

typedef TFNRasEditPhoneBookEntry *PFNRasEditPhoneBookEntry;

typedef int __stdcall (*TFNRasCreatePhonebookEntry)(HWND hWndParent, char * lpszPhonebook);

typedef TFNRasCreatePhonebookEntry *PFNRasCreatePhonebookEntry;

typedef int __stdcall (*TFNRasGetEntryProperties)(char * lpszPhonebook, char * lpszEntry, PRasEntry 
	lpRasEntry, PDWord lpdwEntryInfoSize, Windows::PByte lpbDeviceInfo, PDWord lpdwDeviceInfoSize);

typedef TFNRasGetEntryProperties *PFNRasGetEntryProperties;

typedef int __stdcall (*TFNRasSetEntryProperties)(char * lpszPhonebook, char * lpszEntry, PRasEntry 
	lpRasEntry, int lpdwEntryInfoSize, Windows::PByte lpbDeviceInfo, PDWord lpdwDeviceInfoSize);

typedef TFNRasSetEntryProperties *PFNRasSetEntryProperties;

typedef int __stdcall (*TFNRasDeleteEntry)(char * lpszPhonebook, char * lpszEntry);

typedef TFNRasDeleteEntry *PFNRasDeleteEntry;

typedef void __fastcall (__closure *TAHMOnChangeConnection)(System::TObject* Sender, System::AnsiString 
	OldConnection, System::AnsiString NewConnection);

typedef void __fastcall (__closure *TAHMOnConnectionExists)(System::TObject* Sender, System::AnsiString 
	Connection);

typedef void __fastcall (__closure *TAHMOnNewPhoneEntry)(System::TObject* Sender, System::AnsiString 
	Connection);

typedef void __fastcall (__closure *TAHMOnRasMessage)(System::TObject* Sender, int RasMessage);

typedef void __fastcall (__closure *TAHMOnRasError)(System::TObject* Sender, System::AnsiString RasMessage
	, int Error);

typedef void __fastcall (__closure *TAHMOnRasDelAfter)(System::TObject* Sender, const bool Success);
	

typedef void __fastcall (__closure *TAHMOnRasDelBefore)(System::TObject* Sender, bool &DoDelete);

typedef void __fastcall (__closure *TAHMRasError)(System::TObject* Sender, int Status);

class DELPHICLASS TAHMRasTimerThread;
class DELPHICLASS TAHMRASTimer;
class PASCALIMPLEMENTATION TAHMRASTimer : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	bool FEnabled;
	Word FInterval;
	Classes::TNotifyEvent FOnTimer;
	TAHMRasTimerThread* FTimerThread;
	TThreadPriority FThreadPriority;
	void __fastcall SetEnabled(const bool Value);
	void __fastcall SetInterval(const Word Value);
	void __fastcall SetThreadPriority(const Classes::TThreadPriority Value);
	
protected:
	void __fastcall UpdateTimer(void);
	DYNAMIC void __fastcall Timer(void);
	
public:
	__fastcall virtual TAHMRASTimer(void);
	__fastcall virtual ~TAHMRASTimer(void);
	
__published:
	__property bool Enabled = {read=FEnabled, write=SetEnabled, nodefault};
	__property Word Interval = {read=FInterval, write=SetInterval, nodefault};
	__property Classes::TNotifyEvent OnTimer = {read=FOnTimer, write=FOnTimer};
	__property Classes::TThreadPriority Priority = {read=FThreadPriority, write=SetThreadPriority, nodefault
		};
};

class PASCALIMPLEMENTATION TAHMRasTimerThread : public Classes::TThread 
{
	typedef Classes::TThread inherited;
	
public:
	TAHMRASTimer* OwnerTimer;
	virtual void __fastcall Execute(void);
	void __fastcall DoTimer(void);
public:
	/* TThread.Create */ __fastcall TAHMRasTimerThread(bool CreateSuspended) : Classes::TThread(CreateSuspended
		) { }
	/* TThread.Destroy */ __fastcall virtual ~TAHMRasTimerThread(void) { }
	
};

enum TAHMConnectionOptionFlags { coUseCountryAndAreaCodes, coSpecificIpAddr, coSpecificNameServers, 
	coIpHeaderCompression, coRemoteDefaultGateway, coDisableLcpExtensions, coTerminalBeforeDial, coTerminalAfterDial, 
	coModemLights, coSwCompression, coRequireEncryptedPw, coRequireMsEncryptedPw, coRequireDataEncryption, 
	coNetworkLogon, coUseLogonCredentials, coPromoteAlternates, coSecureLocalFiles };

typedef Set<TAHMConnectionOptionFlags, coUseCountryAndAreaCodes, coSecureLocalFiles>  TAHMConnectionOptions
	;

enum TAHMNetProtocolsFlags { npIPX, npTCPIP, npNETBEUI };

typedef Set<TAHMNetProtocolsFlags, npIPX, npNETBEUI>  TAHMNetProtocols;

enum TAHMFramingProtocolsFlags { fpPPP, fpSLIP, fpRAS };

typedef Set<TAHMFramingProtocolsFlags, fpPPP, fpRAS>  TAHMFramingProtocols;

class DELPHICLASS TAHMRASProperties;
class DELPHICLASS TAHMRASManager;
class PASCALIMPLEMENTATION TAHMRASManager : public Ahmsystemclass::TAHMSystemsComponent 
{
	typedef Ahmsystemclass::TAHMSystemsComponent inherited;
	
private:
	System::AnsiString FLastError;
	Classes::TStrings* FConnections;
	Classes::TNotifyEvent FOnUpdate;
	System::AnsiString FConnection;
	TAHMOnChangeConnection FOnChangeConnection;
	System::AnsiString FUserName;
	System::AnsiString FPassword;
	System::AnsiString FNumber;
	int IntHRASConn;
	int nRasConn;
	bool FActive;
	TAHMRASTimer* FRasTimer;
	Classes::TNotifyEvent FOnDisconnected;
	Classes::TNotifyEvent FOnConnected;
	Classes::TNotifyEvent FOnConnectFailed;
	TAHMOnConnectionExists FOnConnectionExists;
	HWND FApplicationHandle;
	HWND FOwnerhandle;
	Controls::TWinControl* FOwnerForm;
	TAHMOnNewPhoneEntry FOnNewPhoneEntry;
	int FCheckStatus;
	bool FNoPassword;
	System::AnsiString FDomain;
	TAHMRASProperties* FAHMRASProperties;
	Classes::TNotifyEvent FOnMSGOpenPort;
	Classes::TNotifyEvent FOnMSGPortOpened;
	Classes::TNotifyEvent FOnMSGConnectDevice;
	TAHMOnRasError FOnRASError;
	TAHMOnRasMessage FOnAnyMessage;
	TAHMOnRasMessage FOnMsgOther;
	Classes::TNotifyEvent FOnMsgPrepareForCallback;
	Classes::TNotifyEvent FOnMsgPasswordExpired;
	Classes::TNotifyEvent FOnMsgLogonNetwork;
	Classes::TNotifyEvent FOnMsgStartAuthentication;
	Classes::TNotifyEvent FOnMsgProjected;
	Classes::TNotifyEvent FOnMsgAuthenticated;
	Classes::TNotifyEvent FOnMsgAuthLinkSpeed;
	Classes::TNotifyEvent FOnMsgAuthProject;
	Classes::TNotifyEvent FOnMsgAuthChangePassword;
	Classes::TNotifyEvent FOnMsgDeviceConnected;
	Classes::TNotifyEvent FOnMsgDisconnected;
	Classes::TNotifyEvent FOnMsgAuthNotify;
	Classes::TNotifyEvent FOnMsgInteractive;
	Classes::TNotifyEvent FOnMsgReAuthenticate;
	Classes::TNotifyEvent FOnMsgAuthAck;
	Classes::TNotifyEvent FOnMsgRetryAuthentication;
	Classes::TNotifyEvent FOnMsgSubEntryConnected;
	Classes::TNotifyEvent FOnMsgAuthRetry;
	Classes::TNotifyEvent FOnMsgCallbackSetByCaller;
	Classes::TNotifyEvent FOnMsgAuthenticate;
	Classes::TNotifyEvent FOnMsgWaitForModemReset;
	Classes::TNotifyEvent FOnMsgConnected;
	Classes::TNotifyEvent FOnMsgWaitForCallback;
	Classes::TNotifyEvent FOnMsgCallBackComplete;
	Classes::TNotifyEvent FOnMsgAllDevicesConnected;
	Classes::TNotifyEvent FOnMsgSubEntryDisconnected;
	Classes::TNotifyEvent FOnMsgAuthCallback;
	System::AnsiString FPhoneBook;
	TAHMOnRasDelAfter FAfterDeleteEntry;
	TAHMOnRasDelBefore FBeforeDeleteEntry;
	System::AnsiString FConnectedOn;
	TAHMOnConnectionExists FOnExternalConnect;
	void __fastcall OnRasTimer(System::TObject* Sender);
	void __fastcall SetConnections(const Classes::TStrings* Value);
	void __fastcall SetConnection(const System::AnsiString Value);
	void __fastcall SetPassword(const System::AnsiString Value);
	void __fastcall SetUsername(const System::AnsiString Value);
	bool __fastcall GetActive(void);
	bool __fastcall GetConnected(void);
	void __fastcall SetActive(const bool Value);
	bool __fastcall GetActiveConnection(void);
	void __fastcall SetCheckStatus(const int Value);
	void __fastcall SetDomain(const System::AnsiString Value);
	bool __fastcall GetInstalled(void);
	void __fastcall Setinstalled(const bool Value);
	void __fastcall SetPhonebook(const System::AnsiString Value);
	bool __fastcall SetError(const int Error);
	
protected:
	void *OldWndProc;
	void *NewWndProc;
	void __fastcall HookWin(void);
	void __fastcall UnhookWin(void);
	void __fastcall UpdateEntry(void);
	bool __fastcall LoadPhoneBook(void);
	
public:
	virtual void __fastcall Hooked(Messages::TMessage &AMsg);
	__property Controls::TWinControl* OwnerForm = {read=FOwnerForm};
	__property HWND OwnerHandle = {read=FOwnerhandle, nodefault};
	__property HWND ApplicationHandle = {read=FApplicationHandle, nodefault};
	void __fastcall UpdateRAS(void);
	bool __fastcall ConfigureEntry(System::AnsiString Entry);
	bool __fastcall CreateEntry(void);
	bool __fastcall DeleteEntry(System::AnsiString Entry);
	__fastcall virtual TAHMRASManager(Classes::TComponent* AOwner);
	virtual void __fastcall Loaded(void);
	__fastcall virtual ~TAHMRASManager(void);
	bool __fastcall Connect(void);
	void __fastcall Disconnect(void);
	__property System::AnsiString LastError = {read=FLastError};
	__property bool HasPassword = {read=FNoPassword, nodefault};
	__property Classes::TStrings* Connections = {read=FConnections, write=SetConnections};
	__property bool Connected = {read=GetConnected, nodefault};
	__property System::AnsiString ConnectedOn = {read=FConnectedOn};
	
__published:
	__property System::AnsiString Phonebook = {read=FPhoneBook, write=SetPhonebook, stored=false};
	__property System::AnsiString Connection = {read=FConnection, write=SetConnection, stored=false};
	__property int CheckStatus = {read=FCheckStatus, write=SetCheckStatus, nodefault};
	__property bool Active = {read=GetActive, write=SetActive, stored=false, nodefault};
	__property System::AnsiString UserName = {read=FUserName, write=SetUsername, stored=false};
	__property System::AnsiString Password = {read=FPassword, write=SetPassword, stored=false};
	__property System::AnsiString Domain = {read=FDomain, write=SetDomain, stored=false};
	__property bool Installed = {read=GetInstalled, write=Setinstalled, stored=false, nodefault};
	__property TAHMRASProperties* Properties = {read=FAHMRASProperties, write=FAHMRASProperties, stored=false
		};
	__property Classes::TNotifyEvent OnUpdate = {read=FOnUpdate, write=FOnUpdate};
	__property TAHMOnRasDelBefore BeforeDeleteEntry = {read=FBeforeDeleteEntry, write=FBeforeDeleteEntry
		};
	__property TAHMOnRasDelAfter AfterDeleteEntry = {read=FAfterDeleteEntry, write=FAfterDeleteEntry};
	__property TAHMOnChangeConnection OnChangeConnection = {read=FOnChangeConnection, write=FOnChangeConnection
		};
	__property Classes::TNotifyEvent OnConnectFailed = {read=FOnConnectFailed, write=FOnConnectFailed};
		
	__property Classes::TNotifyEvent OnConnected = {read=FOnConnected, write=FOnConnected};
	__property Classes::TNotifyEvent OnDisconnected = {read=FOnDisconnected, write=FOnDisconnected};
	__property TAHMOnConnectionExists OnConnectionExists = {read=FOnConnectionExists, write=FOnConnectionExists
		};
	__property TAHMOnConnectionExists OnExternalConnect = {read=FOnExternalConnect, write=FOnExternalConnect
		};
	__property TAHMOnNewPhoneEntry OnNewPhoneEntry = {read=FOnNewPhoneEntry, write=FOnNewPhoneEntry};
	__property TAHMOnRasError OnRASError = {read=FOnRASError, write=FOnRASError};
	__property Classes::TNotifyEvent OnMsgOpenPort = {read=FOnMSGOpenPort, write=FOnMSGOpenPort};
	__property Classes::TNotifyEvent OnMsgPortOpened = {read=FOnMSGPortOpened, write=FOnMSGPortOpened};
		
	__property Classes::TNotifyEvent OnMsgConnectDevice = {read=FOnMSGConnectDevice, write=FOnMSGConnectDevice
		};
	__property Classes::TNotifyEvent OnMsgDeviceConnected = {read=FOnMsgDeviceConnected, write=FOnMsgDeviceConnected
		};
	__property Classes::TNotifyEvent OnMsgAllDevicesConnected = {read=FOnMsgAllDevicesConnected, write=
		FOnMsgAllDevicesConnected};
	__property Classes::TNotifyEvent OnMsgAuthenticate = {read=FOnMsgAuthenticate, write=FOnMsgAuthenticate
		};
	__property Classes::TNotifyEvent OnMsgAuthenticated = {read=FOnMsgAuthenticated, write=FOnMsgAuthenticated
		};
	__property Classes::TNotifyEvent OnMsgAuthNotify = {read=FOnMsgAuthNotify, write=FOnMsgAuthNotify};
		
	__property Classes::TNotifyEvent OnMsgAuthRetry = {read=FOnMsgAuthRetry, write=FOnMsgAuthRetry};
	__property Classes::TNotifyEvent OnMsgAuthCallback = {read=FOnMsgAuthCallback, write=FOnMsgAuthCallback
		};
	__property Classes::TNotifyEvent OnMsgAuthChangePassword = {read=FOnMsgAuthChangePassword, write=FOnMsgAuthChangePassword
		};
	__property Classes::TNotifyEvent OnMsgAuthProject = {read=FOnMsgAuthProject, write=FOnMsgAuthProject
		};
	__property Classes::TNotifyEvent OnMsgAuthLinkSpeed = {read=FOnMsgAuthLinkSpeed, write=FOnMsgAuthLinkSpeed
		};
	__property Classes::TNotifyEvent OnMsgAuthAck = {read=FOnMsgAuthAck, write=FOnMsgAuthAck};
	__property Classes::TNotifyEvent OnMsgReAuthenticate = {read=FOnMsgReAuthenticate, write=FOnMsgReAuthenticate
		};
	__property Classes::TNotifyEvent OnMsgPrepareForCallback = {read=FOnMsgPrepareForCallback, write=FOnMsgPrepareForCallback
		};
	__property Classes::TNotifyEvent OnMsgWaitForModemReset = {read=FOnMsgWaitForModemReset, write=FOnMsgWaitForModemReset
		};
	__property Classes::TNotifyEvent OnMsgWaitForCallback = {read=FOnMsgWaitForCallback, write=FOnMsgWaitForCallback
		};
	__property Classes::TNotifyEvent OnMsgProjected = {read=FOnMsgProjected, write=FOnMsgProjected};
	__property Classes::TNotifyEvent OnMsgStartAuthentication = {read=FOnMsgStartAuthentication, write=
		FOnMsgStartAuthentication};
	__property Classes::TNotifyEvent OnMsgCallBackComplete = {read=FOnMsgCallBackComplete, write=FOnMsgCallBackComplete
		};
	__property Classes::TNotifyEvent OnMsgLogonNetwork = {read=FOnMsgLogonNetwork, write=FOnMsgLogonNetwork
		};
	__property Classes::TNotifyEvent OnMsgSubEntryConnected = {read=FOnMsgSubEntryConnected, write=FOnMsgSubEntryConnected
		};
	__property Classes::TNotifyEvent OnMsgSubEntryDisconnected = {read=FOnMsgSubEntryDisconnected, write=
		FOnMsgSubEntryDisconnected};
	__property Classes::TNotifyEvent OnMsgInteractive = {read=FOnMsgInteractive, write=FOnMsgInteractive
		};
	__property Classes::TNotifyEvent OnMsgRetryAuthentication = {read=FOnMsgRetryAuthentication, write=
		FOnMsgRetryAuthentication};
	__property Classes::TNotifyEvent OnMsgCallbackSetByCaller = {read=FOnMsgCallbackSetByCaller, write=
		FOnMsgCallbackSetByCaller};
	__property Classes::TNotifyEvent OnMsgPasswordExpired = {read=FOnMsgPasswordExpired, write=FOnMsgPasswordExpired
		};
	__property Classes::TNotifyEvent OnMsgConnected = {read=FOnMsgConnected, write=FOnMsgConnected};
	__property Classes::TNotifyEvent OnMsgDisconnected = {read=FOnMsgDisconnected, write=FOnMsgDisconnected
		};
	__property TAHMOnRasMessage OnMsgOther = {read=FOnMsgOther, write=FOnMsgOther};
	__property TAHMOnRasMessage OnMsgAny = {read=FOnAnyMessage, write=FOnAnyMessage};
};

class PASCALIMPLEMENTATION TAHMRASProperties : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	TAHMRASManager* FAHMRASManager;
	TRasEntry InternalEntry;
	System::AnsiString __fastcall GetAreaCode(void);
	System::AnsiString __fastcall GetAutoDialDLL(void);
	System::AnsiString __fastcall GetAutoDialFunc(void);
	int __fastcall GetCountryCode(void);
	int __fastcall GetCountryID(void);
	System::AnsiString __fastcall GetDeviceName(void);
	System::AnsiString __fastcall GetDeviceType(void);
	int __fastcall GetFrameSize(void);
	System::AnsiString __fastcall GetIPAddress(void);
	System::AnsiString __fastcall GetIPAddressDNS(void);
	System::AnsiString __fastcall GetIPAddressDNSAlt(void);
	System::AnsiString __fastcall GetIPAddressWINS(void);
	System::AnsiString __fastcall GetIPAddressWINSAlt(void);
	TAHMNetProtocols __fastcall GetNetProtocols(void);
	System::AnsiString __fastcall GetPhoneNumber(void);
	System::AnsiString __fastcall GetScript(void);
	System::AnsiString __fastcall GetX25PadType(void);
	void __fastcall SetAreaCode(const System::AnsiString Value);
	void __fastcall SetAutoDialDLL(const System::AnsiString Value);
	void __fastcall SetAutoDialFunc(const System::AnsiString Value);
	void __fastcall SetConnectionOptions(const TAHMConnectionOptions Value);
	void __fastcall SetCountryCode(const int Value);
	void __fastcall SetCountryID(const int Value);
	void __fastcall SetDeviceName(const System::AnsiString Value);
	void __fastcall SetDeviceType(const System::AnsiString Value);
	void __fastcall SetFrameSize(const int Value);
	void __fastcall SetIPAddress(const System::AnsiString Value);
	void __fastcall SetIPAddressDNS(const System::AnsiString Value);
	void __fastcall SetIPAddressDNSAlt(const System::AnsiString Value);
	void __fastcall SetIPAddressWINS(const System::AnsiString Value);
	void __fastcall SetIPAddressWINSAlt(const System::AnsiString Value);
	void __fastcall SetNetProtocols(const TAHMNetProtocols Value);
	void __fastcall SetPhoneNumber(const System::AnsiString Value);
	void __fastcall SetScript(const System::AnsiString Value);
	void __fastcall SetX25PadType(const System::AnsiString Value);
	System::AnsiString __fastcall GetX25Address(void);
	System::AnsiString __fastcall GetX25Facilities(void);
	System::AnsiString __fastcall GetX25UserData(void);
	void __fastcall SetX25Address(const System::AnsiString Value);
	void __fastcall SetX25Facilities(const System::AnsiString Value);
	void __fastcall SetX25UserData(const System::AnsiString Value);
	TAHMConnectionOptions __fastcall GetConnectionOptions(void);
	bool __fastcall GetInternalEntry(void);
	void __fastcall SetInternalEntry(void);
	
public:
	__fastcall virtual TAHMRASProperties(TAHMRASManager* AOwner);
	__property TAHMRASManager* RasManager = {read=FAHMRASManager};
	
__published:
	__property TAHMConnectionOptions Options = {read=GetConnectionOptions, write=SetConnectionOptions, 
		stored=false, nodefault};
	__property int CountryID = {read=GetCountryID, write=SetCountryID, stored=false, nodefault};
	__property int CountryCode = {read=GetCountryCode, write=SetCountryCode, stored=false, nodefault};
	__property System::AnsiString AreaCode = {read=GetAreaCode, write=SetAreaCode, stored=false};
	__property System::AnsiString PhoneNumber = {read=GetPhoneNumber, write=SetPhoneNumber, stored=false
		};
	__property System::AnsiString IPAddress = {read=GetIPAddress, write=SetIPAddress, stored=false};
	__property System::AnsiString IPAddressDNS = {read=GetIPAddressDNS, write=SetIPAddressDNS, stored=false
		};
	__property System::AnsiString IPAddressDNSAlt = {read=GetIPAddressDNSAlt, write=SetIPAddressDNSAlt, 
		stored=false};
	__property System::AnsiString IPAddressWINS = {read=GetIPAddressWINS, write=SetIPAddressWINS, stored=false
		};
	__property System::AnsiString IPAddressWINSAlt = {read=GetIPAddressWINSAlt, write=SetIPAddressWINSAlt
		, stored=false};
	__property int FrameSize = {read=GetFrameSize, write=SetFrameSize, stored=false, nodefault};
	__property TAHMNetProtocols NetProtocols = {read=GetNetProtocols, write=SetNetProtocols, stored=false
		, nodefault};
	__property System::AnsiString Script = {read=GetScript, write=SetScript, stored=false};
	__property System::AnsiString AutoDialDLL = {read=GetAutoDialDLL, write=SetAutoDialDLL, stored=false
		};
	__property System::AnsiString AutoDialFunc = {read=GetAutoDialFunc, write=SetAutoDialFunc, stored=false
		};
	__property System::AnsiString DeviceType = {read=GetDeviceType, write=SetDeviceType, stored=false};
		
	__property System::AnsiString DeviceName = {read=GetDeviceName, write=SetDeviceName, stored=false};
		
	__property System::AnsiString X25PadType = {read=GetX25PadType, write=SetX25PadType, stored=false};
		
	__property System::AnsiString X25Address = {read=GetX25Address, write=SetX25Address, stored=false};
		
	__property System::AnsiString X25Facilities = {read=GetX25Facilities, write=SetX25Facilities, stored=false
		};
	__property System::AnsiString X25UserData = {read=GetX25UserData, write=SetX25UserData, stored=false
		};
public:
	/* TPersistent.Destroy */ __fastcall virtual ~TAHMRASProperties(void) { }
	
};

//-- var, const, procedure ---------------------------------------------------
#define rasapi32 "rasapi32.dll"
#define RASnp_Netbeui (Byte)(1)
#define RASnp_Ipx (Byte)(2)
#define RASnp_Ip (Byte)(4)
#define UNLEN (Word)(256)
#define PWLEN (Word)(256)
#define CNLEN (Byte)(15)
#define DNLEN (Byte)(15)
#define RASDef_UseCountryAndAreaCodes (Byte)(1)
#define RASDef_SpecificIpAddr (Byte)(2)
#define RASDef_SpecificNameServers (Byte)(4)
#define RASDef_IpHeaderCompression (Byte)(8)
#define RASDef_RemoteDefaultGateway (Byte)(16)
#define RASDef_DisableLcpExtensions (Byte)(32)
#define RASDef_TerminalBeforeDial (Byte)(64)
#define RASDef_TerminalAfterDial (Byte)(128)
#define RASDef_ModemLights (Word)(256)
#define RASDef_SwCompression (Word)(512)
#define RASDef_RequireEncryptedPw (Word)(1024)
#define RASDef_RequireMsEncryptedPw (Word)(2048)
#define RASDef_RequireDataEncryption (Word)(4096)
#define RASDef_NetworkLogon (Word)(8192)
#define RASDef_UseLogonCredentials (Word)(16384)
#define RASDef_PromoteAlternates (int)(32768)
#define RAS_MaxDeviceType (Byte)(16)
#define RAS_MaxPhoneNumber (Byte)(128)
#define RAS_MaxIpAddress (Byte)(15)
#define RAS_MaxIpxAddress (Byte)(21)
#define RAS_MaxEntryName (Word)(256)
#define RAS_MaxDeviceName (Byte)(128)
#define RAS_MaxCallbackNumber (Byte)(128)
#define RAS_MaxAreaCode (Byte)(10)
#define RAS_MaxPadType (Byte)(32)
#define RAS_MaxX25Address (Byte)(200)
#define RAS_MaxFacilities (Byte)(200)
#define RAS_MaxUserData (Byte)(200)
#define RAScsOpenPort (Byte)(0)
#define RAScsPortOpened (Byte)(1)
#define RAScsConnectDevice (Byte)(2)
#define RAScsDeviceConnected (Byte)(3)
#define RAScsAllDevicesConnected (Byte)(4)
#define RAScsAuthenticate (Byte)(5)
#define RAScsAuthNotify (Byte)(6)
#define RAScsAuthRetry (Byte)(7)
#define RAScsAuthCallback (Byte)(8)
#define RAScsAuthChangePassword (Byte)(9)
#define RAScsAuthProject (Byte)(10)
#define RAScsAuthLinkSpeed (Byte)(11)
#define RAScsAuthAck (Byte)(12)
#define RAScsReAuthenticate (Byte)(13)
#define RAScsAuthenticated (Byte)(14)
#define RAScsPrepareForCallback (Byte)(15)
#define RAScsWaitForModemReset (Byte)(16)
#define RAScsWaitForCallback (Byte)(17)
#define RAScsProjected (Byte)(18)
#define RAScsStartAuthentication (Byte)(19)
#define RAScsCallbackComplete (Byte)(20)
#define RAScsLogonNetwork (Byte)(21)
#define RAScsSubEntryConnected (Byte)(22)
#define RAScsSubEntryDisconnected (Byte)(23)
#define RAScsPAUSED (Word)(4096)
#define RAScsInteractive (Word)(4096)
#define RAScsRetryAuthentication (Word)(4097)
#define RAScsCallbackSetByCaller (Word)(4098)
#define RAScsPasswordExpired (Word)(4099)
#define RAScsDone (Word)(8192)
#define RAScsConnected (Word)(8192)
#define RAScsDisconnected (Word)(8193)
#define RASDialEvent "RasDialEvent"
#define WM_RASDialEvent (int)(52429)

}	/* namespace Ahmtrasmanager */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Ahmtrasmanager;
#endif
//-- end unit ----------------------------------------------------------------
#endif	// AHMTRASManager
