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

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

#ifndef AHMTRASManagerHPP
#define AHMTRASManagerHPP

#pragma delphiheader begin
#pragma option push -w-
#include <ExtCtrls.hpp>	// Pascal unit
#include <AHMSystemConst.hpp>	// Pascal unit
#include <AHMSystemClass.hpp>	// Pascal unit
#include <Dialogs.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

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

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

typedef unsigned *PHRASConn;

typedef unsigned TRASConnState;

typedef unsigned *PDWord;

typedef BOOL *PBool;

#pragma option push -b-
enum TAHMWinVer { v400, v401, v500 };
#pragma option pop

#pragma pack(push, 1)
struct TRASDialParams
{
	unsigned dwSize;
	char szEntryName[257];
	char szPhoneNumber[129];
	char szCallbackNumber[129];
	char szUserName[257];
	char szPassword[257];
	char szDomain[16];
	union
	{
		struct 
		{
			unsigned dwSubEntry;
			unsigned dwCallbackId;
			char szPadding2[3];
			
		};
		struct 
		{
			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;

#pragma pack(push, 4)
struct TRasEntry
{
	unsigned dwSize;
	unsigned Options;
	unsigned dwCountryID;
	unsigned dwCountryCode;
	char szAreaCode[11];
	char pLocalPhoneNumber[129];
	unsigned AlternatesOffset;
	TRasIPAddr IPAddr;
	TRasIPAddr IPAddrDns;
	TRasIPAddr IPAddrDnsAlt;
	TRasIPAddr IPAddrWins;
	TRasIPAddr IPAddrWinsAlt;
	unsigned dwFrameSize;
	unsigned dwNetProtocols;
	unsigned 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];
	unsigned dwChannels;
	unsigned Reserved1;
	unsigned Reserved2;
	union
	{
		struct 
		{
			unsigned dw5SubEntries;
			unsigned dw5DialMode;
			unsigned dw5DialExtraPercent;
			unsigned dw5DialExtraSampleSeconds;
			unsigned dw5HangUpExtraPercent;
			unsigned dw5HangUpExtraSampleSeconds;
			unsigned dw5IdleDisconnectSeconds;
			char szPortName[129];
			
		};
		struct 
		{
			unsigned dw4SubEntries;
			unsigned dw4DialMode;
			unsigned dw4DialExtraPercent;
			unsigned dw4DialExtraSampleSeconds;
			unsigned dw4HangUpExtraPercent;
			unsigned dw4HangUpExtraSampleSeconds;
			unsigned dw4IdleDisconnectSeconds;
			
		};
		
	};
} ;
#pragma pack(pop)

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

typedef TRASDialExtensions *PRASDialExtensions;

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

typedef TRASConnStatus *PRASConnStatus;

#pragma pack(push, 1)
struct TRASConn
{
	unsigned dwSize;
	unsigned 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
{
	unsigned dwSize;
	char szEntryName[257];
	char szPadding[3];
} ;
#pragma pack(pop)

typedef TRASEntryName *PRASEntryName;

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

typedef TFNRasDial *PFNRasDial;

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

typedef TFNRasGetErrorString *PFNRasGetErrorString;

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

typedef TFNRasHangUp *PFNRasHangUp;

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

typedef TFNRasGetConnectStatus *PFNRasGetConnectStatus;

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

typedef TFNRasEnumConnections *PFNRasEnumConnections;

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

typedef TFNRasEnumEntries *PFNRasEnumEntries;

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

typedef TFNRasGetEntryDialParams *PFNRasGetEntryDialParams;

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

typedef TFNRasEditPhoneBookEntry *PFNRasEditPhoneBookEntry;

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

typedef TFNRasCreatePhonebookEntry *PFNRasCreatePhonebookEntry;

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

typedef TFNRasGetEntryProperties *PFNRasGetEntryProperties;

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

typedef TFNRasSetEntryProperties *PFNRasSetEntryProperties;

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

typedef TFNRasDeleteEntry *PFNRasDeleteEntry;

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

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

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

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

typedef void __fastcall (__closure *TAHMOnRasError)(System::TObject* Sender, AnsiString RasMessage, 
	unsigned 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, unsigned Status);

class DELPHICLASS TAHMRasTimerThread;
class DELPHICLASS TAHMRASTimer;
#pragma pack(push, 4)
class PASCALIMPLEMENTATION TAHMRASTimer : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	bool FEnabled;
	Word FInterval;
	Classes::TNotifyEvent FOnTimer;
	TAHMRasTimerThread* FTimerThread;
	Classes::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
		};
};

#pragma pack(pop)

#pragma pack(push, 4)
class PASCALIMPLEMENTATION TAHMRasTimerThread : public Classes::TThread 
{
	typedef Classes::TThread inherited;
	
public:
	TAHMRASTimer* OwnerTimer;
	virtual void __fastcall Execute(void);
	void __fastcall DoTimer(void);
public:
	#pragma option push -w-inl
	/* TThread.Create */ inline __fastcall TAHMRasTimerThread(bool CreateSuspended) : Classes::TThread(
		CreateSuspended) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TThread.Destroy */ inline __fastcall virtual ~TAHMRasTimerThread(void) { }
	#pragma option pop
	
};

#pragma pack(pop)

#pragma option push -b-
enum TAHMConnectionOptionFlags { coUseCountryAndAreaCodes, coSpecificIpAddr, coSpecificNameServers, 
	coIpHeaderCompression, coRemoteDefaultGateway, coDisableLcpExtensions, coTerminalBeforeDial, coTerminalAfterDial, 
	coModemLights, coSwCompression, coRequireEncryptedPw, coRequireMsEncryptedPw, coRequireDataEncryption, 
	coNetworkLogon, coUseLogonCredentials, coPromoteAlternates, coSecureLocalFiles };
#pragma option pop

typedef Set<TAHMConnectionOptionFlags, coUseCountryAndAreaCodes, coSecureLocalFiles>  TAHMConnectionOptions
	;

#pragma option push -b-
enum TAHMNetProtocolsFlags { npIPX, npTCPIP, npNETBEUI };
#pragma option pop

typedef Set<TAHMNetProtocolsFlags, npIPX, npNETBEUI>  TAHMNetProtocols;

#pragma option push -b-
enum TAHMFramingProtocolsFlags { fpPPP, fpSLIP, fpRAS };
#pragma option pop

typedef Set<TAHMFramingProtocolsFlags, fpPPP, fpRAS>  TAHMFramingProtocols;

class DELPHICLASS TAHMRASProperties;
class DELPHICLASS TAHMRASManager;
#pragma pack(push, 4)
class PASCALIMPLEMENTATION TAHMRASManager : public Ahmsystemclass::TAHMSystemsComponent 
{
	typedef Ahmsystemclass::TAHMSystemsComponent inherited;
	
private:
	AnsiString FLastError;
	Classes::TStrings* FConnections;
	Classes::TNotifyEvent FOnUpdate;
	AnsiString FConnection;
	TAHMOnChangeConnection FOnChangeConnection;
	AnsiString FUserName;
	AnsiString FPassword;
	AnsiString FNumber;
	unsigned IntHRASConn;
	unsigned 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;
	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;
	AnsiString FPhoneBook;
	TAHMOnRasDelAfter FAfterDeleteEntry;
	TAHMOnRasDelBefore FBeforeDeleteEntry;
	AnsiString FConnectedOn;
	TAHMOnConnectionExists FOnExternalConnect;
	void __fastcall OnRasTimer(System::TObject* Sender);
	void __fastcall SetConnections(const Classes::TStrings* Value);
	void __fastcall SetConnection(const AnsiString Value);
	void __fastcall SetPassword(const AnsiString Value);
	void __fastcall SetUsername(const 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 AnsiString Value);
	bool __fastcall GetInstalled(void);
	void __fastcall Setinstalled(const bool Value);
	void __fastcall SetPhonebook(const AnsiString Value);
	bool __fastcall SetError(const unsigned 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(AnsiString Entry);
	bool __fastcall CreateEntry(void);
	bool __fastcall DeleteEntry(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 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 AnsiString ConnectedOn = {read=FConnectedOn};
	
__published:
	__property AnsiString Phonebook = {read=FPhoneBook, write=SetPhonebook, stored=false};
	__property 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 AnsiString UserName = {read=FUserName, write=SetUsername, stored=false};
	__property AnsiString Password = {read=FPassword, write=SetPassword, stored=false};
	__property 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};
};

#pragma pack(pop)

#pragma pack(push, 4)
class PASCALIMPLEMENTATION TAHMRASProperties : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	TAHMRASManager* FAHMRASManager;
	TRasEntry InternalEntry;
	AnsiString __fastcall GetAreaCode();
	AnsiString __fastcall GetAutoDialDLL();
	AnsiString __fastcall GetAutoDialFunc();
	unsigned __fastcall GetCountryCode(void);
	unsigned __fastcall GetCountryID(void);
	AnsiString __fastcall GetDeviceName();
	AnsiString __fastcall GetDeviceType();
	unsigned __fastcall GetFrameSize(void);
	AnsiString __fastcall GetIPAddress();
	AnsiString __fastcall GetIPAddressDNS();
	AnsiString __fastcall GetIPAddressDNSAlt();
	AnsiString __fastcall GetIPAddressWINS();
	AnsiString __fastcall GetIPAddressWINSAlt();
	TAHMNetProtocols __fastcall GetNetProtocols(void);
	AnsiString __fastcall GetPhoneNumber();
	AnsiString __fastcall GetScript();
	AnsiString __fastcall GetX25PadType();
	void __fastcall SetAreaCode(const AnsiString Value);
	void __fastcall SetAutoDialDLL(const AnsiString Value);
	void __fastcall SetAutoDialFunc(const AnsiString Value);
	void __fastcall SetConnectionOptions(const TAHMConnectionOptions Value);
	void __fastcall SetCountryCode(const unsigned Value);
	void __fastcall SetCountryID(const unsigned Value);
	void __fastcall SetDeviceName(const AnsiString Value);
	void __fastcall SetDeviceType(const AnsiString Value);
	void __fastcall SetFrameSize(const unsigned Value);
	void __fastcall SetIPAddress(const AnsiString Value);
	void __fastcall SetIPAddressDNS(const AnsiString Value);
	void __fastcall SetIPAddressDNSAlt(const AnsiString Value);
	void __fastcall SetIPAddressWINS(const AnsiString Value);
	void __fastcall SetIPAddressWINSAlt(const AnsiString Value);
	void __fastcall SetNetProtocols(const TAHMNetProtocols Value);
	void __fastcall SetPhoneNumber(const AnsiString Value);
	void __fastcall SetScript(const AnsiString Value);
	void __fastcall SetX25PadType(const AnsiString Value);
	AnsiString __fastcall GetX25Address();
	AnsiString __fastcall GetX25Facilities();
	AnsiString __fastcall GetX25UserData();
	void __fastcall SetX25Address(const AnsiString Value);
	void __fastcall SetX25Facilities(const AnsiString Value);
	void __fastcall SetX25UserData(const 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 unsigned CountryID = {read=GetCountryID, write=SetCountryID, stored=false, nodefault};
	__property unsigned CountryCode = {read=GetCountryCode, write=SetCountryCode, stored=false, nodefault
		};
	__property AnsiString AreaCode = {read=GetAreaCode, write=SetAreaCode, stored=false};
	__property AnsiString PhoneNumber = {read=GetPhoneNumber, write=SetPhoneNumber, stored=false};
	__property AnsiString IPAddress = {read=GetIPAddress, write=SetIPAddress, stored=false};
	__property AnsiString IPAddressDNS = {read=GetIPAddressDNS, write=SetIPAddressDNS, stored=false};
	__property AnsiString IPAddressDNSAlt = {read=GetIPAddressDNSAlt, write=SetIPAddressDNSAlt, stored=false
		};
	__property AnsiString IPAddressWINS = {read=GetIPAddressWINS, write=SetIPAddressWINS, stored=false}
		;
	__property AnsiString IPAddressWINSAlt = {read=GetIPAddressWINSAlt, write=SetIPAddressWINSAlt, stored=false
		};
	__property unsigned FrameSize = {read=GetFrameSize, write=SetFrameSize, stored=false, nodefault};
	__property TAHMNetProtocols NetProtocols = {read=GetNetProtocols, write=SetNetProtocols, stored=false
		, nodefault};
	__property AnsiString Script = {read=GetScript, write=SetScript, stored=false};
	__property AnsiString AutoDialDLL = {read=GetAutoDialDLL, write=SetAutoDialDLL, stored=false};
	__property AnsiString AutoDialFunc = {read=GetAutoDialFunc, write=SetAutoDialFunc, stored=false};
	__property AnsiString DeviceType = {read=GetDeviceType, write=SetDeviceType, stored=false};
	__property AnsiString DeviceName = {read=GetDeviceName, write=SetDeviceName, stored=false};
	__property AnsiString X25PadType = {read=GetX25PadType, write=SetX25PadType, stored=false};
	__property AnsiString X25Address = {read=GetX25Address, write=SetX25Address, stored=false};
	__property AnsiString X25Facilities = {read=GetX25Facilities, write=SetX25Facilities, stored=false}
		;
	__property AnsiString X25UserData = {read=GetX25UserData, write=SetX25UserData, stored=false};
public:
		
	#pragma option push -w-inl
	/* TPersistent.Destroy */ inline __fastcall virtual ~TAHMRASProperties(void) { }
	#pragma option pop
	
};

#pragma pack(pop)

//-- var, const, procedure ---------------------------------------------------
#define rasapi32 "rasapi32.dll"
static const Shortint RASnp_Netbeui = 0x1;
static const Shortint RASnp_Ipx = 0x2;
static const Shortint RASnp_Ip = 0x4;
static const Word UNLEN = 0x100;
static const Word PWLEN = 0x100;
static const Shortint CNLEN = 0xf;
static const Shortint DNLEN = 0xf;
static const Shortint RASDef_UseCountryAndAreaCodes = 0x1;
static const Shortint RASDef_SpecificIpAddr = 0x2;
static const Shortint RASDef_SpecificNameServers = 0x4;
static const Shortint RASDef_IpHeaderCompression = 0x8;
static const Shortint RASDef_RemoteDefaultGateway = 0x10;
static const Shortint RASDef_DisableLcpExtensions = 0x20;
static const Shortint RASDef_TerminalBeforeDial = 0x40;
static const Byte RASDef_TerminalAfterDial = 0x80;
static const Word RASDef_ModemLights = 0x100;
static const Word RASDef_SwCompression = 0x200;
static const Word RASDef_RequireEncryptedPw = 0x400;
static const Word RASDef_RequireMsEncryptedPw = 0x800;
static const Word RASDef_RequireDataEncryption = 0x1000;
static const Word RASDef_NetworkLogon = 0x2000;
static const Word RASDef_UseLogonCredentials = 0x4000;
static const Word RASDef_PromoteAlternates = 0x8000;
static const Shortint RAS_MaxDeviceType = 0x10;
static const Byte RAS_MaxPhoneNumber = 0x80;
static const Shortint RAS_MaxIpAddress = 0xf;
static const Shortint RAS_MaxIpxAddress = 0x15;
static const Word RAS_MaxEntryName = 0x100;
static const Byte RAS_MaxDeviceName = 0x80;
static const Byte RAS_MaxCallbackNumber = 0x80;
static const Shortint RAS_MaxAreaCode = 0xa;
static const Shortint RAS_MaxPadType = 0x20;
static const Byte RAS_MaxX25Address = 0xc8;
static const Byte RAS_MaxFacilities = 0xc8;
static const Byte RAS_MaxUserData = 0xc8;
static const Shortint RAScsOpenPort = 0x0;
static const Shortint RAScsPortOpened = 0x1;
static const Shortint RAScsConnectDevice = 0x2;
static const Shortint RAScsDeviceConnected = 0x3;
static const Shortint RAScsAllDevicesConnected = 0x4;
static const Shortint RAScsAuthenticate = 0x5;
static const Shortint RAScsAuthNotify = 0x6;
static const Shortint RAScsAuthRetry = 0x7;
static const Shortint RAScsAuthCallback = 0x8;
static const Shortint RAScsAuthChangePassword = 0x9;
static const Shortint RAScsAuthProject = 0xa;
static const Shortint RAScsAuthLinkSpeed = 0xb;
static const Shortint RAScsAuthAck = 0xc;
static const Shortint RAScsReAuthenticate = 0xd;
static const Shortint RAScsAuthenticated = 0xe;
static const Shortint RAScsPrepareForCallback = 0xf;
static const Shortint RAScsWaitForModemReset = 0x10;
static const Shortint RAScsWaitForCallback = 0x11;
static const Shortint RAScsProjected = 0x12;
static const Shortint RAScsStartAuthentication = 0x13;
static const Shortint RAScsCallbackComplete = 0x14;
static const Shortint RAScsLogonNetwork = 0x15;
static const Shortint RAScsSubEntryConnected = 0x16;
static const Shortint RAScsSubEntryDisconnected = 0x17;
static const Word RAScsPAUSED = 0x1000;
static const Word RAScsInteractive = 0x1000;
static const Word RAScsRetryAuthentication = 0x1001;
static const Word RAScsCallbackSetByCaller = 0x1002;
static const Word RAScsPasswordExpired = 0x1003;
static const Word RAScsDone = 0x2000;
static const Word RAScsConnected = 0x2000;
static const Word RAScsDisconnected = 0x2001;
#define RASDialEvent "RasDialEvent"
static const Word WM_RASDialEvent = 0xcccd;

}	/* namespace Ahmtrasmanager */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Ahmtrasmanager;
#endif
#pragma option pop	// -w-

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// AHMTRASManager
