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

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

#ifndef DialUpHPP
#define DialUpHPP
#include <Messages.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <Classes.hpp>
#include <Dialogs.hpp>
#include <Windows.hpp>
#include <SysUtils.hpp>
#include <SysInit.hpp>
#include <System.hpp>

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

namespace Dialup
{
//-- type declarations -------------------------------------------------------
typedef int *LPHRasConn;

typedef int THRasConn;

struct TRasConnW;
typedef TRasConnW *LPRasConnW;

struct TRasConnW
{
	int dwSize;
	int hrasconn;
	wchar_t szEntryName[257];
	wchar_t szDeviceType[17];
	wchar_t szDeviceName[129];
} ;

struct TRasConnA;
typedef TRasConnA *LPRasConnA;

struct TRasConnA
{
	int dwSize;
	int hrasconn;
	char szEntryName[257];
	char szDeviceType[17];
	char szDeviceName[129];
} ;

typedef TRasConnA *LPRasConn;

typedef TRasConnA  TRasConn;

typedef int *LPRasConnState;

typedef int TRasConnState;

struct TRasConnStatusW;
typedef TRasConnStatusW *LPRasConnStatusW;

struct TRasConnStatusW
{
	int dwSize;
	int rasconnstate;
	int dwError;
	wchar_t szDeviceType[17];
	wchar_t szDeviceName[129];
} ;

struct TRasConnStatusA;
typedef TRasConnStatusA *LPRasConnStatusA;

struct TRasConnStatusA
{
	int dwSize;
	int rasconnstate;
	int dwError;
	char szDeviceType[17];
	char szDeviceName[129];
} ;

typedef TRasConnStatusA *LPRasConnStatus;

typedef TRasConnStatusA  TRasConnStatus;

struct TRasDialParamsW;
typedef TRasDialParamsW *LPRasDialParamsW;

struct TRasDialParamsW
{
	int dwSize;
	wchar_t szEntryName[257];
	wchar_t szPhoneNumber[129];
	wchar_t szCallbackNumber[129];
	wchar_t szUserName[257];
	wchar_t szPassword[257];
	wchar_t szDomain[16];
} ;

struct TRasDialParamsA;
typedef TRasDialParamsA *LPRasDialParamsA;

struct TRasDialParamsA
{
	int dwSize;
	char szEntryName[257];
	char szPhoneNumber[129];
	char szCallbackNumber[129];
	char szUserName[257];
	char szPassword[257];
	char szDomain[16];
} ;

typedef TRasDialParamsA *LPRasDialParams;

typedef TRasDialParamsA  TRasDialParams;

struct TRasDialExtensions;
typedef TRasDialExtensions *LPRasDialExtensions;

struct TRasDialExtensions
{
	int dwSize;
	int dwfOptions;
	HWND hwndParent;
	int reserved;
} ;

struct TRasEntryNameW;
typedef TRasEntryNameW *LPRasEntryNameW;

struct TRasEntryNameW
{
	int dwSize;
	wchar_t szEntryName[257];
} ;

struct TRasEntryNameA;
typedef TRasEntryNameA *LPRasEntryNameA;

struct TRasEntryNameA
{
	int dwSize;
	char szEntryName[257];
} ;

typedef TRasEntryNameA *LPRasEntryName;

typedef TRasEntryNameA  TRasEntryName;

typedef int *LPRasProjection;

typedef int TRasProjection;

struct TRasAmbW;
typedef TRasAmbW *LPRasAmbW;

struct TRasAmbW
{
	int dwSize;
	int dwError;
	wchar_t szNetBiosError[17];
	Byte bLana;
} ;

struct TRasAmbA;
typedef TRasAmbA *LPRasAmbA;

struct TRasAmbA
{
	int dwSize;
	int dwError;
	char szNetBiosError[17];
	Byte bLana;
} ;

typedef TRasAmbA *LPRasAmb;

typedef TRasAmbA  TRasAmb;

struct TRasPppNbfW;
typedef TRasPppNbfW *LPRasPppNbfW;

struct TRasPppNbfW
{
	int dwSize;
	int dwError;
	int dwNetBiosError;
	wchar_t szNetBiosError[17];
	wchar_t szWorkstationName[17];
	Byte bLana;
} ;

struct TRasPppNbfA;
typedef TRasPppNbfA *LPRasPppNbfA;

struct TRasPppNbfA
{
	int dwSize;
	int dwError;
	int dwNetBiosError;
	char szNetBiosError[17];
	char szWorkstationName[17];
	Byte bLana;
} ;

typedef TRasPppNbfA *LpRaspppNbf;

typedef TRasPppNbfA  TRasPppNbf;

struct TRasPppIpxW;
typedef TRasPppIpxW *LPRasPppIpxW;

struct TRasPppIpxW
{
	int dwSize;
	int dwError;
	wchar_t szIpxAddress[22];
} ;

struct TRasPppIpxA;
typedef TRasPppIpxA *LPRasPppIpxA;

struct TRasPppIpxA
{
	int dwSize;
	int dwError;
	char szIpxAddress[22];
} ;

typedef TRasPppIpxA *LPRasPppIpx;

typedef TRasPppIpxA  TRasPppIpx;

struct TRasPppIpW;
typedef TRasPppIpW *LPRasPppIpW;

struct TRasPppIpW
{
	int dwSize;
	int dwError;
	wchar_t szIpAddress[16];
	wchar_t szServerIpAddress[16];
} ;

struct TRasPppIpA;
typedef TRasPppIpA *LPRasPppIpA;

struct TRasPppIpA
{
	int dwSize;
	int dwError;
	char szIpAddress[16];
	char szServerIpAddress[16];
} ;

typedef TRasPppIpA *LPRasPppIp;

typedef TRasPppIpA  TRasPppIp;

struct TRasIPAddr;
typedef TRasIPAddr *LPRasIPAddr;

#pragma pack(push, 1)
struct TRasIPAddr
{
	Byte A;
	Byte B;
	Byte C;
	Byte D;
} ;
#pragma pack(pop)

struct TRasEntryA;
typedef TRasEntryA *LPRasEntryA;

struct TRasEntryA
{
	int dwSize;
	int dwfOptions;
	int dwCountryID;
	int dwCountryCode;
	char szAreaCode[11];
	char szLocalPhoneNumber[129];
	int dwAlternatesOffset;
	TRasIPAddr ipaddr;
	TRasIPAddr ipaddrDns;
	TRasIPAddr ipaddrDnsAlt;
	TRasIPAddr ipaddrWins;
	TRasIPAddr ipaddrWinsAlt;
	int dwFrameSize;
	int dwfNetProtocols;
	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 dwReserved1;
	int dwReserved2;
} ;

struct TRasEntryW;
typedef TRasEntryW *LPRasEntryW;

struct TRasEntryW
{
	int dwSize;
	int dwfOptions;
	int dwCountryID;
	int dwCountryCode;
	wchar_t szAreaCode[11];
	wchar_t szLocalPhoneNumber[129];
	int dwAlternatesOffset;
	TRasIPAddr ipaddr;
	TRasIPAddr ipaddrDns;
	TRasIPAddr ipaddrDnsAlt;
	TRasIPAddr ipaddrWins;
	TRasIPAddr ipaddrWinsAlt;
	int dwFrameSize;
	int dwfNetProtocols;
	int dwFramingProtocol;
	wchar_t szScript[260];
	wchar_t szAutodialDll[260];
	wchar_t szAutodialFunc[260];
	wchar_t szDeviceType[17];
	wchar_t szDeviceName[129];
	wchar_t szX25PadType[33];
	wchar_t szX25Address[201];
	wchar_t szX25Facilities[201];
	wchar_t szX25UserData[201];
	int dwChannels;
	int dwReserved1;
	int dwReserved2;
} ;

typedef TRasEntryA *LPRasEntry;

typedef TRasEntryA  TRasEntry;

struct TRasCtryInfo
{
	int dwSize;
	int dwCountryID;
	int dwNextCountryID;
	int dwCountryCode;
	int dwCountryNameOffset;
} ;

typedef TRasCtryInfo *LPRasCtryInfo;

struct TRasDevInfoA;
typedef TRasDevInfoA *LPRasDevInfoA;

struct TRasDevInfoA
{
	int dwSize;
	char szDeviceType[17];
	char szDeviceName[129];
} ;

struct TRasDevInfoW;
typedef TRasDevInfoW *LPRasDevInfoW;

struct TRasDevInfoW
{
	int dwSize;
	wchar_t szDeviceType[17];
	wchar_t szDeviceName[129];
} ;

typedef TRasDevInfoA *LPRasDevInfo;

typedef TRasDevInfoA  TRasDevInfo;

typedef void __fastcall (__closure *TOnEntryGet)(System::TObject* Sender, System::AnsiString EntryName
	);

typedef void __fastcall (__closure *TStandartEv)(System::TObject* Sender);

typedef void __fastcall (__closure *TOnNotConn)(System::TObject* Sender, int ErrorCode, System::AnsiString 
	ErrorMessage);

typedef void __fastcall (__closure *TOnAsyncEvent)(System::TObject* Sender, int State, int Error, System::AnsiString 
	MessageText);

typedef void __fastcall (__closure *TOnError)(System::TObject* Sender, int ErrorCode, System::AnsiString 
	ErrorMessage);

typedef void __fastcall (__closure *TOnActiveConn)(System::TObject* Sender, int Handle, const TRasConnStatusA 
	&Status, System::AnsiString StatusString, System::AnsiString EntryName, System::AnsiString DeviceType
	, System::AnsiString DeviceName);

enum TDialMode { dmAsync, dmSync };

enum TLanguage { English, Czech };

class DELPHICLASS TDialUp;
class PASCALIMPLEMENTATION TDialUp : public Classes::TComponent 
{
	typedef Classes::TComponent inherited;
	
private:
	Classes::TStringList* FEntries;
	TDialMode FDialMode;
	System::AnsiString FEntry2Dial;
	TLanguage FLanguage;
	Extctrls::TTimer* FTimer;
	TOnEntryGet FOnEntryGet;
	TStandartEv FOnDialing;
	TStandartEv FOnConnected;
	TOnNotConn FOnNotConnected;
	TOnAsyncEvent FOnAsyncEvent;
	TOnError FOnError;
	TOnActiveConn FOnActiveConn;
	
protected:
	virtual void __fastcall Timer(System::TObject* Sender);
	
public:
	int hRAS;
	bool AsyncStatus;
	int AMsg;
	int AError;
	int AState;
	__fastcall virtual TDialUp(Classes::TComponent* AOwner);
	__fastcall virtual ~TDialUp(void);
	int __fastcall Dial(void);
	int __fastcall GetEntries(void);
	int __fastcall GetConnections(void);
	int __fastcall HangUp(void);
	int __fastcall HangUpConn(int Handle);
	int __fastcall CreateEntry(void);
	int __fastcall EditEntry(void);
	int __fastcall DeleteEntry(void);
	int __fastcall RenameEntryTo(System::AnsiString S);
	int __fastcall SetEntryUserName(System::AnsiString Value);
	int __fastcall SetEntryPassword(System::AnsiString Value);
	int __fastcall RemovePassword(void);
	int __fastcall GetEntryUserName(System::AnsiString &Value);
	int __fastcall GetEntryPassword(System::AnsiString &Value);
	System::AnsiString __fastcall StatusString(int State, int Error);
	System::AnsiString __fastcall StatusStringCZ(int State, int Error);
	
__published:
	__property Name ;
	__property Tag ;
	__property TDialMode DialMode = {read=FDialMode, write=FDialMode, nodefault};
	__property Classes::TStringList* Entries = {read=FEntries};
	__property System::AnsiString Entry = {read=FEntry2Dial, write=FEntry2Dial};
	__property TLanguage Language = {read=FLanguage, write=FLanguage, nodefault};
	__property TOnEntryGet OnEntryGet = {read=FOnEntryGet, write=FOnEntryGet};
	__property TStandartEv OnDialing = {read=FOnDialing, write=FOnDialing};
	__property TStandartEv OnConnect = {read=FOnConnected, write=FOnConnected};
	__property TOnNotConn OnNotConnected = {read=FOnNotConnected, write=FOnNotConnected};
	__property TOnAsyncEvent OnAsyncEvent = {read=FOnAsyncEvent, write=FOnAsyncEvent};
	__property TOnError OnError = {read=FOnError, write=FOnError};
	__property TOnActiveConn OnActiveConnection = {read=FOnActiveConn, write=FOnActiveConn};
};

//-- var, const, procedure ---------------------------------------------------
#define DNLEN (Byte)(15)
#define UNLEN (Word)(256)
#define PWLEN (Word)(256)
#define NETBIOS_NAME_LEN (Byte)(16)
#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 RASCS_PAUSED (Word)(4096)
#define RASCS_DONE (Word)(8192)
#define RASCS_OpenPort (Byte)(0)
#define RASCS_PortOpened (Byte)(1)
#define RASCS_ConnectDevice (Byte)(2)
#define RASCS_DeviceConnected (Byte)(3)
#define RASCS_AllDevicesConnected (Byte)(4)
#define RASCS_Authenticate (Byte)(5)
#define RASCS_AuthNotify (Byte)(6)
#define RASCS_AuthRetry (Byte)(7)
#define RASCS_AuthCallback (Byte)(8)
#define RASCS_AuthChangePassword (Byte)(9)
#define RASCS_AuthProject (Byte)(10)
#define RASCS_AuthLinkSpeed (Byte)(11)
#define RASCS_AuthAck (Byte)(12)
#define RASCS_ReAuthenticate (Byte)(13)
#define RASCS_Authenticated (Byte)(14)
#define RASCS_PrepareForCallback (Byte)(15)
#define RASCS_WaitForModemReset (Byte)(16)
#define RASCS_WaitForCallback (Byte)(17)
#define RASCS_Projected (Byte)(18)
#define RASCS_StartAuthentication (Byte)(19)
#define RASCS_CallbackComplete (Byte)(20)
#define RASCS_LogonNetwork (Byte)(21)
#define RASCS_Interactive (Word)(4096)
#define RASCS_RetryAuthentication (Word)(4097)
#define RASCS_CallbackSetByCaller (Word)(4098)
#define RASCS_PasswordExpired (Word)(4099)
#define RASCS_Connected (Word)(8192)
#define RASCS_Disconnected (Word)(8193)
#define RDEOPT_UsePrefixSuffix (Byte)(1)
#define RDEOPT_PausedStates (Byte)(2)
#define RDEOPT_IgnoreModemSpeaker (Byte)(4)
#define RDEOPT_SetModemSpeaker (Byte)(8)
#define RDEOPT_IgnoreSoftwareCompression (Byte)(16)
#define RDEOPT_SetSoftwareCompression (Byte)(32)
#define RASP_Amb (int)(65536)
#define RASP_PppNbf (int)(32831)
#define RASP_PppIpx (int)(32811)
#define RASP_PppIp (int)(32801)
#define RASDIALEVENT "RasDialEvent"
#define WM_RASDIALEVENT (int)(52429)
#define RASBASE (Word)(600)
#define SUCCESS (Byte)(0)
#define PENDING (Word)(600)
#define ERROR_INVALID_PORT_HANDLE (Word)(601)
#define ERROR_PORT_ALREADY_OPEN (Word)(602)
#define ERROR_BUFFER_TOO_SMALL (Word)(603)
#define ERROR_WRONG_INFO_SPECIFIED (Word)(604)
#define ERROR_CANNOT_SET_PORT_INFO (Word)(605)
#define ERROR_PORT_NOT_CONNECTED (Word)(606)
#define ERROR_EVENT_INVALID (Word)(607)
#define ERROR_DEVICE_DOES_NOT_EXIST (Word)(608)
#define ERROR_DEVICETYPE_DOES_NOT_EXIST (Word)(609)
#define ERROR_BUFFER_INVALID (Word)(610)
#define ERROR_ROUTE_NOT_AVAILABLE (Word)(611)
#define ERROR_ROUTE_NOT_ALLOCATED (Word)(612)
#define ERROR_INVALID_COMPRESSION_SPECIFIED (Word)(613)
#define ERROR_OUT_OF_BUFFERS (Word)(614)
#define ERROR_PORT_NOT_FOUND (Word)(615)
#define ERROR_ASYNC_REQUEST_PENDING (Word)(616)
#define ERROR_ALREADY_DISCONNECTING (Word)(617)
#define ERROR_PORT_NOT_OPEN (Word)(618)
#define ERROR_PORT_DISCONNECTED (Word)(619)
#define ERROR_NO_ENDPOINTS (Word)(620)
#define ERROR_CANNOT_OPEN_PHONEBOOK (Word)(621)
#define ERROR_CANNOT_LOAD_PHONEBOOK (Word)(622)
#define ERROR_CANNOT_FIND_PHONEBOOK_ENTRY (Word)(623)
#define ERROR_CANNOT_WRITE_PHONEBOOK (Word)(624)
#define ERROR_CORRUPT_PHONEBOOK (Word)(625)
#define ERROR_CANNOT_LOAD_STRING (Word)(626)
#define ERROR_KEY_NOT_FOUND (Word)(627)
#define ERROR_DISCONNECTION (Word)(628)
#define ERROR_REMOTE_DISCONNECTION (Word)(629)
#define ERROR_HARDWARE_FAILURE (Word)(630)
#define ERROR_USER_DISCONNECTION (Word)(631)
#define ERROR_INVALID_SIZE (Word)(632)
#define ERROR_PORT_NOT_AVAILABLE (Word)(633)
#define ERROR_CANNOT_PROJECT_CLIENT (Word)(634)
#define ERROR_UNKNOWN (Word)(635)
#define ERROR_WRONG_DEVICE_ATTACHED (Word)(636)
#define ERROR_BAD_STRING (Word)(637)
#define ERROR_REQUEST_TIMEOUT (Word)(638)
#define ERROR_CANNOT_GET_LANA (Word)(639)
#define ERROR_NETBIOS_ERROR (Word)(640)
#define ERROR_SERVER_OUT_OF_RESOURCES (Word)(641)
#define ERROR_NAME_EXISTS_ON_NET (Word)(642)
#define ERROR_SERVER_GENERAL_NET_FAILURE (Word)(643)
#define WARNING_MSG_ALIAS_NOT_ADDED (Word)(644)
#define ERROR_AUTH_INTERNAL (Word)(645)
#define ERROR_RESTRICTED_LOGON_HOURS (Word)(646)
#define ERROR_ACCT_DISABLED (Word)(647)
#define ERROR_PASSWD_EXPIRED (Word)(648)
#define ERROR_NO_DIALIN_PERMISSION (Word)(649)
#define ERROR_SERVER_NOT_RESPONDING (Word)(650)
#define ERROR_FROM_DEVICE (Word)(651)
#define ERROR_UNRECOGNIZED_RESPONSE (Word)(652)
#define ERROR_MACRO_NOT_FOUND (Word)(653)
#define ERROR_MACRO_NOT_DEFINED (Word)(654)
#define ERROR_MESSAGE_MACRO_NOT_FOUND (Word)(655)
#define ERROR_DEFAULTOFF_MACRO_NOT_FOUND (Word)(656)
#define ERROR_FILE_COULD_NOT_BE_OPENED (Word)(657)
#define ERROR_DEVICENAME_TOO_LONG (Word)(658)
#define ERROR_DEVICENAME_NOT_FOUND (Word)(659)
#define ERROR_NO_RESPONSES (Word)(660)
#define ERROR_NO_COMMAND_FOUND (Word)(661)
#define ERROR_WRONG_KEY_SPECIFIED (Word)(662)
#define ERROR_UNKNOWN_DEVICE_TYPE (Word)(663)
#define ERROR_ALLOCATING_MEMORY (Word)(664)
#define ERROR_PORT_NOT_CONFIGURED (Word)(665)
#define ERROR_DEVICE_NOT_READY (Word)(666)
#define ERROR_READING_INI_FILE (Word)(667)
#define ERROR_NO_CONNECTION (Word)(668)
#define ERROR_BAD_USAGE_IN_INI_FILE (Word)(669)
#define ERROR_READING_SECTIONNAME (Word)(670)
#define ERROR_READING_DEVICETYPE (Word)(671)
#define ERROR_READING_DEVICENAME (Word)(672)
#define ERROR_READING_USAGE (Word)(673)
#define ERROR_READING_MAXCONNECTBPS (Word)(674)
#define ERROR_READING_MAXCARRIERBPS (Word)(675)
#define ERROR_LINE_BUSY (Word)(676)
#define ERROR_VOICE_ANSWER (Word)(677)
#define ERROR_NO_ANSWER (Word)(678)
#define ERROR_NO_CARRIER (Word)(679)
#define ERROR_NO_DIALTONE (Word)(680)
#define ERROR_IN_COMMAND (Word)(681)
#define ERROR_WRITING_SECTIONNAME (Word)(682)
#define ERROR_WRITING_DEVICETYPE (Word)(683)
#define ERROR_WRITING_DEVICENAME (Word)(684)
#define ERROR_WRITING_MAXCONNECTBPS (Word)(685)
#define ERROR_WRITING_MAXCARRIERBPS (Word)(686)
#define ERROR_WRITING_USAGE (Word)(687)
#define ERROR_WRITING_DEFAULTOFF (Word)(688)
#define ERROR_READING_DEFAULTOFF (Word)(689)
#define ERROR_EMPTY_INI_FILE (Word)(690)
#define ERROR_AUTHENTICATION_FAILURE (Word)(691)
#define ERROR_PORT_OR_DEVICE (Word)(692)
#define ERROR_NOT_BINARY_MACRO (Word)(693)
#define ERROR_DCB_NOT_FOUND (Word)(694)
#define ERROR_STATE_MACHINES_NOT_STARTED (Word)(695)
#define ERROR_STATE_MACHINES_ALREADY_STARTED (Word)(696)
#define ERROR_PARTIAL_RESPONSE_LOOPING (Word)(697)
#define ERROR_UNKNOWN_RESPONSE_KEY (Word)(698)
#define ERROR_RECV_BUF_FULL (Word)(699)
#define ERROR_CMD_TOO_LONG (Word)(700)
#define ERROR_UNSUPPORTED_BPS (Word)(701)
#define ERROR_UNEXPECTED_RESPONSE (Word)(702)
#define ERROR_INTERACTIVE_MODE (Word)(703)
#define ERROR_BAD_CALLBACK_NUMBER (Word)(704)
#define ERROR_INVALID_AUTH_STATE (Word)(705)
#define ERROR_WRITING_INITBPS (Word)(706)
#define ERROR_X25_DIAGNOSTIC (Word)(707)
#define ERROR_ACCT_EXPIRED (Word)(708)
#define ERROR_CHANGING_PASSWORD (Word)(709)
#define ERROR_OVERRUN (Word)(710)
#define ERROR_RASMAN_CANNOT_INITIALIZE (Word)(711)
#define ERROR_BIPLEX_PORT_NOT_AVAILABLE (Word)(712)
#define ERROR_NO_ACTIVE_ISDN_LINES (Word)(713)
#define ERROR_NO_ISDN_CHANNELS_AVAILABLE (Word)(714)
#define ERROR_TOO_MANY_LINE_ERRORS (Word)(715)
#define ERROR_IP_CONFIGURATION (Word)(716)
#define ERROR_NO_IP_ADDRESSES (Word)(717)
#define ERROR_PPP_TIMEOUT (Word)(718)
#define ERROR_PPP_REMOTE_TERMINATED (Word)(719)
#define ERROR_PPP_NO_PROTOCOLS_CONFIGURED (Word)(720)
#define ERROR_PPP_NO_RESPONSE (Word)(721)
#define ERROR_PPP_INVALID_PACKET (Word)(722)
#define ERROR_PHONE_NUMBER_TOO_LONG (Word)(723)
#define ERROR_IPXCP_NO_DIALOUT_CONFIGURED (Word)(724)
#define ERROR_IPXCP_NO_DIALIN_CONFIGURED (Word)(725)
#define ERROR_IPXCP_DIALOUT_ALREADY_ACTIVE (Word)(726)
#define ERROR_ACCESSING_TCPCFGDLL (Word)(727)
#define ERROR_NO_IP_RAS_ADAPTER (Word)(728)
#define ERROR_SLIP_REQUIRES_IP (Word)(729)
#define ERROR_PROJECTION_NOT_COMPLETE (Word)(730)
#define ERROR_PROTOCOL_NOT_CONFIGURED (Word)(731)
#define ERROR_PPP_NOT_CONVERGING (Word)(732)
#define ERROR_PPP_CP_REJECTED (Word)(733)
#define ERROR_PPP_LCP_TERMINATED (Word)(734)
#define ERROR_PPP_REQUIRED_ADDRESS_REJECTED (Word)(735)
#define ERROR_PPP_NCP_TERMINATED (Word)(736)
#define ERROR_PPP_LOOPBACK_DETECTED (Word)(737)
#define ERROR_PPP_NO_ADDRESS_ASSIGNED (Word)(738)
#define ERROR_CANNOT_USE_LOGON_CREDENTIALS (Word)(739)
#define ERROR_TAPI_CONFIGURATION (Word)(740)
#define ERROR_NO_LOCAL_ENCRYPTION (Word)(741)
#define ERROR_NO_REMOTE_ENCRYPTION (Word)(742)
#define ERROR_REMOTE_REQUIRES_ENCRYPTION (Word)(743)
#define ERROR_IPXCP_NET_NUMBER_CONFLICT (Word)(744)
#define ERROR_INVALID_SMM (Word)(745)
#define ERROR_SMM_UNINITIALIZED (Word)(746)
#define ERROR_NO_MAC_FOR_PORT (Word)(747)
#define ERROR_SMM_TIMEOUT (Word)(748)
#define ERROR_BAD_PHONE_NUMBER (Word)(749)
#define ERROR_WRONG_MODULE (Word)(750)
#define RASBASEEND (Word)(750)
#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 RASEO_UseCountryAndAreaCodes (Byte)(1)
#define RASEO_SpecificIpAddr (Byte)(2)
#define RASEO_SpecificNameServers (Byte)(4)
#define RASEO_IpHeaderCompression (Byte)(8)
#define RASEO_RemoteDefaultGateway (Byte)(16)
#define RASEO_DisableLcpExtensions (Byte)(32)
#define RASEO_TerminalBeforeDial (Byte)(64)
#define RASEO_TerminalAfterDial (Byte)(128)
#define RASEO_ModemLights (Word)(256)
#define RASEO_SwCompression (Word)(512)
#define RASEO_RequireEncryptedPw (Word)(1024)
#define RASEO_RequireMsEncryptedPw (Word)(2048)
#define RASEO_RequireDataEncryption (Word)(4096)
#define RASEO_NetworkLogon (Word)(8192)
#define RASEO_UseLogonCredentials (Word)(16384)
#define RASEO_PromoteAlternates (int)(32768)
#define RASNP_Netbeui (Byte)(1)
#define RASNP_Ipx (Byte)(2)
#define RASNP_Ip (Byte)(4)
#define RASFP_Ppp (Byte)(1)
#define RASFP_Slip (Byte)(2)
#define RASFP_Ras (Byte)(4)
#define RASDT_Modem "modem"
#define RASDT_Isdn "isdn"
#define RASDT_X25 "x25"
#define MaxEntries (Byte)(100)
extern PACKAGE void __fastcall Register(void);
extern "C" int __stdcall RasCreatePhonebookEntryA(HWND hwndParentWindow, char * lpszPhoneBook);
extern "C" int __stdcall RasCreatePhonebookEntryW(HWND hwndParentWindow, wchar_t * lpszPhoneBook);
extern "C" int __stdcall RasCreatePhonebookEntry(HWND hwndParentWindow, char * lpszPhoneBook);
extern "C" int __stdcall RasDialA(LPRasDialExtensions lpRasDialExt, char * lpszPhoneBook, TRasDialParamsA 
	&params, int dwNotifierType, void * lpNotifier, int &rasconn);
extern "C" int __stdcall RasDialW(LPRasDialExtensions lpRasDialExt, wchar_t * lpszPhoneBook, TRasDialParamsW 
	&params, int dwNotifierType, void * lpNotifier, int &rasconn);
extern "C" int __stdcall RasDial(LPRasDialExtensions lpRasDialExt, char * lpszPhoneBook, TRasDialParamsA 
	&params, int dwNotifierType, void * lpNotifier, int &rasconn);
extern "C" int __stdcall RasEditPhonebookEntryA(HWND hwndParentWindow, char * lpszPhoneBook, char * 
	lpszEntryName);
extern "C" int __stdcall RasEditPhonebookEntryW(HWND hwndParentWindow, wchar_t * lpszPhoneBook, wchar_t * 
	lpszEntryName);
extern "C" int __stdcall RasEditPhonebookEntry(HWND hwndParentWindow, char * lpszPhoneBook, char * lpszEntryName
	);
extern "C" int __stdcall RasEnumConnectionsA(LPRasConnA RasConnArray, int &lpcb, int &lpcConnections
	);
extern "C" int __stdcall RasEnumConnectionsW(LPRasConnW RasConnArray, int &lpcb, int &lpcConnections
	);
extern "C" int __stdcall RasEnumConnections(LPRasConn RasConnArray, int &lpcb, int &lpcConnections);
	
extern "C" int __stdcall RasEnumEntriesA(char * Reserved, char * lpszPhoneBook, LPRasEntryNameA entrynamesArray
	, int &lpcb, int &lpcEntries);
extern "C" int __stdcall RasEnumEntriesW(wchar_t * reserved, wchar_t * lpszPhoneBook, LPRasEntryNameW 
	entrynamesArray, int &lpcb, int &lpcEntries);
extern "C" int __stdcall RasEnumEntries(char * reserved, char * lpszPhoneBook, LPRasEntryName entrynamesArray
	, int &lpcb, int &lpcEntries);
extern "C" int __stdcall RasGetConnectStatusA(int hConn, TRasConnStatusA &lpStatus);
extern "C" int __stdcall RasGetConnectStatusW(int hConn, TRasConnStatusW &lpStatus);
extern "C" int __stdcall RasGetConnectStatus(int hConn, TRasConnStatusA &lpStatus);
extern "C" int __stdcall RasGetEntryDialParamsA(char * lpszPhoneBook, TRasDialParamsA &lpDialParams, 
	BOOL &lpfPassword);
extern "C" int __stdcall RasGetEntryDialParamsW(wchar_t * lpszPhoneBook, TRasDialParamsW &lpDialParams
	, BOOL &lpfPassword);
extern "C" int __stdcall RasGetEntryDialParams(char * lpszPhoneBook, TRasDialParamsA &lpDialParams, 
	BOOL &lpfPassword);
extern "C" int __stdcall RasGetErrorStringA(int errorValue, char * erroString, int cBufSize);
extern "C" int __stdcall RasGetErrorStringW(int errorValue, wchar_t * erroString, int cBufSize);
extern "C" int __stdcall RasGetErrorString(int errorValue, char * erroString, int cBufSize);
extern "C" int __stdcall RasGetProjectionInfoA(int hConn, int rasproj, void * lpProjection, int &lpcb
	);
extern "C" int __stdcall RasGetProjectionInfoW(int hConn, int rasproj, void * lpProjection, int &lpcb
	);
extern "C" int __stdcall RasGetProjectionInfo(int hConn, int rasproj, void * lpProjection, int &lpcb
	);
extern "C" int __stdcall RasHangUpA(int hConn);
extern "C" int __stdcall RasHangUpW(int hConn);
extern "C" int __stdcall RasHangUp(int hConn);
extern "C" int __stdcall RasSetEntryDialParamsA(char * lpszPhoneBook, TRasDialParamsA &lpDialParams, 
	BOOL fRemovePassword);
extern "C" int __stdcall RasSetEntryDialParamsW(wchar_t * lpszPhoneBook, TRasDialParamsW &lpDialParams
	, BOOL fRemovePassword);
extern "C" int __stdcall RasSetEntryDialParams(char * lpszPhoneBook, TRasDialParamsA &lpDialParams, 
	BOOL fRemovePassword);
extern "C" int __stdcall RasValidateEntryNameA(char * lpszPhonebook, char * szEntry);
extern "C" int __stdcall RasValidateEntryNameW(wchar_t * lpszPhonebook, wchar_t * szEntry);
extern "C" int __stdcall RasRenameEntryA(char * lpszPhonebook, char * szEntryOld, char * szEntryNew)
	;
extern "C" int __stdcall RasRenameEntryW(wchar_t * lpszPhonebook, wchar_t * szEntryOld, wchar_t * szEntryNew
	);
extern "C" int __stdcall RasDeleteEntryA(char * lpszPhonebook, char * szEntry);
extern "C" int __stdcall RasDeleteEntryW(wchar_t * lpszPhonebook, wchar_t * szEntry);
extern "C" int __stdcall RasGetEntryPropertiesA(char * lpszPhonebook, char * szEntry, void * lpbEntry
	, int &lpdwEntrySize, void * lpbDeviceInfo, int &lpdwDeviceInfoSize);
extern "C" int __stdcall RasGetEntryPropertiesW(wchar_t * lpszPhonebook, wchar_t * szEntry, void * lpbEntry
	, int &lpdwEntrySize, void * lpbDeviceInfo, int &lpdwDeviceInfoSize);
extern "C" int __stdcall RasSetEntryPropertiesA(char * lpszPhonebook, char * szEntry, void * lpbEntry
	, int dwEntrySize, void * lpbDeviceInfo, int dwDeviceInfoSize);
extern "C" int __stdcall RasSetEntryPropertiesW(wchar_t * lpszPhonebook, wchar_t * szEntry, void * lpbEntry
	, int dwEntrySize, void * lpbDeviceInfo, int dwDeviceInfoSize);
extern "C" int __stdcall RasGetCountryInfoA(TRasCtryInfo &lpCtryInfo, int &lpdwSize);
extern "C" int __stdcall RasGetCountryInfoW(TRasCtryInfo &lpCtryInfo, int &lpdwSize);
extern "C" int __stdcall RasEnumDevicesA(LPRasDevInfoA lpBuff, int &lpcbSize, int &lpcDevices);
extern "C" int __stdcall RasEnumDevicesW(LPRasDevInfoW lpBuff, int &lpcbSize, int &lpcDevices);
extern PACKAGE int __stdcall RasValidateEntryName(char * lpszPhonebook, char * szEntry);
extern PACKAGE int __stdcall RasRenameEntry(char * lpszPhonebook, char * szEntryOld, char * szEntryNew
	);
extern PACKAGE int __stdcall RasDeleteEntry(char * lpszPhonebook, char * szEntry);
extern PACKAGE int __stdcall RasGetEntryProperties(char * lpszPhonebook, char * szEntry, void * lpbEntry
	, int &lpdwEntrySize, void * lpbDeviceInfo, int &lpdwDeviceInfoSize);
extern PACKAGE int __stdcall RasSetEntryProperties(char * lpszPhonebook, char * szEntry, void * lpbEntry
	, int dwEntrySize, void * lpbDeviceInfo, int dwDeviceInfoSize);
extern PACKAGE int __stdcall RasGetCountryInfo(TRasCtryInfo &lpCtryInfo, int &lpdwSize);
extern PACKAGE int __stdcall RasEnumDevices(LPRasDevInfo lpBuff, int &lpcbSize, int &lpcDevices);

#if defined(UNICODE)
inline int __stdcall RasDial(LPRasDialExtensions lpRasDialExt, char * lpszPhoneBook, TRasDialParamsA 
	&params, int dwNotifierType, void * lpNotifier, int &rasconn)
{
	return RasDialW(lpRasDialExt, lpszPhoneBook, params, dwNotifierType, lpNotifier, rasconn);
}
#else
inline int __stdcall RasDial(LPRasDialExtensions lpRasDialExt, char * lpszPhoneBook, TRasDialParamsA 
	&params, int dwNotifierType, void * lpNotifier, int &rasconn)
{
	return RasDialA(lpRasDialExt, lpszPhoneBook, params, dwNotifierType, lpNotifier, rasconn);
}
#endif


#if defined(UNICODE)
inline int __stdcall RasEnumConnections(LPRasConn RasConnArray, int &lpcb, int &lpcConnections)
{
	return RasEnumConnectionsW(RasConnArray, lpcb, lpcConnections);
}
#else
inline int __stdcall RasEnumConnections(LPRasConn RasConnArray, int &lpcb, int &lpcConnections)
{
	return RasEnumConnectionsA(RasConnArray, lpcb, lpcConnections);
}
#endif


#if defined(UNICODE)
inline int __stdcall RasEnumEntries(char * reserved, char * lpszPhoneBook, LPRasEntryName entrynamesArray
	, int &lpcb, int &lpcEntries)
{
	return RasEnumEntriesW(reserved, lpszPhoneBook, entrynamesArray, lpcb, lpcEntries);
}
#else
inline int __stdcall RasEnumEntries(char * reserved, char * lpszPhoneBook, LPRasEntryName entrynamesArray
	, int &lpcb, int &lpcEntries)
{
	return RasEnumEntriesA(Reserved, lpszPhoneBook, entrynamesArray, lpcb, lpcEntries);
}
#endif


#if defined(UNICODE)
inline int __stdcall RasGetConnectStatus(int hConn, TRasConnStatusA &lpStatus)
{
	return RasGetConnectStatusW(hConn, lpStatus);
}
#else
inline int __stdcall RasGetConnectStatus(int hConn, TRasConnStatusA &lpStatus)
{
	return RasGetConnectStatusA(hConn, lpStatus);
}
#endif


#if defined(UNICODE)
inline int __stdcall RasGetErrorString(int errorValue, char * erroString, int cBufSize)
{
	return RasGetErrorStringW(errorValue, erroString, cBufSize);
}
#else
inline int __stdcall RasGetErrorString(int errorValue, char * erroString, int cBufSize)
{
	return RasGetErrorStringA(errorValue, erroString, cBufSize);
}
#endif


#if defined(UNICODE)
inline int __stdcall RasHangUp(int hConn)
{
	return RasHangUpW(hConn);
}
#else
inline int __stdcall RasHangUp(int hConn)
{
	return RasHangUpA(hConn);
}
#endif


#if defined(UNICODE)
inline int __stdcall RasGetProjectionInfo(int hConn, int rasproj, void * lpProjection, int &lpcb)
{
	return RasGetProjectionInfoW(hConn, rasproj, lpProjection, lpcb);
}
#else
inline int __stdcall RasGetProjectionInfo(int hConn, int rasproj, void * lpProjection, int &lpcb)
{
	return RasGetProjectionInfoA(hConn, rasproj, lpProjection, lpcb);
}
#endif


#if defined(UNICODE)
inline int __stdcall RasCreatePhonebookEntry(HWND hwndParentWindow, char * lpszPhoneBook)
{
	return RasCreatePhonebookEntryW(hwndParentWindow, lpszPhoneBook);
}
#else
inline int __stdcall RasCreatePhonebookEntry(HWND hwndParentWindow, char * lpszPhoneBook)
{
	return RasCreatePhonebookEntryA(hwndParentWindow, lpszPhoneBook);
}
#endif


#if defined(UNICODE)
inline int __stdcall RasEditPhonebookEntry(HWND hwndParentWindow, char * lpszPhoneBook, char * lpszEntryName
	)
{
	return RasEditPhonebookEntryW(hwndParentWindow, lpszPhoneBook, lpszEntryName);
}
#else
inline int __stdcall RasEditPhonebookEntry(HWND hwndParentWindow, char * lpszPhoneBook, char * lpszEntryName
	)
{
	return RasEditPhonebookEntryA(hwndParentWindow, lpszPhoneBook, lpszEntryName);
}
#endif


#if defined(UNICODE)
inline int __stdcall RasSetEntryDialParams(char * lpszPhoneBook, TRasDialParamsA &lpDialParams, BOOL 
	fRemovePassword)
{
	return RasSetEntryDialParamsW(lpszPhoneBook, lpDialParams, fRemovePassword);
}
#else
inline int __stdcall RasSetEntryDialParams(char * lpszPhoneBook, TRasDialParamsA &lpDialParams, BOOL 
	fRemovePassword)
{
	return RasSetEntryDialParamsA(lpszPhoneBook, lpDialParams, fRemovePassword);
}
#endif


#if defined(UNICODE)
inline int __stdcall RasGetEntryDialParams(char * lpszPhoneBook, TRasDialParamsA &lpDialParams, BOOL 
	&lpfPassword)
{
	return RasGetEntryDialParamsW(lpszPhoneBook, lpDialParams, lpfPassword);
}
#else
inline int __stdcall RasGetEntryDialParams(char * lpszPhoneBook, TRasDialParamsA &lpDialParams, BOOL 
	&lpfPassword)
{
	return RasGetEntryDialParamsA(lpszPhoneBook, lpDialParams, lpfPassword);
}
#endif


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