如何调出ie的拨号窗口?(20分)

  • 主题发起人 主题发起人 ooooh
  • 开始时间 开始时间
O

ooooh

Unregistered / Unconfirmed
GUEST, unregistred user!
查过很多网站都说用下面这句,但运行时提示:加载rnaui.dll时出错,找不到指定的模块.
winexec(PChar('rundll32.exe rnaui.dll,RnaDial '+ strDialName),SW_SHOWNORMAL);
用的是XP SP2 搜索过没有rnaui.dll这文件的.ADSL拨号上网.
请各位指教...多谢!
 
俺忘了...
google: 如何调出ie的拨号窗口
 
rnaui.dll这文件是9.x的 2000以上版本没有,用注册表的方法又没有XP的例子,XP没有这些键值,rasphone的方法又不支持XP以下版本,因不带PPPoE拨号程序...哎
 
没人知道?那么调出WINDOWS的拨号窗口呢?
 
http://www.delphibbs.com/delphibbs/dispq.asp?LID=1456796
win2000拨号上网

-------------------------


ras.inc
// WINVER < 0x400 = Windows NT 3.5, Windows NT 3.51
// WINVER = 0x400 = Windows 95, Windows98, Windows NT4 (default)
// WINVER > 0x400 = Windows NT4 enhancements
// WINVER = 0x500 = Windows 2000

{$DEFINE WINVER_0x400_OR_GREATER}
{.$DEFINE WINVER_0x401_OR_GREATER}
{.$DEFINE WINVER_0x500_OR_GREATER}

{.$DEFINE RAS_DYNAMIC_LINK}
{.$DEFINE RAS_DYNAMIC_LINK_EXPLICIT}

--------------------------------------------
ras.pas
{******************************************************************}
{ }
{ Borland Delphi Runtime Library }
{ RAS functions interface unit }
{ }
{ Portions created by Microsoft are }
{ Copyright (C) 1995-1999 Microsoft Corporation. }
{ All Rights Reserved. }
{ }
{ The original file is: ras.h, released 24 Apr 1998. }
{ The original Pascal code is: Ras.pas, released 30 Dec 1999. }
{ The initial developer of the Pascal code is Petr Vones }
{ (petr.v@mujmail.cz). }
{ }
{ Portions created by Petr Vones are }
{ Copyright (C) 1999 Petr Vones }
{ }
{ Obtained through: }
{ }
{ Joint Endeavour of Delphi Innovators (Project JEDI) }
{ }
{ You may retrieve the latest version of this file at the Project }
{ JEDI home page, located at http://delphi-jedi.org }
{ }
{ The contents of this file are used with permission, subject to }
{ the Mozilla Public License Version 1.1 (the &quot;License&quot;); you may }
{ not use this file except in compliance with the License. You may }
{ obtain a copy of the License at }
{ http://www.mozilla.org/MPL/MPL-1.1.html }
{ }
{ Software distributed under the License is distributed on an }
{ &quot;AS IS&quot; basis, WITHOUT WARRANTY OF ANY KIND, either express or }
{ implied. See the License for the specific language governing }
{ rights and limitations under the License. }
{ }
{******************************************************************}

unit Ras;

{$I RAS.INC}

{$ALIGN ON}
{$MINENUMSIZE 4}
{$WEAKPACKAGEUNIT}

interface

uses
Windows, LmCons;

(*$HPPEMIT '#include <lmcons.h>'*)
(*$HPPEMIT '#include <pshpack4.h>'*)
(*$HPPEMIT '#include <ras.h>'*)

const
RAS_MaxDeviceType = 16;
{$EXTERNALSYM RAS_MaxDeviceType}
RAS_MaxPhoneNumber = 128;
{$EXTERNALSYM RAS_MaxPhoneNumber}
RAS_MaxIpAddress = 15;
{$EXTERNALSYM RAS_MaxIpAddress}
RAS_MaxIpxAddress = 21;
{$EXTERNALSYM RAS_MaxIpxAddress}

{$IFDEF WINVER_0x400_OR_GREATER}
RAS_MaxEntryName = 256;
{$EXTERNALSYM RAS_MaxEntryName}
RAS_MaxDeviceName = 128;
{$EXTERNALSYM RAS_MaxDeviceName}
RAS_MaxCallbackNumber = RAS_MaxPhoneNumber;
{$EXTERNALSYM RAS_MaxCallbackNumber}
{$ELSE}
RAS_MaxEntryName = 20;
{$EXTERNALSYM RAS_MaxEntryName}
RAS_MaxDeviceName = 32;
{$EXTERNALSYM RAS_MaxDeviceName}
RAS_MaxCallbackNumber = 48;
{$EXTERNALSYM RAS_MaxCallbackNumber}
{$ENDIF}

RAS_MaxAreaCode = 10;
{$EXTERNALSYM RAS_MaxAreaCode}
RAS_MaxPadType = 32;
{$EXTERNALSYM RAS_MaxPadType}
RAS_MaxX25Address = 200;
{$EXTERNALSYM RAS_MaxX25Address}
RAS_MaxFacilities = 200;
{$EXTERNALSYM RAS_MaxFacilities}
RAS_MaxUserData = 200;
{$EXTERNALSYM RAS_MaxUserData}
RAS_MaxReplyMessage = 1024;
{$EXTERNALSYM RAS_MaxReplyMessage}

type
PHRasConn = ^THRasConn;
HRASCONN = THandle;
{$EXTERNALSYM HRASCONN}
THRasConn = HRASCONN;

// Identifies an active RAS connection. (See RasEnumConnections)

PRasConnA = ^TRasConnA;
PRasConnW = ^TRasConnW;
PRasConn = PRasConnA;
tagRASCONNA = record
dwSize: DWORD;
hrasconn: THRasConn;
szEntryName: packed array[0..RAS_MaxEntryName] of AnsiChar;
{$IFDEF WINVER_0x400_OR_GREATER}
szDeviceType: packed array[0..RAS_MaxDeviceType] of AnsiChar;
szDeviceName: packed array[0..RAS_MaxDeviceName] of AnsiChar;
{$ENDIF}
{$IFDEF WINVER_0x401_OR_GREATER}
szPhonebook: array[0..MAX_PATH-1] of AnsiChar;
dwSubEntry: DWORD;
{$ENDIF}
{$IFDEF WINVER_0x500_OR_GREATER}
guidEntry: TGUID;
{$ENDIF}
end;
{$EXTERNALSYM tagRASCONNA}
tagRASCONNW = record
dwSize: DWORD;
hrasconn: THRasConn;
szEntryName: packed array[0..RAS_MaxEntryName] of WideChar;
{$IFDEF WINVER_0x400_OR_GREATER}
szDeviceType: packed array[0..RAS_MaxDeviceType] of WideChar;
szDeviceName: packed array[0..RAS_MaxDeviceName] of WideChar;
{$ENDIF}
{$IFDEF WINVER_0x401_OR_GREATER}
szPhonebook: array[0..MAX_PATH-1] of WideChar;
dwSubEntry: DWORD;
{$ENDIF}
{$IFDEF WINVER_0x500_OR_GREATER}
guidEntry: TGUID;
{$ENDIF}
end;
{$EXTERNALSYM tagRASCONNW}
tagRASCONN = tagRASCONNA;
TRasConnA = tagRASCONNA;
TRasConnW = tagRASCONNW;
TRasConn = TRasConnA;
RASCONNA = tagRASCONNA;
{$EXTERNALSYM RASCONNA}
RASCONNW = tagRASCONNW;
{$EXTERNALSYM RASCONNW}
RASCONN = RASCONNA;

// Enumerates intermediate states to a connection. (See RasDial)

const
RASCS_PAUSED = $1000;
{$EXTERNALSYM RASCS_PAUSED}
RASCS_DONE = $2000;
{$EXTERNALSYM RASCS_DONE}

type
PRasConnState = ^TRasConnState;
RASCONNSTATE = DWORD;
{$EXTERNALSYM RASCONNSTATE}
TRasConnState = RASCONNSTATE;

const
RASCS_OpenPort = 0;
{$EXTERNALSYM RASCS_OpenPort}
RASCS_PortOpened = 1;
{$EXTERNALSYM RASCS_PortOpened}
RASCS_ConnectDevice = 2;
{$EXTERNALSYM RASCS_ConnectDevice}
RASCS_DeviceConnected = 3;
{$EXTERNALSYM RASCS_DeviceConnected}
RASCS_AllDevicesConnected = 4;
{$EXTERNALSYM RASCS_AllDevicesConnected}
RASCS_Authenticate = 5;
{$EXTERNALSYM RASCS_Authenticate}
RASCS_AuthNotify = 6;
{$EXTERNALSYM RASCS_AuthNotify}
RASCS_AuthRetry = 7;
{$EXTERNALSYM RASCS_AuthRetry}
RASCS_AuthCallback = 8;
{$EXTERNALSYM RASCS_AuthCallback}
RASCS_AuthChangePassword = 9;
{$EXTERNALSYM RASCS_AuthChangePassword}
RASCS_AuthProject = 10;
{$EXTERNALSYM RASCS_AuthProject}
RASCS_AuthLinkSpeed = 11;
{$EXTERNALSYM RASCS_AuthLinkSpeed}
RASCS_AuthAck = 12;
{$EXTERNALSYM RASCS_AuthAck}
RASCS_ReAuthenticate = 13;
{$EXTERNALSYM RASCS_ReAuthenticate}
RASCS_Authenticated = 14;
{$EXTERNALSYM RASCS_Authenticated}
RASCS_PrepareForCallback = 15;
{$EXTERNALSYM RASCS_PrepareForCallback}
RASCS_WaitForModemReset = 16;
{$EXTERNALSYM RASCS_WaitForModemReset}
RASCS_WaitForCallback = 17;
{$EXTERNALSYM RASCS_WaitForCallback}
RASCS_Projected = 18;
{$EXTERNALSYM RASCS_Projected}
{$IFDEF WINVER_0x400_OR_GREATER}
RASCS_StartAuthentication = 19;
{$EXTERNALSYM RASCS_StartAuthentication}
RASCS_CallbackComplete = 20;
{$EXTERNALSYM RASCS_CallbackComplete}
RASCS_LogonNetwork = 21;
{$EXTERNALSYM RASCS_LogonNetwork}
{$ENDIF}
RASCS_SubEntryConnected = 22;
{$EXTERNALSYM RASCS_SubEntryConnected}
RASCS_SubEntryDisconnected = 23;
{$EXTERNALSYM RASCS_SubEntryDisconnected}
RASCS_Interactive = RASCS_PAUSED;
{$EXTERNALSYM RASCS_Interactive}
RASCS_RetryAuthentication = RASCS_PAUSED + 1;
{$EXTERNALSYM RASCS_RetryAuthentication}
RASCS_CallbackSetByCaller = RASCS_PAUSED + 2;
{$EXTERNALSYM RASCS_CallbackSetByCaller}
RASCS_PasswordExpired = RASCS_PAUSED + 3;
{$EXTERNALSYM RASCS_PasswordExpired}
{$IFDEF WINVER_0x500_OR_GREATER}
RASCS_InvokeEapUI = RASCS_PAUSED + 4;
{$EXTERNALSYM RASCS_InvokeEapUI}
{$ENDIF}
RASCS_Connected = RASCS_DONE;
{$EXTERNALSYM RASCS_Connected}
RASCS_Disconnected = RASCS_DONE + 1;
{$EXTERNALSYM RASCS_Disconnected}

// Describes the status of a RAS connection. (See RasConnectionStatus)

type
PRasConnStatusA = ^TRasConnStatusA;
PRasConnStatusW = ^TRasConnStatusW;
PRasConnStatus = PRasConnStatusA;
tagRASCONNSTATUSA = record
dwSize: DWORD;
rasconnstate: TRasConnState;
dwError: DWORD;
szDeviceType: packed array[0..RAS_MaxDeviceType] of AnsiChar;
szDeviceName: packed array[0..RAS_MaxDeviceName] of AnsiChar;
{$IFDEF WINVER_0x401_OR_GREATER}
szPhoneNumber: packed array[0..RAS_MaxPhoneNumber] of AnsiChar;
{$ENDIF}
end;
{$EXTERNALSYM tagRASCONNSTATUSA}
tagRASCONNSTATUSW = record
dwSize: DWORD;
rasconnstate: TRasConnState;
dwError: DWORD;
szDeviceType: packed array[0..RAS_MaxDeviceType] of WideChar;
szDeviceName: packed array[0..RAS_MaxDeviceName] of WideChar;
{$IFDEF WINVER_0x401_OR_GREATER}
szPhoneNumber: packed array[0..RAS_MaxPhoneNumber] of WideChar;
{$ENDIF}
end;
{$EXTERNALSYM tagRASCONNSTATUSW}
tagRASCONNSTATUS = tagRASCONNSTATUSA;
TRasConnStatusA = tagRASCONNSTATUSA;
TRasConnStatusW = tagRASCONNSTATUSW;
TRasConnStatus = TRasConnStatusA;
RASCONNSTATUSA = tagRASCONNSTATUSA;
{$EXTERNALSYM RASCONNSTATUSA}
RASCONNSTATUSW = tagRASCONNSTATUSW;
{$EXTERNALSYM RASCONNSTATUSW}
RASCONNSTATUS = RASCONNSTATUSA;

// Describes connection establishment parameters. (See RasDial)
PRasDialParamsA = ^TRasDialParamsA;
PRasDialParamsW = ^TRasDialParamsW;
PRasDialParams = PRasDialParamsA;
tagRASDIALPARAMSA = record
dwSize: DWORD;
szEntryName: packed array[0..RAS_MaxEntryName] of AnsiChar;
szPhoneNumber: packed array[0..RAS_MaxPhoneNumber] of AnsiChar;
szCallbackNumber: packed array[0..RAS_MaxCallbackNumber] of AnsiChar;
szUserName: packed array[0..UNLEN] of AnsiChar;
szPassword: packed array[0..PWLEN] of AnsiChar;
szDomain: packed array[0..DNLEN] of AnsiChar;
{$IFDEF WINVER_0x401_OR_GREATER}
dwSubEntry: DWORD;
dwCallbackId: DWORD;
{$ENDIF}
end;
{$EXTERNALSYM tagRASDIALPARAMSA}
tagRASDIALPARAMSW = record
dwSize: DWORD;
szEntryName: packed array[0..RAS_MaxEntryName] of WideChar;
szPhoneNumber: packed array[0..RAS_MaxPhoneNumber] of WideChar;
szCallbackNumber: packed array[0..RAS_MaxCallbackNumber] of WideChar;
szUserName: packed array[0..UNLEN] of WideChar;
szPassword: packed array[0..PWLEN] of WideChar;
szDomain: packed array[0..DNLEN] of WideChar;
{$IFDEF WINVER_0x401_OR_GREATER}
dwSubEntry: DWORD;
dwCallbackId: DWORD;
{$ENDIF}
end;
{$EXTERNALSYM tagRASDIALPARAMSW}
tagRASDIALPARAMS = tagRASDIALPARAMSA;
TRasDialParamsA = tagRASDIALPARAMSA;
TRasDialParamsW = tagRASDIALPARAMSW;
TRasDialParams = TRasDialParamsA;
RASDIALPARAMSA = tagRASDIALPARAMSA;
{$EXTERNALSYM RASDIALPARAMSA}
RASDIALPARAMSW = tagRASDIALPARAMSW;
{$EXTERNALSYM RASDIALPARAMSW}
RASDIALPARAMS = RASDIALPARAMSA;

{$IFDEF WINVER_0x500_OR_GREATER}
PRasEapInfo = ^TRasEapInfo;
tagRASEAPINFO = record
dwSizeofEapInfo: DWORD;
pbEapInfo: Pointer;
end;
{$EXTERNALSYM tagRASEAPINFO}
TRasEapInfo = tagRASEAPINFO;
RASEAPINFO = tagRASEAPINFO;
{$EXTERNALSYM RASEAPINFO}
{$ENDIF}

// Describes extended connection establishment options. (See RasDial)

PRasDialExtensions = ^TRasDialExtensions;
tagRASDIALEXTENSIONS = record
dwSize: DWORD;
dwfOptions: DWORD;
hwndParent: HWND;
reserved: DWORD;
{$IFDEF WINVER_0x500_OR_GREATER}
reserved1: DWORD;
RasEapInfo: TRasEapInfo;
{$ENDIF}
end;
{$EXTERNALSYM tagRASDIALEXTENSIONS}
TRasDialExtensions = tagRASDIALEXTENSIONS;
RASDIALEXTENSIONS = tagRASDIALEXTENSIONS;
{$EXTERNALSYM RASDIALEXTENSIONS}

// 'dwfOptions' bit flags.

const
RDEOPT_UsePrefixSuffix = $00000001;
{$EXTERNALSYM RDEOPT_UsePrefixSuffix}
RDEOPT_PausedStates = $00000002;
{$EXTERNALSYM RDEOPT_PausedStates}
RDEOPT_IgnoreModemSpeaker = $00000004;
{$EXTERNALSYM RDEOPT_IgnoreModemSpeaker}
RDEOPT_SetModemSpeaker = $00000008;
{$EXTERNALSYM RDEOPT_SetModemSpeaker}
RDEOPT_IgnoreSoftwareCompression = $00000010;
{$EXTERNALSYM RDEOPT_IgnoreSoftwareCompression}
RDEOPT_SetSoftwareCompression = $00000020;
{$EXTERNALSYM RDEOPT_SetSoftwareCompression}
RDEOPT_DisableConnectedUI = $00000040;
{$EXTERNALSYM RDEOPT_DisableConnectedUI}
RDEOPT_DisableReconnectUI = $00000080;
{$EXTERNALSYM RDEOPT_DisableReconnectUI}
RDEOPT_DisableReconnect = $00000100;
{$EXTERNALSYM RDEOPT_DisableReconnect}
RDEOPT_NoUser = $00000200;
{$EXTERNALSYM RDEOPT_NoUser}
RDEOPT_PauseOnScript = $00000400;
{$EXTERNALSYM RDEOPT_PauseOnScript}
RDEOPT_Router = $00000800;
{$EXTERNALSYM RDEOPT_Router}
{$IFDEF WINVER_0x500_OR_GREATER}
RDEOPT_CustomDial = $00001000;
{$EXTERNALSYM RDEOPT_CustomDial}
{$ENDIF}

// This flag when set in the RASENTRYNAME structure
// indicates that the phonebook to which this entry
// belongs is a system phonebook.

REN_User = $00000000;
{$EXTERNALSYM REN_User}
REN_AllUsers = $00000001;
{$EXTERNALSYM REN_AllUsers}

// Describes an enumerated RAS phone book entry name. (See RasEntryEnum)

type
PRasEntryNameA = ^TRasEntryNameA;
PRasEntryNameW = ^TRasEntryNameW;
PRasEntryName = PRasEntryNameA;
tagRASENTRYNAMEA = record
dwSize: DWORD;
szEntryName: packed array[0..RAS_MaxEntryName] of AnsiChar;
{$IFDEF WINVER_0x500_OR_GREATER}
dwFlags: DWORD;
szPhonebookPath: packed array[0..MAX_PATH] of AnsiChar;
{$ENDIF}
end;
{$EXTERNALSYM tagRASENTRYNAMEA}
tagRASENTRYNAMEW = record
dwSize: DWORD;
szEntryName: packed array[0..RAS_MaxEntryName] of WideChar;
{$IFDEF WINVER_0x500_OR_GREATER}
dwFlags: DWORD;
szPhonebookPath: packed array[0..MAX_PATH] of WideChar;
{$ENDIF}
end;
{$EXTERNALSYM tagRASENTRYNAMEW}
tagRASENTRYNAME = tagRASENTRYNAMEA;
TRasEntryNameA = tagRASENTRYNAMEA;
TRasEntryNameW = tagRASENTRYNAMEW;
TRasEntryName = TRasEntryNameA;
RASENTRYNAMEA = tagRASENTRYNAMEA;
{$EXTERNALSYM RASENTRYNAMEA}
RASENTRYNAMEW = tagRASENTRYNAMEW;
{$EXTERNALSYM RASENTRYNAMEW}
RASENTRYNAME = RASENTRYNAMEA;

// Protocol code to projection data structure mapping.

type
PRasProjection = ^TRasProjection;
TRasProjection = DWORD;

const
RASP_Amb = $10000;
{$EXTERNALSYM RASP_Amb}
RASP_PppNbf = $803F;
{$EXTERNALSYM RASP_PppNbf}
RASP_PppIpx = $802B;
{$EXTERNALSYM RASP_PppIpx}
RASP_PppIp = $8021;
{$EXTERNALSYM RASP_PppIp}
{$IFDEF WINVER_0x500_OR_GREATER}
RASP_PppCcp = $80FD;
{$EXTERNALSYM RASP_PppCcp}
{$ENDIF}
RASP_PppLcp = $C021;
{$EXTERNALSYM RASP_PppLcp}
RASP_Slip = $20000;
{$EXTERNALSYM RASP_Slip}

// Describes the result of a RAS AMB (Authentication Message Block)
// projection. This protocol is used with NT 3.1 and OS/2 1.3 downlevel
// RAS servers.

type
PRasAmbA = ^TRasAmbA;
PRasAmbW = ^TRasAmbW;
PRasAmb = PRasAmbA;
tagRASAMBA = record
dwSize: DWORD;
dwError: DWORD;
szNetBiosError: packed array[0..NETBIOS_NAME_LEN] of AnsiChar;
bLana: Byte;
end;
{$EXTERNALSYM tagRASAMBA}
tagRASAMBW = record
dwSize: DWORD;
dwError: DWORD;
szNetBiosError: packed array[0..NETBIOS_NAME_LEN] of WideChar;
bLana: Byte;
end;
{$EXTERNALSYM tagRASAMBW}
tagRASAMB = tagRASAMBA;
TRasAmbA = tagRASAMBA;
TRasAmbW = tagRASAMBW;
TRasAmb = TRasAmbA;
RASAMBA = tagRASAMBA;
{$EXTERNALSYM RASAMBA}
RASAMBW = tagRASAMBW;
{$EXTERNALSYM RASAMBW}
RASAMB = RASAMBA;

// Describes the result of a PPP NBF (NetBEUI) projection.

PRasPppNBFA = ^TRasPppNBFA;
PRasPppNBFW = ^TRasPppNBFW;
PRasPppNBF = PRasPppNBFA;
tagRASPPPNBFA = record
dwSize: DWORD;
dwError: DWORD;
dwNetBiosError: DWORD;
szNetBiosError: packed array[0..NETBIOS_NAME_LEN] of AnsiChar;
szWorkstationName: packed array[0..NETBIOS_NAME_LEN] of AnsiChar;
bLana: Byte;
end;
{$EXTERNALSYM tagRASPPPNBFA}
tagRASPPPNBFW = record
dwSize: DWORD;
dwError: DWORD;
dwNetBiosError: DWORD;
szNetBiosError: packed array[0..NETBIOS_NAME_LEN] of WideChar;
szWorkstationName: packed array[0..NETBIOS_NAME_LEN] of WideChar;
bLana: Byte;
end;
{$EXTERNALSYM tagRASPPPNBFW}
tagRASPPPNBF = tagRASPPPNBFA;
TRasPppNBFA = tagRASPPPNBFA;
TRasPppNBFW = tagRASPPPNBFW;
TRasPppNBF = TRasPppNBFA;
RASPPPNBFA = tagRASPPPNBFA;
{$EXTERNALSYM tagRASPPPNBFA}
RASPPPNBFW = tagRASPPPNBFW;
{$EXTERNALSYM tagRASPPPNBFW}
RASPPPNBF = RASPPPNBFA;

// Describes the results of a PPP IPX (Internetwork Packet Exchange) projection.

PRasPppIPXA = ^TRasPppIPXA;
PRasPppIPXW = ^TRasPppIPXW;
PRasPppIPX = PRasPppIPXA;
tagRASPPPIPXA = record
dwSize: DWORD;
dwError: DWORD;
szIpxAddress: packed array[0..RAS_MaxIpxAddress] of AnsiChar;
end;
{$EXTERNALSYM tagRASPPPIPXA}
tagRASPPPIPXW = record
dwSize: DWORD;
dwError: DWORD;
szIpxAddress: packed array[0..RAS_MaxIpxAddress] of WideChar;
end;
{$EXTERNALSYM tagRASPPPIPXW}
tagRASPPPIPX = tagRASPPPIPXA;
TRasPppIPXA = tagRASPPPIPXA;
TRasPppIPXW = tagRASPPPIPXW;
TRasPppIPX = TRasPppIPXA;
RASPPPIPXA = tagRASPPPIPXA;
{$EXTERNALSYM RASPPPIPXA}
RASPPPIPXW = tagRASPPPIPXW;
{$EXTERNALSYM RASPPPIPXW}
RASPPPIPX = RASPPPIPXA;

// Describes the results of a PPP IP (Internet) projection

{$IFDEF WINVER_0x500_OR_GREATER}
// RASPPPIP 'dwOptions' and 'dwServerOptions' flags
const
RASIPO_VJ = $00000001;
{$EXTERNALSYM RASIPO_VJ}
{$ENDIF}

type
PRasPppIPA = ^TPRasPppIPA;
PRasPppIPW = ^TPRasPppIPW;
PRasPppIP = PRasPppIPA;
tagRASIPA = record
dwSize: DWORD;
dwError: DWORD;
szIpAddress: packed array[0..RAS_MaxIpAddress] of AnsiChar;
end;
{$EXTERNALSYM tagRASIPA}
tagRASIPW = record
dwSize: DWORD;
dwError: DWORD;
szIpAddress: packed array[0..RAS_MaxIpAddress] of WideChar;
end;
{$EXTERNALSYM tagRASIPW}
tagRASIP = tagRASIPA;
TPRasPppIPA = tagRASIPA;
TPRasPppIPW = tagRASIPW;
TPRasPppIP = TPRasPppIPA;
RASIPA = tagRASIPA;
{$EXTERNALSYM RASIPA}
RASIPW = tagRASIPW;
{$EXTERNALSYM RASIPW}
RASIP = RASIPA;

{#ifndef WINNT35COMPATIBLE

/* This field was added between Windows NT 3.51 beta and Windows NT 3.51
** final, and between Windows 95 M8 beta and Windows 95 final. If you do
** not require the server address and wish to retrieve PPP IP information
** from Windows NT 3.5 or early Windows NT 3.51 betas, or on early Windows
** 95 betas, define WINNT35COMPATIBLE.
**
** The server IP address is not provided by all PPP implementations,
** though Windows NT server's do provide it.
*/
WCHAR szServerIpAddress[ RAS_MaxIpAddress + 1 ];

#endif}

{$IFDEF WINVER_0x500_OR_GREATER}
const
// RASPPPLCP 'dwAuthenticatonProtocol' values.
RASLCPAP_PAP = $C023;
{$EXTERNALSYM RASLCPAP_PAP}
RASLCPAP_SPAP = $C027;
{$EXTERNALSYM RASLCPAP_SPAP}
RASLCPAP_CHAP = $C223;
{$EXTERNALSYM RASLCPAP_CHAP}
RASLCPAP_EAP = $C227;
{$EXTERNALSYM RASLCPAP_EAP}

// RASPPPLCP 'dwAuthenticatonData' values.
RASLCPAD_CHAP_MD5 = $05;
{$EXTERNALSYM RASLCPAD_CHAP_MD5}
RASLCPAD_CHAP_MS = $80;
{$EXTERNALSYM RASLCPAD_CHAP_MS}
RASLCPAD_CHAP_MSV2 = $81;
{$EXTERNALSYM RASLCPAD_CHAP_MSV2}

// RASPPPLCP 'dwOptions' and 'dwServerOptions' flags.
RASLCPO_PFC = $00000001;
{$EXTERNALSYM RASLCPO_PFC}
RASLCPO_ACFC = $00000002;
{$EXTERNALSYM RASLCPO_ACFC}
RASLCPO_SSHF = $00000004;
{$EXTERNALSYM RASLCPO_SSHF}
RASLCPO_DES_56 = $00000008;
{$EXTERNALSYM RASLCPO_DES_56}
RASLCPO_3_DES = $00000010;
{$EXTERNALSYM RASLCPO_3_DES}
{$ENDIF}

// Describes the results of a PPP LCP/multi-link negotiation.

type
PRasPppLCPA = ^TRasPppLCPA;
PRasPppLCPW = ^TRasPppLCPW;
PRasPppLCP = PRasPppLCPA;
tagRASPPPLCPA = record
dwSize: DWORD;
fBundled: BOOL;
{$IFDEF WINVER_0x500_OR_GREATER}
dwError: DWORD;
dwAuthenticationProtocol: DWORD;
dwAuthenticationData: DWORD;
dwEapTypeId: DWORD;
dwServerAuthenticationProtocol: DWORD;
dwServerAuthenticationData: DWORD;
dwServerEapTypeId: DWORD;
fMultilink: BOOL;
dwTerminateReason: DWORD;
dwServerTerminateReason: DWORD;
szReplyMessage: array[0..RAS_MaxReplyMessage - 1] of WideChar;
dwOptions: DWORD;
dwServerOptions: DWORD;
{$ENDIF}
end;
{$EXTERNALSYM tagRASPPPLCPA}
tagRASPPPLCPW = record
dwSize: DWORD;
fBundled: BOOL;
{$IFDEF WINVER_0x500_OR_GREATER}
dwError: DWORD;
dwAuthenticationProtocol: DWORD;
dwAuthenticationData: DWORD;
dwEapTypeId: DWORD;
dwServerAuthenticationProtocol: DWORD;
dwServerAuthenticationData: DWORD;
dwServerEapTypeId: DWORD;
fMultilink: BOOL;
dwTerminateReason: DWORD;
dwServerTerminateReason: DWORD;
szReplyMessage: array[0..RAS_MaxReplyMessage - 1] of WideChar;
dwOptions: DWORD;
dwServerOptions: DWORD;
{$ENDIF}
end;
{$EXTERNALSYM tagRASPPPLCPW}
tagRASPPPLCP = tagRASPPPLCPA;
TRasPppLCPA = tagRASPPPLCPA;
TRasPppLCPW = tagRASPPPLCPW;
TRasPppLCP = TRasPppLCPA;
RASPPPLCPA = tagRASPPPLCPA;
{$EXTERNALSYM RASPPPLCPA}
RASPPPLCPW = tagRASPPPLCPW;
{$EXTERNALSYM RASPPPLCPW}
RASPPPLCP = RASPPPLCPA;

// Describes the results of a SLIP (Serial Line IP) projection.

PRasSlipA = ^TRasSlipA;
PRasSlipW = ^TRasSlipW;
PRasSlip = PRasSlipA;
tagRASSLIPA = record
dwSize: DWORD;
dwError: DWORD;
szIpAddress: packed array[0..RAS_MaxIpAddress] of AnsiChar;
end;
{$EXTERNALSYM tagRASSLIPA}
tagRASSLIPW = record
dwSize: DWORD;
dwError: DWORD;
szIpAddress: packed array[0..RAS_MaxIpAddress] of WideChar;
end;
{$EXTERNALSYM tagRASSLIPW}
tagRASSLIP = tagRASSLIPA;
TRasSlipA = tagRASSLIPA;
TRasSlipW = tagRASSLIPW;
TRasSlip = TRasSlipA;
RASSLIPA = tagRASSLIPA;
{$EXTERNALSYM RASSLIPA}
RASSLIPW = tagRASSLIPW;
{$EXTERNALSYM RASSLIPW}
RASSLIP = RASSLIPA;

{$IFDEF WINVER_0x500_OR_GREATER}

// Describes the results of a PPP CCP (Compression Control Protocol)

const

// RASPPPCCP 'dwCompressionAlgorithm' values.
RASCCPCA_MPPC = $00000006;
{$EXTERNALSYM RASCCPCA_MPPC}
RASCCPCA_STAC = $00000005;
{$EXTERNALSYM RASCCPCA_STAC}

// RASPPPCCP 'dwOptions' values.
RASCCPO_Compression = $00000001;
{$EXTERNALSYM RASCCPO_Compression}
RASCCPO_HistoryLess = $00000002;
{$EXTERNALSYM RASCCPO_HistoryLess}
RASCCPO_Encryption56bit = $00000010;
{$EXTERNALSYM RASCCPO_Encryption56bit}
RASCCPO_Encryption40bit = $00000020;
{$EXTERNALSYM RASCCPO_Encryption40bit}
RASCCPO_Encryption128bit = $00000040;
{$EXTERNALSYM RASCCPO_Encryption128bit}

type
PRasPppCcp = ^TRasPppCcp;
tagRASPPPCCP = record
dwSize: DWORD;
dwError: DWORD;
dwCompressionAlgorithm: DWORD;
dwOptions: DWORD;
dwServerCompressionAlgorithm: DWORD;
dwServerOptions: DWORD;
end;
{$EXTERNALSYM tagRASPPPCCP}
TRasPppCcp = tagRASPPPCCP;
RASPPPCCP = tagRASPPPCCP;
{$EXTERNALSYM RASPPPCCP}

{$ENDIF}


// If using RasDial message notifications, get the notification message code
// by passing this string to the RegisterWindowMessageA() API.
// WM_RASDIALEVENT is used only if a unique message cannot be registered.

const
RASDIALEVENT = 'RasDialEvent';
{$EXTERNALSYM RASDIALEVENT}
WM_RASDIALEVENT = $CCCD;
{$EXTERNALSYM WM_RASDIALEVENT}

// Prototypes for caller's RasDial callback handler. Arguments are the
// message ID (currently always WM_RASDIALEVENT), the current RASCONNSTATE and
// the error that has occurred (or 0 if none). Extended arguments are the
// handle of the RAS connection and an extended error code.
//
// For RASDIALFUNC2, subsequent callback notifications for all
// subentries can be cancelled by returning FALSE.

type
TRasDialFunc = procedure (unMsg: UINT; rasconnstate: TRasConnState; dwError: DWORD); stdcall;
{$EXTERNALSYM TRasDialFunc}
TRasDialFunc1 = procedure (hrasconn: THRasConn; unMsg: UINT; rascs: TRasConnState;
dwError: DWORD; dwExtendedError: DWORD); stdcall;
{$EXTERNALSYM TRasDialFunc1}
TRasDialFunc2 = function (dwCallbackId: DWORD; dwSubEntry: DWORD;
hrasconn: THRasConn; unMsg: UINT; rascs: TRasConnState; dwError: DWORD;
dwExtendedError: DWORD): DWORD; stdcall;
{$EXTERNALSYM TRasDialFunc2}

// Information describing a RAS-capable device.

PRasDevInfoA = ^TRasDevInfoA;
PRasDevInfoW = ^TRasDevInfoW;
PRasDevInfo = PRasDevInfoA;
tagRASDEVINFOA = record
dwSize: DWORD;
szDeviceType: packed array[0..RAS_MaxDeviceType] of AnsiChar;
szDeviceName: packed array[0..RAS_MaxDeviceName] of AnsiChar;
end;
{$EXTERNALSYM tagRASDEVINFOA}
tagRASDEVINFOW = record
dwSize: DWORD;
szDeviceType: packed array[0..RAS_MaxDeviceType] of WideChar;
szDeviceName: packed array[0..RAS_MaxDeviceName] of WideChar;
end;
{$EXTERNALSYM tagRASDEVINFOW}
tagRASDEVINFO = tagRASDEVINFOA;
TRasDevInfoA = tagRASDEVINFOA;
TRasDevInfoW = tagRASDEVINFOW;
TRasDevInfo = TRasDevInfoA;
RASDEVINFOA = tagRASDEVINFOA;
{$EXTERNALSYM RASDEVINFOA}
RASDEVINFOW = tagRASDEVINFOW;
{$EXTERNALSYM RASDEVINFOW}
RASDEVINFO = RASDEVINFOA;

// RAS country information (currently retrieved from TAPI).

PRasCtryInfoA = ^TRasCtryInfoA;
PRasCtryInfoW = ^TRasCtryInfoW;
PRasCtryInfo = PRasCtryInfoA;
RASCTRYINFOA = record
dwSize: DWORD;
dwCountryID: DWORD;
dwNextCountryID: DWORD;
dwCountryCode: DWORD;
dwCountryNameOffset: DWORD;
end;
{$EXTERNALSYM RASCTRYINFOA}
RASCTRYINFOW = record
dwSize: DWORD;
dwCountryID: DWORD;
dwNextCountryID: DWORD;
dwCountryCode: DWORD;
dwCountryNameOffset: DWORD;
end;
{$EXTERNALSYM RASCTRYINFOW}
RASCTRYINFO = RASCTRYINFOA;
TRasCtryInfoA = RASCTRYINFOA;
TRasCtryInfoW = RASCTRYINFOW;
TRasCtryInfo = TRasCtryInfoA;
CTRYINFOA = RASCTRYINFOA;
{$EXTERNALSYM CTRYINFOA}
CTRYINFOW = RASCTRYINFOW;
{$EXTERNALSYM CTRYINFOW}
CTRYINFO = CTRYINFOA;

// There is currently no difference between RASCTRYINFOA and RASCTRYINFOW.
// This may change in the future.

const
{$IFDEF WINVER_0x500_OR_GREATER}
ET_40Bit = 1;
{$EXTERNALSYM ET_40Bit}
ET_128Bit = 2;
{$EXTERNALSYM ET_128Bit}

ET_None = 0; // No encryption
{$EXTERNALSYM ET_None}
ET_Require = 1; // Require Encryption
{$EXTERNALSYM ET_Require}
ET_RequireMax = 2; // Require max encryption
{$EXTERNALSYM ET_RequireMax}
ET_Optional = 3; // Do encryption if possible. None Ok.
{$EXTERNALSYM ET_Optional}
{$ENDIF}

VS_Default = 0; // default (PPTP for now)
{$EXTERNALSYM VS_Default}
VS_PptpOnly = 1; // Only PPTP is attempted.
{$EXTERNALSYM VS_PptpOnly}
VS_PptpFirst = 2; // PPTP is tried first.
{$EXTERNALSYM VS_PptpFirst}
VS_L2tpOnly = 3; // Only L2TP is attempted.
{$EXTERNALSYM VS_L2tpOnly}
VS_L2tpFirst = 4; // L2TP is tried first.
{$EXTERNALSYM VS_L2tpFirst}

type
TRasIPAddr = record
a, b, c, d: Byte;
end;
RASIPADDR = TRasIPAddr;
{$EXTERNALSYM RASIPADDR}

// A RAS phone book entry.

PRasEntryA = ^TRasEntryA;
PRasEntryW = ^TRasEntryW;
PRasEntry = PRasEntryA;
tagRASENTRYA = record
dwSize: DWORD;
dwfOptions: DWORD;
// Location/phone number.
dwCountryID: DWORD;
dwCountryCode: DWORD;
szAreaCode: packed array[0..RAS_MaxAreaCode] of AnsiChar;
szLocalPhoneNumber: packed array[0..RAS_MaxPhoneNumber] of AnsiChar;
dwAlternateOffset: DWORD;
// PPP/Ip
ipaddr: RASIPADDR;
ipaddrDns: RASIPADDR;
ipaddrDnsAlt: RASIPADDR;
ipaddrWins: RASIPADDR;
ipaddrWinsAlt: RASIPADDR;
// Framing
dwFrameSize: DWORD;
dwfNetProtocols: DWORD;
dwFramingProtocol: DWORD;
// Scripting
szScript: packed array[0..MAX_PATH-1] of AnsiChar;
// AutoDial
szAutodialDll: packed array[0..MAX_PATH-1] of AnsiChar;
szAutodialFunc: packed array[0..MAX_PATH-1] of AnsiChar;
// Device
szDeviceType: packed array[0..RAS_MaxDeviceType] of AnsiChar;
szDeviceName: packed array[0..RAS_MaxDeviceName] of AnsiChar;
// X.25
szX25PadType: packed array[0..RAS_MaxPadType] of AnsiChar;
szX25Address: packed array[0..RAS_MaxX25Address] of AnsiChar;
szX25Facilities: packed array[0..RAS_MaxFacilities] of AnsiChar;
szX25UserData: packed array[0..RAS_MaxUserData] of AnsiChar;
dwChannels: DWORD;
// Reserved
dwReserved1: DWORD;
dwReserved2: DWORD;
{$IFDEF WINVER_0x401_OR_GREATER}
// Multilink
dwSubEntries: DWORD;
dwDialMode: DWORD;
dwDialExtraPercent: DWORD;
dwDialExtraSampleSeconds: DWORD;
dwHangUpExtraPercent: DWORD;
dwHangUpExtraSampleSeconds: DWORD;
// Idle timeout
dwIdleDisconnectSeconds: DWORD;
{$ENDIF}
{$IFDEF WINVER_0x500_OR_GREATER}
dwType: DWORD;
dwEncryptionType: DWORD;
dwCustomAuthKey: DWORD;
guidId: TGUID;
szCustomDialDll: packed array[0..MAX_PATH-1] of AnsiChar;
dwVpnStrategy: DWORD;
{$ENDIF}
end;
{$EXTERNALSYM tagRASENTRYA}
tagRASENTRYW = record
dwSize: DWORD;
dwfOptions: DWORD;
// Location/phone number.
dwCountryID: DWORD;
dwCountryCode: DWORD;
szAreaCode: packed array[0..RAS_MaxAreaCode] of WideChar;
szLocalPhoneNumber: packed array[0..RAS_MaxPhoneNumber] of WideChar;
dwAlternateOffset: DWORD;
// PPP/Ip
ipaddr: RASIPADDR;
ipaddrDns: RASIPADDR;
ipaddrDnsAlt: RASIPADDR;
ipaddrWins: RASIPADDR;
ipaddrWinsAlt: RASIPADDR;
// Framing
dwFrameSize: DWORD;
dwfNetProtocols: DWORD;
dwFramingProtocol: DWORD;
// Scripting
szScript: packed array[0..MAX_PATH-1] of WideChar;
// AutoDial
szAutodialDll: packed array[0..MAX_PATH-1] of WideChar;
szAutodialFunc: packed array[0..MAX_PATH-1] of WideChar;
// Device
szDeviceType: packed array[0..RAS_MaxDeviceType] of WideChar;
szDeviceName: packed array[0..RAS_MaxDeviceName] of WideChar;
// X.25
szX25PadType: packed array[0..RAS_MaxPadType] of WideChar;
szX25Address: packed array[0..RAS_MaxX25Address] of WideChar;
szX25Facilities: packed array[0..RAS_MaxFacilities] of WideChar;
szX25UserData: packed array[0..RAS_MaxUserData] of WideChar;
dwChannels: DWORD;
// Reserved
dwReserved1: DWORD;
dwReserved2: DWORD;
{$IFDEF WINVER_0x401_OR_GREATER}
// Multilink
dwSubEntries: DWORD;
dwDialMode: DWORD;
dwDialExtraPercent: DWORD;
dwDialExtraSampleSeconds: DWORD;
dwHangUpExtraPercent: DWORD;
dwHangUpExtraSampleSeconds: DWORD;
// Idle timeout
dwIdleDisconnectSeconds: DWORD;
{$ENDIF}
{$IFDEF WINVER_0x500_OR_GREATER}
dwType: DWORD;
dwEncryptionType: DWORD;
dwCustomAuthKey: DWORD;
guidId: TGUID;
szCustomDialDll: packed array[0..MAX_PATH-1] of WideChar;
dwVpnStrategy: DWORD;
{$ENDIF}
end;
{$EXTERNALSYM tagRASENTRYW}
tagRASENTRY = tagRASENTRYA;
TRasEntryA = tagRASENTRYA;
TRasEntryW = tagRASENTRYW;
TRasEntry = TRasEntryA;
RASENTRYA = tagRASENTRYA;
{$EXTERNALSYM RASENTRYA}
RASENTRYW = tagRASENTRYW;
{$EXTERNALSYM RASENTRYW}
RASENTRY = RASENTRYA;

// RASENTRY 'dwfOptions' bit flags.

const
RASEO_UseCountryAndAreaCodes = $00000001;
{$EXTERNALSYM RASEO_UseCountryAndAreaCodes}
RASEO_SpecificIpAddr = $00000002;
{$EXTERNALSYM RASEO_SpecificIpAddr}
RASEO_SpecificNameServers = $00000004;
{$EXTERNALSYM RASEO_SpecificNameServers}
RASEO_IpHeaderCompression = $00000008;
{$EXTERNALSYM RASEO_IpHeaderCompression}
RASEO_RemoteDefaultGateway = $00000010;
{$EXTERNALSYM RASEO_RemoteDefaultGateway}
RASEO_DisableLcpExtensions = $00000020;
{$EXTERNALSYM RASEO_DisableLcpExtensions}
RASEO_TerminalBeforeDial = $00000040;
{$EXTERNALSYM RASEO_TerminalBeforeDial}
RASEO_TerminalAfterDial = $00000080;
{$EXTERNALSYM RASEO_TerminalAfterDial}
RASEO_ModemLights = $00000100;
{$EXTERNALSYM RASEO_ModemLights}
RASEO_SwCompression = $00000200;
{$EXTERNALSYM RASEO_SwCompression}
RASEO_RequireEncryptedPw = $00000400;
{$EXTERNALSYM RASEO_RequireEncryptedPw}
RASEO_RequireMsEncryptedPw = $00000800;
{$EXTERNALSYM RASEO_RequireMsEncryptedPw}
RASEO_RequireDataEncryption = $00001000;
{$EXTERNALSYM RASEO_RequireDataEncryption}
RASEO_NetworkLogon = $00002000;
{$EXTERNALSYM RASEO_NetworkLogon}
RASEO_UseLogonCredentials = $00004000;
{$EXTERNALSYM RASEO_UseLogonCredentials}
RASEO_PromoteAlternates = $00008000;
{$EXTERNALSYM RASEO_PromoteAlternates}
{$IFDEF WINVER_0x401_OR_GREATER}
RASEO_SecureLocalFiles = $00010000;
{$EXTERNALSYM RASEO_SecureLocalFiles}
{$ENDIF}
{$IFDEF WINVER_0x500_OR_GREATER}
RASEO_RequireEAP = $00020000;
{$EXTERNALSYM RASEO_RequireEAP}
RASEO_RequirePAP = $00040000;
{$EXTERNALSYM RASEO_RequirePAP}
RASEO_RequireSPAP = $00080000;
{$EXTERNALSYM RASEO_RequireSPAP}
RASEO_Custom = $00100000;
{$EXTERNALSYM RASEO_Custom}
RASEO_PreviewPhoneNumber = $00200000;
{$EXTERNALSYM RASEO_PreviewPhoneNumber}
RASEO_SharedPhoneNumbers = $00800000;
{$EXTERNALSYM RASEO_SharedPhoneNumbers}
RASEO_PreviewUserPw = $01000000;
{$EXTERNALSYM RASEO_PreviewUserPw}
RASEO_PreviewDomain = $02000000;
{$EXTERNALSYM RASEO_PreviewDomain}
RASEO_ShowDialingProgress = $04000000;
{$EXTERNALSYM RASEO_ShowDialingProgress}
RASEO_RequireCHAP = $08000000;
{$EXTERNALSYM RASEO_RequireCHAP}
RASEO_RequireMsCHAP = $10000000;
{$EXTERNALSYM RASEO_RequireMsCHAP}
RASEO_RequireMsCHAP2 = $20000000;
{$EXTERNALSYM RASEO_RequireMsCHAP2}
RASEO_RequireW95MSCHAP = $40000000;
{$EXTERNALSYM RASEO_RequireW95MSCHAP}
RASEO_CustomScript = $80000000;
{$EXTERNALSYM RASEO_CustomScript}
{$ENDIF}


// RASENTRY 'dwProtocols' bit flags.
RASNP_NetBEUI = $00000001;
{$EXTERNALSYM RASNP_NetBEUI}
RASNP_Ipx = $00000002;
{$EXTERNALSYM RASNP_Ipx}
RASNP_Ip = $00000004;
{$EXTERNALSYM RASNP_Ip}

// RASENTRY 'dwFramingProtocols' bit flags.
RASFP_Ppp = $00000001;
{$EXTERNALSYM RASFP_Ppp}
RASFP_Slip = $00000002;
{$EXTERNALSYM RASFP_Slip}
RASFP_Ras = $00000004;
{$EXTERNALSYM RASFP_Ras}

// RASENTRY 'szDeviceType' default strings.
RASDT_Modem = 'modem';
{$EXTERNALSYM RASDT_Modem}
RASDT_Isdn = 'isdn';
{$EXTERNALSYM RASDT_Isdn}
RASDT_X25 = 'x25';
{$EXTERNALSYM RASDT_X25}
RASDT_Vpn = 'vpn';
{$EXTERNALSYM RASDT_Vpn}
RASDT_Pad = 'pad';
{$EXTERNALSYM RASDT_Pad}
RASDT_Generic = 'GENERIC';
{$EXTERNALSYM RASDT_Generic}
RASDT_Serial = 'SERIAL';
{$EXTERNALSYM RASDT_Serial}
RASDT_FrameRelay = 'FRAMERELAY';
{$EXTERNALSYM RASDT_FrameRelay}
RASDT_Atm = 'ATM';
{$EXTERNALSYM RASDT_Atm}
RASDT_Sonet = 'SONET';
{$EXTERNALSYM RASDT_Sonet}
RASDT_SW56 = 'SW56';
{$EXTERNALSYM RASDT_SW56}
RASDT_Irda = 'IRDA';
{$EXTERNALSYM RASDT_Irda}
RASDT_Parallel = 'PARALLEL';
{$EXTERNALSYM RASDT_Parallel}

// The entry type used to determine which UI properties
// are to be presented to user. This generally corresponds
// to a Connections &quot;add&quot; wizard selection.

RASET_Phone = 1; // Phone lines: modem, ISDN, X.25, etc
{$EXTERNALSYM RASET_Phone}
RASET_Vpn = 2; // Virtual private network
{$EXTERNALSYM RASET_Vpn}
RASET_Direct = 3; // Direct connect: serial, parallel
{$EXTERNALSYM RASET_Direct}
RASET_Internet = 4; // BaseCamp internet
{$EXTERNALSYM RASET_Internet}


// Old AutoDial DLL function prototype.
//
// This prototype is documented for backward-compatibility
// purposes only. It is superceded by the RASADFUNCA
// and RASADFUNCW definitions below. DO NOT USE THIS
// PROTOTYPE IN NEW CODE. SUPPORT FOR IT MAY BE REMOVED
// IN FUTURE VERSIONS OF RAS.

type
TORASADFunc = function(hwndOwner: HWND; lpszEntry: LPSTR; dwFlags: DWORD;
var lpdwRetCode: DWORD): BOOL; stdcall;
{$EXTERNALSYM TORASADFunc}

{$IFDEF WINVER_0x401_OR_GREATER}
const
// Flags for RasConnectionNotification().
RASCN_Connection = $00000001;
{$EXTERNALSYM RASCN_Connection}
RASCN_Disconnection = $00000002;
{$EXTERNALSYM RASCN_Disconnection}
RASCN_BandwidthAdded = $00000004;
{$EXTERNALSYM RASCN_BandwidthAdded}
RASCN_BandwidthRemoved = $00000008;
{$EXTERNALSYM RASCN_BandwidthRemoved}

// RASENTRY 'dwDialMode' values.
RASEDM_DialAll = 1;
{$EXTERNALSYM RASEDM_DialAll}
RASEDM_DialAsNeeded = 2;
{$EXTERNALSYM RASEDM_DialAsNeeded}

// RASENTRY 'dwIdleDisconnectSeconds' constants.
RASIDS_Disabled = $ffffffff;
{$EXTERNALSYM RASIDS_Disabled}
RASIDS_UseGlobalValue = $0;
{$EXTERNALSYM RASIDS_UseGlobalValue}

// AutoDial DLL function parameter block.
type
PRasAdParams = ^TRasAdParams;
tagRASADPARAMS = record
dwSize: DWORD;
hwndOwner: HWND;
dwFlags: DWORD;
xDlg: LongInt;
yDlg: LongInt;
end;
{$EXTERNALSYM tagRASADPARAMS}
TRasAdParams = tagRASADPARAMS;
RASADPARAMS = tagRASADPARAMS;
{$EXTERNALSYM RASADPARAMS}

// AutoDial DLL function parameter block 'dwFlags.'

const
RASADFLG_PositionDlg = $00000001;
{$EXTERNALSYM RASADFLG_PositionDlg}

// Prototype AutoDial DLL function.
type
TRasAdFuncA = function (lpszPhonebook: PAnsiChar; lpszEntry: PAnsiChar;
lpAutodialParams: PRasAdParams; var lpdwRetCode: DWORD): BOOL; stdcall;
TRasAdFuncW = function (lpszPhonebook: PWideChar; lpszEntry: PWideChar;
lpAutodialParams: PRasAdParams; var lpdwRetCode: DWORD): BOOL; stdcall;
TRasAdFunc = TRasAdFuncA;

// A RAS phone book multilinked sub-entry.
PRasSubEntryA = ^TRasSubEntryA;
PRasSubEntryW = ^TRasSubEntryW;
PRasSubEntry = PRasSubEntryA;
tagRASSUBENTRYA = record
dwSize: DWORD;
dwfFlags: DWORD;
// Device
szDeviceType: packed array[0..RAS_MaxDeviceType] of AnsiChar;
szDeviceName: packed array[0..RAS_MaxDeviceName] of AnsiChar;
// Phone numbers
szLocalPhoneNumber: packed array[0..RAS_MaxPhoneNumber] of AnsiChar;
dwAlternateOffset: DWORD;
end;
{$EXTERNALSYM tagRASSUBENTRYA}
tagRASSUBENTRYW = record
dwSize: DWORD;
dwfFlags: DWORD;
// Device
szDeviceType: packed array[0..RAS_MaxDeviceType] of WideChar;
szDeviceName: packed array[0..RAS_MaxDeviceName] of WideChar;
// Phone numbers
szLocalPhoneNumber: packed array[0..RAS_MaxPhoneNumber] of WideChar;
dwAlternateOffset: DWORD;
end;
{$EXTERNALSYM tagRASSUBENTRYW}
tagRASSUBENTRY = tagRASSUBENTRYA;
TRasSubEntryA = tagRASSUBENTRYA;
TRasSubEntryW = tagRASSUBENTRYW;
TRasSubEntry = TRasSubEntryA;
RASSUBENTRYA = tagRASSUBENTRYA;
{$EXTERNALSYM RASSUBENTRYA}
RASSUBENTRYW = tagRASSUBENTRYW;
{$EXTERNALSYM RASSUBENTRYW}
RASSUBENTRY = RASSUBENTRYA;

// Ras(Get,Set)Credentials structure. These calls supercede Ras(Get,Set)EntryDialParams.

PRasCredentialsA = ^TRasCredentialsA;
PRasCredentialsW = ^TRasCredentialsW;
PRasCredentials = PRasCredentialsA;
tagRASCREDENTIALSA = record
dwSize: DWORD;
dwMask: DWORD;
szUserName: packed array[0..UNLEN] of AnsiChar;
szPassword: packed array[0..PWLEN] of AnsiChar;
szDomain: packed array[0..DNLEN] of AnsiChar;
end;
{$EXTERNALSYM tagRASCREDENTIALSA}
tagRASCREDENTIALSW = record
dwSize: DWORD;
dwMask: DWORD;
szUserName: packed array[0..UNLEN] of WideChar;
szPassword: packed array[0..PWLEN] of WideChar;
szDomain: packed array[0..DNLEN] of WideChar;
end;
{$EXTERNALSYM tagRASCREDENTIALSW}
tagRASCREDENTIALS = tagRASCREDENTIALSA;
TRasCredentialsA = tagRASCREDENTIALSA;
TRasCredentialsW = tagRASCREDENTIALSW;
TRasCredentials = TRasCredentialsA;
RASCREDENTIALSA = tagRASCREDENTIALSA;
{$EXTERNALSYM RASCREDENTIALSA}
RASCREDENTIALSW = tagRASCREDENTIALSW;
{$EXTERNALSYM RASCREDENTIALSW}
RASCREDENTIALS = RASCREDENTIALSA;

// RASCREDENTIALS 'dwMask' values.
const
RASCM_UserName = $00000001;
{$EXTERNALSYM RASCM_UserName}
RASCM_Password = $00000002;
{$EXTERNALSYM RASCM_Password}
RASCM_Domain = $00000004;
{$EXTERNALSYM RASCM_Domain}

// AutoDial address properties.

type
PRasAutodialEntryA = ^TRasAutodialEntryA;
PRasAutodialEntryW = ^TRasAutodialEntryW;
PRasAutodialEntry = PRasAutodialEntryA;
tagRASAUTODIALENTRYA = record
dwSize: DWORD;
dwFlags: DWORD;
dwDialingLocation: DWORD;
szEntry: packed array[0..RAS_MaxEntryName] of AnsiChar;
end;
{$EXTERNALSYM tagRASAUTODIALENTRYA}
tagRASAUTODIALENTRYW = record
dwSize: DWORD;
dwFlags: DWORD;
dwDialingLocation: DWORD;
szEntry: packed array[0..RAS_MaxEntryName] of WideChar;
end;
{$EXTERNALSYM tagRASAUTODIALENTRYW}
tagRASAUTODIALENTRY = tagRASAUTODIALENTRYA;
TRasAutodialEntryA = tagRASAUTODIALENTRYA;
TRasAutodialEntryW = tagRASAUTODIALENTRYW;
TRasAutodialEntry = TRasAutodialEntryA;
RASAUTODIALENTRYA = tagRASAUTODIALENTRYA;
{$EXTERNALSYM RASAUTODIALENTRYA}
RASAUTODIALENTRYW = tagRASAUTODIALENTRYW;
{$EXTERNALSYM RASAUTODIALENTRYW}
RASAUTODIALENTRY = RASAUTODIALENTRYA;

// AutoDial control parameter values for Ras(Get,Set)AutodialParam.

const
RASADP_DisableConnectionQuery = 0;
{$EXTERNALSYM RASADP_DisableConnectionQuery}
RASADP_LoginSessionDisable = 1;
{$EXTERNALSYM RASADP_LoginSessionDisable}
RASADP_SavedAddressesLimit = 2;
{$EXTERNALSYM RASADP_SavedAddressesLimit}
RASADP_FailedConnectionTimeout = 3;
{$EXTERNALSYM RASADP_FailedConnectionTimeout}
RASADP_ConnectionQueryTimeout = 4;
{$EXTERNALSYM RASADP_ConnectionQueryTimeout}

{$ENDIF}
// (WINVER >= 0x401)

{$IFDEF WINVER_0x500_OR_GREATER}
const
RASEAPF_NonInteractive = $00000002;
{$EXTERNALSYM RASEAPF_NonInteractive}
RASEAPF_Logon = $00000004;
{$EXTERNALSYM RASEAPF_Logon}
RASEAPF_Preview = $00000008;
{$EXTERNALSYM RASEAPF_Preview}

type
PRasEapUserIdentityA = ^TRasEapUserIdentityA;
PRasEapUserIdentityW = ^TRasEapUserIdentityW;
PRasEapUserIdentity = PRasEapUserIdentityA;
tagRASEAPUSERIDENTITYA = record
szUserName: array[0..UNLEN] of AnsiChar;
dwSizeofEapInfo: DWORD;
pbEapInfo: Byte;
end;
{$EXTERNALSYM tagRASEAPUSERIDENTITYA}
tagRASEAPUSERIDENTITYW = record
szUserName: array[0..UNLEN] of WideChar;
dwSizeofEapInfo: DWORD;
pbEapInfo: Byte;
end;
{$EXTERNALSYM tagRASEAPUSERIDENTITYW}
tagRASEAPUSERIDENTITY = tagRASEAPUSERIDENTITYA;
TRasEapUserIdentityA = tagRASEAPUSERIDENTITYA;
TRasEapUserIdentityW = tagRASEAPUSERIDENTITYW;
TRasEapUserIdentity = TRasEapUserIdentityA;
RASEAPUSERIDENTITYA = tagRASEAPUSERIDENTITYA;
{$EXTERNALSYM RASEAPUSERIDENTITYA}
RASEAPUSERIDENTITYW = tagRASEAPUSERIDENTITYW;
{$EXTERNALSYM RASEAPUSERIDENTITYW}
RASEAPUSERIDENTITY = RASEAPUSERIDENTITYA;

{$ENDIF}

function RasDialA(lpRasDialExtensions: PRasDialExtensions; lpszPhonebook: PAnsiChar;
lpRasDialParams: PRasDialParamsA; dwNotifierType: DWORD; lpvNotifier: Pointer;
var lphRasConn: THRasConn): DWORD; stdcall;
{$EXTERNALSYM RasDialA}
function RasDialW(lpRasDialExtensions: PRasDialExtensions; lpszPhonebook: PWideChar;
lpRasDialParams: PRasDialParamsW; dwNotifierType: DWORD; lpvNotifier: Pointer;
var lphRasConn: THRasConn): DWORD; stdcall;
{$EXTERNALSYM RasDialW}
function RasDial(lpRasDialExtensions: PRasDialExtensions; lpszPhonebook: PChar;
lpRasDialParams: PRasDialParams; dwNotifierType: DWORD; lpvNotifier: Pointer;
var lphRasConn: THRasConn): DWORD; stdcall;
{$EXTERNALSYM RasDial}

function RasEnumConnectionsA(lprasconn: PRasConnA; var lpcb: DWORD;
var pcConnections: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasEnumConnectionsA}
function RasEnumConnectionsW(lprasconn: PRasConnW; var lpcb: DWORD;
var pcConnections: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasEnumConnectionsW}
function RasEnumConnections(lprasconn: PRasConn; var lpcb: DWORD;
var pcConnections: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasEnumConnections}

function RasEnumEntriesA(reserved: PAnsiChar; lpszPhonebook: PAnsiChar;
lprasentryname: PRasEntryNameA; var lpcb: DWORD;
var lpcEntries: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasEnumEntriesA}
function RasEnumEntriesW(reserved: PWideChar; lpszPhonebook: PWideChar;
lprasentryname: PRasEntryNameW; var lpcb: DWORD;
var lpcEntries: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasEnumEntriesW}
function RasEnumEntries(reserved: PChar; lpszPhonebook: PChar;
lprasentryname: PRasEntryName; var lpcb: DWORD;
var lpcEntries: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasEnumEntries}

function RasGetConnectStatusA(hrasconn: THRasConn;
var lprasconnstatus: TRasConnStatusA): DWORD; stdcall;
{$EXTERNALSYM RasGetConnectStatusA}
function RasGetConnectStatusW(hrasconn: THRasConn;
var lprasconnstatus: TRasConnStatusW): DWORD; stdcall;
{$EXTERNALSYM RasGetConnectStatusW}
function RasGetConnectStatus(hrasconn: THRasConn;
var lprasconnstatus: TRasConnStatus): DWORD; stdcall;
{$EXTERNALSYM RasGetConnectStatus}

function RasGetErrorStringA(uErrorValue: UINT; lpszErrorString: PAnsiChar;
cBufSize: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasGetErrorStringA}
function RasGetErrorStringW(uErrorValue: UINT; lpszErrorString: PWideChar;
cBufSize: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasGetErrorStringW}
function RasGetErrorString(uErrorValue: UINT; lpszErrorString: PChar;
cBufSize: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasGetErrorString}

function RasHangUpA(hrasconn: THRasConn): DWORD; stdcall;
{$EXTERNALSYM RasHangUpA}
function RasHangUpW(hrasconn: THRasConn): DWORD; stdcall;
{$EXTERNALSYM RasHangUpW}
function RasHangUp(hrasconn: THRasConn): DWORD; stdcall;
{$EXTERNALSYM RasHangUp}

function RasGetProjectionInfoA(hrasconn: THRasConn; rasprojection: TRasProjection;
lpprojection: Pointer; var lpcb: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasGetProjectionInfoA}
function RasGetProjectionInfoW(hrasconn: THRasConn; rasprojection: TRasProjection;
lpprojection: Pointer; var lpcb: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasGetProjectionInfoW}
function RasGetProjectionInfo(hrasconn: THRasConn; rasprojection: TRasProjection;
lpprojection: Pointer; var lpcb: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasGetProjectionInfo}

function RasCreatePhonebookEntryA(hwnd: HWND; lpszPhonebook: PAnsiChar): DWORD; stdcall;
{$EXTERNALSYM RasCreatePhonebookEntryA}
function RasCreatePhonebookEntryW(hwnd: HWND; lpszPhonebook: PWideChar): DWORD; stdcall;
{$EXTERNALSYM RasCreatePhonebookEntryW}
function RasCreatePhonebookEntry(hwnd: HWND; lpszPhonebook: PChar): DWORD; stdcall;
{$EXTERNALSYM RasCreatePhonebookEntry}

function RasEditPhonebookEntryA(hwnd: HWND; lpszPhonebook: PAnsiChar;
lpszEntryName: PAnsiChar): DWORD; stdcall;
{$EXTERNALSYM RasEditPhonebookEntryA}
function RasEditPhonebookEntryW(hwnd: HWND; lpszPhonebook: PWideChar;
lpszEntryName: PWideChar): DWORD; stdcall;
{$EXTERNALSYM RasEditPhonebookEntryW}
function RasEditPhonebookEntry(hwnd: HWND; lpszPhonebook: PChar;
lpszEntryName: PChar): DWORD; stdcall;
{$EXTERNALSYM RasEditPhonebookEntry}

function RasSetEntryDialParamsA(lpszPhonebook: PAnsiChar;
lprasdialparams: PRasDialParamsA; fRemovePassword: BOOL): DWORD; stdcall;
{$EXTERNALSYM RasSetEntryDialParamsA}
function RasSetEntryDialParamsW(lpszPhonebook: PWideChar;
lprasdialparams: PRasDialParamsW; fRemovePassword: BOOL): DWORD; stdcall;
{$EXTERNALSYM RasSetEntryDialParamsW}
function RasSetEntryDialParams(lpszPhonebook: PChar;
lprasdialparams: PRasDialParams; fRemovePassword: BOOL): DWORD; stdcall;
{$EXTERNALSYM RasSetEntryDialParams}

function RasGetEntryDialParamsA(lpszPhonebook: PAnsiChar;
var lprasdialparams: TRasDialParamsA; var lpfPassword: BOOL): DWORD; stdcall;
{$EXTERNALSYM RasGetEntryDialParamsA}
function RasGetEntryDialParamsW(lpszPhonebook: PWideChar;
var lprasdialparams: TRasDialParamsW; var lpfPassword: BOOL): DWORD; stdcall;
{$EXTERNALSYM RasGetEntryDialParamsW}
function RasGetEntryDialParams(lpszPhonebook: PChar;
var lprasdialparams: TRasDialParams; var lpfPassword: BOOL): DWORD; stdcall;
{$EXTERNALSYM RasGetEntryDialParams}

function RasEnumDevicesA(lpRasDevInfo: PRasDevInfoA; var lpcb: DWORD;
var lpcDevices: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasEnumDevicesA}
function RasEnumDevicesW(lpRasDevInfo: PRasDevInfoW; var lpcb: DWORD;
var lpcDevices: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasEnumDevicesW}
function RasEnumDevices(lpRasDevInfo: PRasDevInfo; var lpcb: DWORD;
var lpcDevices: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasEnumDevices}

function RasGetCountryInfoA(var lpRasCtryInfo: TRasCtryInfoA;
var lpdwSize: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasGetCountryInfoA}
function RasGetCountryInfoW(var lpRasCtryInfo: TRasCtryInfoW;
var lpdwSize: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasGetCountryInfoW}
function RasGetCountryInfo(var lpRasCtryInfo: TRasCtryInfo;
var lpdwSize: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasGetCountryInfo}

function RasGetEntryPropertiesA(lpszPhonebook: PAnsiChar; lpszEntry: PAnsiChar;
lpRasEntry: PRasEntryA; var lpdwEntryInfoSize: DWORD;
lpbDeviceInfo: Pointer; lpdwDeviceInfoSize: PDWORD): DWORD; stdcall;
{$EXTERNALSYM RasGetEntryPropertiesA}
function RasGetEntryPropertiesW(lpszPhonebook: PWideChar; lpszEntry: PWideChar;
lpRasEntry: PRasEntryW; var lpdwEntryInfoSize: DWORD;
lpbDeviceInfo: Pointer; lpdwDeviceInfoSize: PDWORD): DWORD; stdcall;
{$EXTERNALSYM RasGetEntryPropertiesW}
function RasGetEntryProperties(lpszPhonebook: PChar; lpszEntry: PChar;
lpRasEntry: PRasEntry; var lpdwEntryInfoSize: DWORD;
lpbDeviceInfo: Pointer; lpdwDeviceInfoSize: PDWORD): DWORD; stdcall;
{$EXTERNALSYM RasGetEntryProperties}

function RasSetEntryPropertiesA(lpszPhonebook: PAnsiChar; lpszEntry: PAnsiChar;
lpRasEntry: PRasEntryA; dwEntryInfoSize: DWORD;
lpbDeviceInfo: Pointer; lpdwDeviceInfoSize: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasSetEntryPropertiesA}
function RasSetEntryPropertiesW(lpszPhonebook: PWideChar; lpszEntry: PWideChar;
lpRasEntry: PRasEntryW; dwEntryInfoSize: DWORD;
lpbDeviceInfo: Pointer; lpdwDeviceInfoSize: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasSetEntryPropertiesW}
function RasSetEntryProperties(lpszPhonebook: PChar; lpszEntry: PChar;
lpRasEntry: PRasEntry; dwEntryInfoSize: DWORD;
lpbDeviceInfo: Pointer; lpdwDeviceInfoSize: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasSetEntryProperties}

function RasRenameEntryA(lpszPhonebook: PAnsiChar; lpszOldEntry: PAnsiChar;
lpszNewEntry: PAnsiChar): DWORD; stdcall;
{$EXTERNALSYM RasRenameEntryA}
function RasRenameEntryW(lpszPhonebook: PWideChar; lpszOldEntry: PWideChar;
lpszNewEntry: PWideChar): DWORD; stdcall;
{$EXTERNALSYM RasRenameEntryW}
function RasRenameEntry(lpszPhonebook: PChar; lpszOldEntry: PChar;
lpszNewEntry: PChar): DWORD; stdcall;
{$EXTERNALSYM RasRenameEntry}

function RasDeleteEntryA(lpszPhonebook, lpszEntry: PAnsiChar): DWORD; stdcall;
{$EXTERNALSYM RasDeleteEntryA}
function RasDeleteEntryW(lpszPhonebook, lpszEntry: PWideChar): DWORD; stdcall;
{$EXTERNALSYM RasDeleteEntryW}
function RasDeleteEntry(lpszPhonebook, lpszEntry: PChar): DWORD; stdcall;
{$EXTERNALSYM RasDeleteEntry}

function RasValidateEntryNameA(lpszPhonebook, lpszEntry: PAnsiChar): DWORD; stdcall;
{$EXTERNALSYM RasValidateEntryNameA}
function RasValidateEntryNameW(lpszPhonebook, lpszEntry: PWideChar): DWORD; stdcall;
{$EXTERNALSYM RasValidateEntryNameW}
function RasValidateEntryName(lpszPhonebook, lpszEntry: PChar): DWORD; stdcall;
{$EXTERNALSYM RasValidateEntryName}

{$IFDEF WINVER_0x401_OR_GREATER}

function RasGetSubEntryHandleA(hrasconn: THRasConn; dwSubEntry: DWORD;
var lphrasconn: TRasConnA): DWORD; stdcall;
{$EXTERNALSYM RasGetSubEntryHandleA}
function RasGetSubEntryHandleW(hrasconn: THRasConn; dwSubEntry: DWORD;
var lphrasconn: TRasConnW): DWORD; stdcall;
{$EXTERNALSYM RasGetSubEntryHandleW}
function RasGetSubEntryHandle(hrasconn: THRasConn; dwSubEntry: DWORD;
var lphrasconn: TRasConn): DWORD; stdcall;
{$EXTERNALSYM RasGetSubEntryHandle}

function RasGetCredentialsA(lpszPhonebook, lpszEntry: PAnsiChar;
var lpCredentials: TRasCredentialsA): DWORD; stdcall;
{$EXTERNALSYM RasGetCredentialsA}
function RasGetCredentialsW(lpszPhonebook, lpszEntry: PWideChar;
var lpCredentials: TRasCredentialsW): DWORD; stdcall;
{$EXTERNALSYM RasGetCredentialsW}
function RasGetCredentials(lpszPhonebook, lpszEntry: PChar;
var lpCredentials: TRasCredentials): DWORD; stdcall;
{$EXTERNALSYM RasGetCredentials}

function RasSetCredentialsA(lpszPhonebook, lpszEntry: PAnsiChar;
lpCredentials: PRasCredentialsA; fClearCredentials: BOOL): DWORD; stdcall;
{$EXTERNALSYM RasSetCredentialsA}
function RasSetCredentialsW(lpszPhonebook, lpszEntry: PWideChar;
lpCredentials: PRasCredentialsW; fClearCredentials: BOOL): DWORD; stdcall;
{$EXTERNALSYM RasSetCredentialsW}
function RasSetCredentials(lpszPhonebook, lpszEntry: PChar;
lpCredentials: PRasCredentials; fClearCredentials: BOOL): DWORD; stdcall;
{$EXTERNALSYM RasSetCredentials}

function RasConnectionNotificationA(hrasconn: THRasConn; hEvent: THandle;
dwFlags: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasConnectionNotificationA}
function RasConnectionNotificationW(hrasconn: THRasConn; hEvent: THandle;
dwFlags: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasConnectionNotificationW}
function RasConnectionNotification(hrasconn: THRasConn; hEvent: THandle;
dwFlags: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasConnectionNotification}

function RasGetSubEntryPropertiesA(lpszPhonebook, lpszEntry: PAnsiChar;
dwSubEntry: DWORD; var lpRasSubEntry: TRasSubEntryA; var lpdwcb: DWORD;
lpbDeviceConfig: Pointer; var lpcbDeviceConfig: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasGetSubEntryPropertiesA}
function RasGetSubEntryPropertiesW(lpszPhonebook, lpszEntry: PWideChar;
dwSubEntry: DWORD; var lpRasSubEntry: TRasSubEntryW; var lpdwcb: DWORD;
lpbDeviceConfig: Pointer; var lpcbDeviceConfig: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasGetSubEntryPropertiesW}
function RasGetSubEntryProperties(lpszPhonebook, lpszEntry: PChar;
dwSubEntry: DWORD; var lpRasSubEntry: TRasSubEntry; var lpdwcb: DWORD;
lpbDeviceConfig: Pointer; var lpcbDeviceConfig: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasGetSubEntryProperties}

function RasSetSubEntryPropertiesA(lpszPhonebook, lpszEntry: PAnsiChar;
dwSubEntry: DWORD; lpRasSubEntry: PRasSubEntryA; dwcbRasSubEntry: DWORD;
lpbDeviceConfig: Pointer; lpcbDeviceConfig: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasSetSubEntryPropertiesA}
function RasSetSubEntryPropertiesW(lpszPhonebook, lpszEntry: PWideChar;
dwSubEntry: DWORD; lpRasSubEntry: PRasSubEntryW; dwcbRasSubEntry: DWORD;
lpbDeviceConfig: Pointer; lpcbDeviceConfig: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasSetSubEntryPropertiesW}
function RasSetSubEntryProperties(lpszPhonebook, lpszEntry: PChar;
dwSubEntry: DWORD; lpRasSubEntry: PRasSubEntry; dwcbRasSubEntry: DWORD;
lpbDeviceConfig: Pointer; lpcbDeviceConfig: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasSetSubEntryProperties}

function RasGetAutodialAddressA(lpszAddress: PAnsiChar; lpdwReserved: PDWORD;
lpAutoDialEntries: PRasAutodialEntryA; var lpdwcbAutoDialEntries: DWORD;
var lpdwcAutoDialEntries: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasGetAutodialAddressA}
function RasGetAutodialAddressW(lpszAddress: PWideChar; lpdwReserved: PDWORD;
lpAutoDialEntries: PRasAutodialEntryW; var lpdwcbAutoDialEntries: DWORD;
var lpdwcAutoDialEntries: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasGetAutodialAddressW}
function RasGetAutodialAddress(lpszAddress: PChar; lpdwReserved: PDWORD;
lpAutoDialEntries: PRasAutodialEntry; var lpdwcbAutoDialEntries: DWORD;
var lpdwcAutoDialEntries: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasGetAutodialAddress}

function RasSetAutodialAddressA(lpszAddress: PAnsiChar; dwReserved: DWORD;
lpAutoDialEntries: PRasAutodialEntryA; dwcbAutoDialEntries: DWORD;
dwcAutoDialEntries: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasSetAutodialAddressA}
function RasSetAutodialAddressW(lpszAddress: PWideChar; dwReserved: DWORD;
lpAutoDialEntries: PRasAutodialEntryW; dwcbAutoDialEntries: DWORD;
dwcAutoDialEntries: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasSetAutodialAddressW}
function RasSetAutodialAddress(lpszAddress: PChar; dwReserved: DWORD;
lpAutoDialEntries: PRasAutodialEntry; dwcbAutoDialEntries: DWORD;
dwcAutoDialEntries: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasSetAutodialAddress}

function RasEnumAutodialAddressesA(lppAddresses: Pointer;
var lpdwcbAddresses: DWORD; var lpdwcAddresses: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasEnumAutodialAddressesA}
function RasEnumAutodialAddressesW(lppAddresses: Pointer;
var lpdwcbAddresses: DWORD; var lpdwcAddresses: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasEnumAutodialAddressesW}
function RasEnumAutodialAddresses(lppAddresses: Pointer;
var lpdwcbAddresses: DWORD; var lpdwcAddresses: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasEnumAutodialAddresses}

function RasGetAutodialEnableA(dwDialingLocation: DWORD;
var lpfEnabled: BOOL): DWORD; stdcall;
{$EXTERNALSYM RasGetAutodialEnableA}
function RasGetAutodialEnableW(dwDialingLocation: DWORD;
var lpfEnabled: BOOL): DWORD; stdcall;
{$EXTERNALSYM RasGetAutodialEnableW}
function RasGetAutodialEnable(dwDialingLocation: DWORD;
var lpfEnabled: BOOL): DWORD; stdcall;
{$EXTERNALSYM RasGetAutodialEnable}

function RasSetAutodialEnableA(dwDialingLocation: DWORD;
fEnabled: BOOL): DWORD; stdcall;
{$EXTERNALSYM RasSetAutodialEnableA}
function RasSetAutodialEnableW(dwDialingLocation: DWORD;
fEnabled: BOOL): DWORD; stdcall;
{$EXTERNALSYM RasSetAutodialEnableW}
function RasSetAutodialEnable(dwDialingLocation: DWORD;
fEnabled: BOOL): DWORD; stdcall;
{$EXTERNALSYM RasSetAutodialEnable}

function RasGetAutodialParamA(dwKey: DWORD; lpvValue: Pointer;
var lpdwcbValue: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasGetAutodialParamA}
function RasGetAutodialParamW(dwKey: DWORD; lpvValue: Pointer;
var lpdwcbValue: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasGetAutodialParamW}
function RasGetAutodialParam(dwKey: DWORD; lpvValue: Pointer;
var lpdwcbValue: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasGetAutodialParam}

function RasSetAutodialParamA(dwKey: DWORD; lpvValue: Pointer;
dwcbValue: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasSetAutodialParamA}
function RasSetAutodialParamW(dwKey: DWORD; lpvValue: Pointer;
dwcbValue: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasSetAutodialParamW}
function RasSetAutodialParam(dwKey: DWORD; lpvValue: Pointer;
dwcbValue: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasSetAutodialParam}

{$ENDIF}

{$IFDEF WINVER_0x500_OR_GREATER}
type
PRasStats = ^TRasStats;
_RAS_STATS = record
dwSize: DWORD;
dwBytesXmited: DWORD;
dwBytesRcved: DWORD;
dwFramesXmited: DWORD;
dwFramesRcved: DWORD;
dwCrcErr: DWORD;
dwTimeoutErr: DWORD;
dwAlignmentErr: DWORD;
dwHardwareOverrunErr: DWORD;
dwFramingErr: DWORD;
dwBufferOverrunErr: DWORD;
dwCompressionRatioIn: DWORD;
dwCompressionRatioOut: DWORD;
dwBps: DWORD;
dwConnectDuration: DWORD;
end;
{$EXTERNALSYM _RAS_STATS}
TRasStats = _RAS_STATS;
RAS_STATS = _RAS_STATS;
{$EXTERNALSYM RAS_STATS}

RasCustomHangUpFnA = function(hRasConn: THRasConn): DWORD; stdcall;
{$EXTERNALSYM RasCustomHangUpFnA}
RasCustomHangUpFnW = function(hRasConn: THRasConn): DWORD; stdcall;
{$EXTERNALSYM RasCustomHangUpFnW}
RasCustomHangUpFn = RasCustomHangUpFnA;

RasCustomDialFnA = function (hInstDll: THandle;
lpRasDialExtensions: PRasDialExtensions; lpszPhonebook: PAnsiChar;
lpRasDialParams: PRasDialParams; dwNotifierType: DWORD; lpvNotifier: Pointer;
var lphRasConn: THRasConn; dwFlags: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasCustomDialFnA}
RasCustomDialFnW = function (hInstDll: THandle;
lpRasDialExtensions: PRasDialExtensions; lpszPhonebook: PWideChar;
lpRasDialParams: PRasDialParams; dwNotifierType: DWORD; lpvNotifier: Pointer;
var lphRasConn: THRasConn; dwFlags: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasCustomDialFnW}
RasCustomDialFn = RasCustomDialFnA;

RasCustomDeleteEntryNotifyFnA = function (lpszPhonebook, lpszEntry: PAnsiChar;
dwFlags: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasCustomDeleteEntryNotifyFnA}
RasCustomDeleteEntryNotifyFnW = function (lpszPhonebook, lpszEntry: PWideChar;
dwFlags: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasCustomDeleteEntryNotifyFnW}
RasCustomDeleteEntryNotifyFn = RasCustomDeleteEntryNotifyFnA;

const
RCD_SingleUser = 0;
{$EXTERNALSYM RCD_SingleUser}
RCD_AllUsers = $00000001;
{$EXTERNALSYM RCD_AllUsers}
RCD_Eap = $00000002;
{$EXTERNALSYM RCD_Eap}

function RasInvokeEapUI(hRasConn: THRasConn; dwSubEntry: DWORD;
lpExtensions: PRasDialExtensions; hwnd: HWND): DWORD; stdcall;
{$EXTERNALSYM RasInvokeEapUI}

function RasGetLinkStatistics(hRasConn: THRasConn; dwSubEntry: DWORD;
var lpStatistics: TRasStats): DWORD; stdcall;
{$EXTERNALSYM RasGetLinkStatistics}

function RasGetConnectionStatistics(hRasConn: THRasConn;
var lpStatistics: TRasStats): DWORD; stdcall;
{$EXTERNALSYM RasGetConnectionStatistics}

function RasClearLinkStatistics(hRasConn: THRasConn;
dwSubEntry: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasClearLinkStatistics}

function RasClearConnectionStatistics(hRasConn: THRasConn): DWORD; stdcall;
{$EXTERNALSYM RasClearConnectionStatistics}

function RasGetEapUserDataA(hToken: THandle; pszPhonebook, pszEntry: PAnsiChar;
pbEapData: Pointer; var pdwSizeofEapData: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasGetEapUserDataA}
function RasGetEapUserDataW(hToken: THandle; pszPhonebook, pszEntry: PAnsiChar;
pbEapData: Pointer; var pdwSizeofEapData: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasGetEapUserDataW}
function RasGetEapUserData(hToken: THandle; pszPhonebook, pszEntry: PAnsiChar;
pbEapData: Pointer; var pdwSizeofEapData: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasGetEapUserData}

function RasSetEapUserDataA(hToken: THandle; pszPhonebook, pszEntry: PAnsiChar;
pbEapData: Pointer; pdwSizeofEapData: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasSetEapUserDataA}
function RasSetEapUserDataW(hToken: THandle; pszPhonebook, pszEntry: PAnsiChar;
pbEapData: Pointer; pdwSizeofEapData: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasSetEapUserDataW}
function RasSetEapUserData(hToken: THandle; pszPhonebook, pszEntry: PAnsiChar;
pbEapData: Pointer; pdwSizeofEapData: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasSetEapUserData}

function RasGetCustomAuthDataA(pszPhonebook, pszEntry: PAnsiChar;
pbCustomAuthData: Pointer; var pdwSizeofCustomAuthData: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasGetCustomAuthDataA}
function RasGetCustomAuthDataW(pszPhonebook, pszEntry: PAnsiChar;
pbCustomAuthData: Pointer; var pdwSizeofCustomAuthData: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasGetCustomAuthDataW}
function RasGetCustomAuthData(pszPhonebook, pszEntry: PAnsiChar;
pbCustomAuthData: Pointer; var pdwSizeofCustomAuthData: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasGetCustomAuthData}

function RasSetCustomAuthDataA(pszPhonebook, pszEntry: PAnsiChar;
pbCustomAuthData: Pointer; pdwSizeofCustomAuthData: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasSetCustomAuthDataA}
function RasSetCustomAuthDataW(pszPhonebook, pszEntry: PAnsiChar;
pbCustomAuthData: Pointer; pdwSizeofCustomAuthData: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasSetCustomAuthDataW}
function RasSetCustomAuthData(pszPhonebook, pszEntry: PAnsiChar;
pbCustomAuthData: Pointer; pdwSizeofCustomAuthData: DWORD): DWORD; stdcall;
{$EXTERNALSYM RasSetCustomAuthData}

function RasGetEapUserIdentityA(pszPhonebook, pszEntry: PAnsiChar; dwFlags: DWORD;
hwnd: HWND; ppRasEapUserIdentity: PRasEapUserIdentityA): DWORD; stdcall;
{$EXTERNALSYM RasGetEapUserIdentityA}
function RasGetEapUserIdentityW(pszPhonebook, pszEntry: PAnsiChar; dwFlags: DWORD;
hwnd: HWND; ppRasEapUserIdentity: PRasEapUserIdentityW): DWORD; stdcall;
{$EXTERNALSYM RasGetEapUserIdentityW}
function RasGetEapUserIdentity(pszPhonebook, pszEntry: PAnsiChar; dwFlags: DWORD;
hwnd: HWND; ppRasEapUserIdentity: PRasEapUserIdentity): DWORD; stdcall;
{$EXTERNALSYM RasGetEapUserIdentity}

function RasFreeEapUserIdentityA(pRasEapUserIdentity: PRasEapUserIdentityA): DWORD; stdcall;
{$EXTERNALSYM RasFreeEapUserIdentityA}
function RasFreeEapUserIdentityW(pRasEapUserIdentity: PRasEapUserIdentityW): DWORD; stdcall;
{$EXTERNALSYM RasFreeEapUserIdentityW}
function RasFreeEapUserIdentity(pRasEapUserIdentity: PRasEapUserIdentity): DWORD; stdcall;
{$EXTERNALSYM RasFreeEapUserIdentity}

{$ENDIF}

implementation

const
raslib = 'rasapi32.dll';

function RasDialA; external raslib name 'RasDialA';
function RasDialW; external raslib name 'RasDialW';
function RasDial; external raslib name 'RasDialA';
function RasEnumConnectionsA; external raslib name 'RasEnumConnectionsA';
function RasEnumConnectionsW; external raslib name 'RasEnumConnectionsW';
function RasEnumConnections; external raslib name 'RasEnumConnectionsA';
function RasEnumEntriesA; external raslib name 'RasEnumEntriesA';
function RasEnumEntriesW; external raslib name 'RasEnumEntriesW';
function RasEnumEntries; external raslib name 'RasEnumEntriesA';
function RasGetConnectStatusA; external raslib name 'RasGetConnectStatusA';
function RasGetConnectStatusW; external raslib name 'RasGetConnectStatusW';
function RasGetConnectStatus; external raslib name 'RasGetConnectStatusA';
function RasGetErrorStringA; external raslib name 'RasGetErrorStringA';
function RasGetErrorStringW; external raslib name 'RasGetErrorStringW';
function RasGetErrorString; external raslib name 'RasGetErrorStringA';
function RasHangUpA; external raslib name 'RasHangUpA';
function RasHangUpW; external raslib name 'RasHangUpW';
function RasHangUp; external raslib name 'RasHangUpA';
function RasGetProjectionInfoA; external raslib name 'RasGetProjectionInfoA';
function RasGetProjectionInfoW; external raslib name 'RasGetProjectionInfoW';
function RasGetProjectionInfo; external raslib name 'RasGetProjectionInfoA';
function RasCreatePhonebookEntryA; external raslib name 'RasCreatePhonebookEntryA';
function RasCreatePhonebookEntryW; external raslib name 'RasCreatePhonebookEntryW';
function RasCreatePhonebookEntry; external raslib name 'RasCreatePhonebookEntryA';
function RasEditPhonebookEntryA; external raslib name 'RasEditPhonebookEntryA';
function RasEditPhonebookEntryW; external raslib name 'RasEditPhonebookEntryW';
function RasEditPhonebookEntry; external raslib name 'RasEditPhonebookEntryA';
function RasSetEntryDialParamsA; external raslib name 'RasSetEntryDialParamsA';
function RasSetEntryDialParamsW; external raslib name 'RasSetEntryDialParamsW';
function RasSetEntryDialParams; external raslib name 'RasSetEntryDialParamsA';
function RasGetEntryDialParamsA; external raslib name 'RasGetEntryDialParamsA';
function RasGetEntryDialParamsW; external raslib name 'RasGetEntryDialParamsW';
function RasGetEntryDialParams; external raslib name 'RasGetEntryDialParamsA';
function RasEnumDevicesA; external raslib name 'RasEnumDevicesA';
function RasEnumDevicesW; external raslib name 'RasEnumDevicesW';
function RasEnumDevices; external raslib name 'RasEnumDevicesA';
function RasGetCountryInfoA; external raslib name 'RasGetCountryInfoA';
function RasGetCountryInfoW; external raslib name 'RasGetCountryInfoW';
function RasGetCountryInfo; external raslib name 'RasGetCountryInfoA';
function RasGetEntryPropertiesA; external raslib name 'RasGetEntryPropertiesA';
function RasGetEntryPropertiesW; external raslib name 'RasGetEntryPropertiesW';
function RasGetEntryProperties; external raslib name 'RasGetEntryPropertiesA';
function RasSetEntryPropertiesA; external raslib name 'RasSetEntryPropertiesA';
function RasSetEntryPropertiesW; external raslib name 'RasSetEntryPropertiesW';
function RasSetEntryProperties; external raslib name 'RasSetEntryPropertiesA';
function RasRenameEntryA; external raslib name 'RasRenameEntryA';
function RasRenameEntryW; external raslib name 'RasRenameEntryW';
function RasRenameEntry; external raslib name 'RasRenameEntryA';
function RasDeleteEntryA; external raslib name 'RasDeleteEntryA';
function RasDeleteEntryW; external raslib name 'RasDeleteEntryW';
function RasDeleteEntry; external raslib name 'RasDeleteEntryA';
function RasValidateEntryNameA; external raslib name 'RasValidateEntryNameA';
function RasValidateEntryNameW; external raslib name 'RasValidateEntryNameW';
function RasValidateEntryName; external raslib name 'RasValidateEntryNameA';

{$IFDEF WINVER_0x401_OR_GREATER}
function RasGetSubEntryHandleA; external raslib name 'RasGetSubEntryHandleA';
function RasGetSubEntryHandleW; external raslib name 'RasGetSubEntryHandleW';
function RasGetSubEntryHandle; external raslib name 'RasGetSubEntryHandleA';
function RasConnectionNotificationA; external raslib name 'RasConnectionNotificationA';
function RasConnectionNotificationW; external raslib name 'RasConnectionNotificationW';
function RasConnectionNotification; external raslib name 'RasConnectionNotificationA';
function RasGetSubEntryPropertiesA; external raslib name 'RasGetSubEntryPropertiesA';
function RasGetSubEntryPropertiesW; external raslib name 'RasGetSubEntryPropertiesW';
function RasGetSubEntryProperties; external raslib name 'RasGetSubEntryPropertiesA';
function RasSetSubEntryPropertiesA; external raslib name 'RasSetSubEntryPropertiesA';
function RasSetSubEntryPropertiesW; external raslib name 'RasSetSubEntryPropertiesW';
function RasSetSubEntryProperties; external raslib name 'RasSetSubEntryPropertiesA';
function RasGetCredentialsA; external raslib name 'RasGetCredentialsA';
function RasGetCredentialsW; external raslib name 'RasGetCredentialsW';
function RasGetCredentials; external raslib name 'RasGetCredentialsA';
function RasSetCredentialsA; external raslib name 'RasSetCredentialsA';
function RasSetCredentialsW; external raslib name 'RasSetCredentialsW';
function RasSetCredentials; external raslib name 'RasSetCredentialsA';
function RasGetAutodialAddressA; external raslib name 'RasGetAutodialAddressA';
function RasGetAutodialAddressW; external raslib name 'RasGetAutodialAddressW';
function RasGetAutodialAddress; external raslib name 'RasGetAutodialAddressA';
function RasSetAutodialAddressA; external raslib name 'RasSetAutodialAddressA';
function RasSetAutodialAddressW; external raslib name 'RasSetAutodialAddressW';
function RasSetAutodialAddress; external raslib name 'RasSetAutodialAddressA';
function RasEnumAutodialAddressesA; external raslib name 'RasEnumAutodialAddressesA';
function RasEnumAutodialAddressesW; external raslib name 'RasEnumAutodialAddressesW';
function RasEnumAutodialAddresses; external raslib name 'RasEnumAutodialAddressesA';
function RasGetAutodialEnableA; external raslib name 'RasGetAutodialEnableA';
function RasGetAutodialEnableW; external raslib name 'RasGetAutodialEnableW';
function RasGetAutodialEnable; external raslib name 'RasGetAutodialEnableA';
function RasSetAutodialEnableA; external raslib name 'RasSetAutodialEnableA';
function RasSetAutodialEnableW; external raslib name 'RasSetAutodialEnableW';
function RasSetAutodialEnable; external raslib name 'RasSetAutodialEnableA';
function RasGetAutodialParamA; external raslib name 'RasGetAutodialParamA';
function RasGetAutodialParamW; external raslib name 'RasGetAutodialParamW';
function RasGetAutodialParam; external raslib name 'RasGetAutodialParamA';
function RasSetAutodialParamA; external raslib name 'RasSetAutodialParamA';
function RasSetAutodialParamW; external raslib name 'RasSetAutodialParamW';
function RasSetAutodialParam; external raslib name 'RasSetAutodialParamA';
{$ENDIF}

{$IFDEF WINVER_0x500_OR_GREATER}

function RasInvokeEapUI; external raslib name 'RasInvokeEapUI';
function RasGetLinkStatistics; external raslib name 'RasGetLinkStatistics';
function RasGetConnectionStatistics; external raslib name 'RasGetConnectionStatistics';
function RasClearLinkStatistics; external raslib name 'RasClearLinkStatistics';
function RasClearConnectionStatistics; external raslib name 'RasClearConnectionStatistics';
function RasGetEapUserDataA; external raslib name 'RasGetEapUserDataA';
function RasGetEapUserDataW; external raslib name 'RasGetEapUserDataW';
function RasGetEapUserData; external raslib name 'RasGetEapUserDataA';
function RasSetEapUserDataA; external raslib name 'RasSetEapUserDataA';
function RasSetEapUserDataW; external raslib name 'RasSetEapUserDataW';
function RasSetEapUserData; external raslib name 'RasSetEapUserDataA';
function RasGetCustomAuthDataA; external raslib name 'RasGetCustomAuthDataA';
function RasGetCustomAuthDataW; external raslib name 'RasGetCustomAuthDataW';
function RasGetCustomAuthData; external raslib name 'RasGetCustomAuthDataA';
function RasSetCustomAuthDataA; external raslib name 'RasSetCustomAuthDataA';
function RasSetCustomAuthDataW; external raslib name 'RasSetCustomAuthDataW';
function RasSetCustomAuthData; external raslib name 'RasSetCustomAuthDataA';
function RasGetEapUserIdentityA; external raslib name 'RasGetEapUserIdentityA';
function RasGetEapUserIdentityW; external raslib name 'RasGetEapUserIdentityW';
function RasGetEapUserIdentity; external raslib name 'RasGetEapUserIdentityA';
function RasFreeEapUserIdentityA; external raslib name 'RasFreeEapUserIdentityA';
function RasFreeEapUserIdentityW; external raslib name 'RasFreeEapUserIdentityW';
function RasFreeEapUserIdentity; external raslib name 'RasFreeEapUserIdentityA';

{$ENDIF}

end.

----------------------------------------------------------
 
[Fatal Error] ras.pas(12): File not found: 'LmCons.dcu'
 
{******************************************************************}
{ }
{ Borland Delphi Runtime Library }
{ LanManager constants interface unit }
{ }
{ Portions created by Microsoft are }
{ Copyright (C) 1995-1999 Microsoft Corporation. }
{ All Rights Reserved. }
{ }
{ The original file is: lmcons.h, released 15 Mar 1999. }
{ The original Pascal code is: LmCons.pas, released 29 Dec 1999. }
{ The initial developer of the Pascal code is Petr Vones }
{ (petr.v@mujmail.cz). }
{ }
{ Portions created by Petr Vones are }
{ Copyright (C) 1999 Petr Vones }
{ }
{ Obtained through: }
{ }
{ Joint Endeavour of Delphi Innovators (Project JEDI) }
{ }
{ You may retrieve the latest version of this file at the Project }
{ JEDI home page, located at http://delphi-jedi.org }
{ }
{ The contents of this file are used with permission, subject to }
{ the Mozilla Public License Version 1.1 (the &quot;License&quot;); you may }
{ not use this file except in compliance with the License. You may }
{ obtain a copy of the License at }
{ http://www.mozilla.org/MPL/MPL-1.1.html }
{ }
{ Software distributed under the License is distributed on an }
{ &quot;AS IS&quot; basis, WITHOUT WARRANTY OF ANY KIND, either express or }
{ implied. See the License for the specific language governing }
{ rights and limitations under the License. }
{ }
{******************************************************************}

unit Lmcons;

{$ALIGN ON}
{$MINENUMSIZE 4}
{$WEAKPACKAGEUNIT}

interface

uses
Windows, Lmerr;

(*$HPPEMIT '<lmcons.h>'*)

// String Lengths for various LanMan names

const
{$EXTERNALSYM CNLEN}
CNLEN = 15; // Computer name length
{$EXTERNALSYM LM20_CNLEN}
LM20_CNLEN = 15; // LM 2.0 Computer name length
{$EXTERNALSYM DNLEN}
DNLEN = CNLEN; // Maximum domain name length
{$EXTERNALSYM LM20_DNLEN}
LM20_DNLEN = LM20_CNLEN; // LM 2.0 Maximum domain name length

{$EXTERNALSYM UNCLEN}
UNCLEN = (CNLEN+2); // UNC computer name length
{$EXTERNALSYM LM20_UNCLEN}
LM20_UNCLEN = (LM20_CNLEN+2); // LM 2.0 UNC computer name length

{$EXTERNALSYM NNLEN}
NNLEN = 80; // Net name length (share name)
{$EXTERNALSYM LM20_NNLEN}
LM20_NNLEN = 12; // LM 2.0 Net name length

{$EXTERNALSYM RMLEN}
RMLEN = (UNCLEN+1+NNLEN); // Max remote name length
{$EXTERNALSYM LM20_RMLEN}
LM20_RMLEN = (LM20_UNCLEN+1+LM20_NNLEN); // LM 2.0 Max remote name length

{$EXTERNALSYM SNLEN}
SNLEN = 80; // Service name length
{$EXTERNALSYM LM20_SNLEN}
LM20_SNLEN = 15; // LM 2.0 Service name length
{$EXTERNALSYM STXTLEN}
STXTLEN = 256; // Service text length
{$EXTERNALSYM LM20_STXTLEN}
LM20_STXTLEN = 63; // LM 2.0 Service text length

{$EXTERNALSYM PATHLEN}
PATHLEN = 256; // Max. path (not including drive name)
{$EXTERNALSYM LM20_PATHLEN}
LM20_PATHLEN = 256; // LM 2.0 Max. path

{$EXTERNALSYM DEVLEN}
DEVLEN = 80; // Device name length
{$EXTERNALSYM LM20_DEVLEN}
LM20_DEVLEN = 8; // LM 2.0 Device name length

{$EXTERNALSYM EVLEN}
EVLEN = 16; // Event name length

// User, Group and Password lengths

{$EXTERNALSYM UNLEN}
UNLEN = 256; // Maximum user name length
{$EXTERNALSYM LM20_UNLEN}
LM20_UNLEN = 20; // LM 2.0 Maximum user name length

{$EXTERNALSYM GNLEN}
GNLEN = UNLEN; // Group name
{$EXTERNALSYM LM20_GNLEN}
LM20_GNLEN = LM20_UNLEN; // LM 2.0 Group name

{$EXTERNALSYM PWLEN}
PWLEN = 256; // Maximum password length
{$EXTERNALSYM LM20_PWLEN}
LM20_PWLEN = 14; // LM 2.0 Maximum password length

{$EXTERNALSYM SHPWLEN}
SHPWLEN = 8; // Share password length (bytes)

{$EXTERNALSYM CLTYPE_LEN}
CLTYPE_LEN = 12; // Length of client type string

{$EXTERNALSYM MAXCOMMENTSZ}
MAXCOMMENTSZ = 256; // Multipurpose comment length
{$EXTERNALSYM LM20_MAXCOMMENTSZ}
LM20_MAXCOMMENTSZ = 48; // LM 2.0 Multipurpose comment length

{$EXTERNALSYM QNLEN}
QNLEN = NNLEN; // Queue name maximum length
{$EXTERNALSYM LM20_QNLEN}
LM20_QNLEN = LM20_NNLEN; // LM 2.0 Queue name maximum length

// The ALERTSZ and MAXDEVENTRIES defines have not yet been NT'ized.
// Whoever ports these components should change these values appropriately.

{$EXTERNALSYM ALERTSZ}
ALERTSZ = 128; // size of alert string in server
{$EXTERNALSYM MAXDEVENTRIES}
MAXDEVENTRIES = (Sizeof(Integer)*8); // Max number of device entries

//
// We use int bitmap to represent
//

{$EXTERNALSYM NETBIOS_NAME_LEN}
NETBIOS_NAME_LEN = 16; // NetBIOS net name (bytes)

// Value to be used with APIs which have a &quot;preferred maximum length&quot;
// parameter. This value indicates that the API should just allocate
// &quot;as much as it takes.&quot;

{$EXTERNALSYM MAX_PREFERRED_LENGTH}
MAX_PREFERRED_LENGTH = DWORD(-1);

// Constants used with encryption

{$EXTERNALSYM CRYPT_KEY_LEN}
CRYPT_KEY_LEN = 7;
{$EXTERNALSYM CRYPT_TXT_LEN}
CRYPT_TXT_LEN = 8;
{$EXTERNALSYM ENCRYPTED_PWLEN}
ENCRYPTED_PWLEN = 16;
{$EXTERNALSYM SESSION_PWLEN}
SESSION_PWLEN = 24;
{$EXTERNALSYM SESSION_CRYPT_KLEN}
SESSION_CRYPT_KLEN = 21;

// Value to be used with SetInfo calls to allow setting of all
// settable parameters (parmnum zero option)

{$EXTERNALSYM PARMNUM_ALL}
PARMNUM_ALL = 0;

{$EXTERNALSYM PARM_ERROR_UNKNOWN}
PARM_ERROR_UNKNOWN = DWORD(-1);
{$EXTERNALSYM PARM_ERROR_NONE}
PARM_ERROR_NONE = 0;
{$EXTERNALSYM PARMNUM_BASE_INFOLEVEL}
PARMNUM_BASE_INFOLEVEL = 1000;

// Message File Names

{$EXTERNALSYM MESSAGE_FILENAME}
MESSAGE_FILENAME = 'NETMSG';
{$EXTERNALSYM OS2MSG_FILENAME}
OS2MSG_FILENAME = 'BASE';
{$EXTERNALSYM HELP_MSG_FILENAME}
HELP_MSG_FILENAME = 'NETH';

//**INTERNAL_ONLY**/

// The backup message file named here is a duplicate of net.msg. It
// is not shipped with the product, but is used at buildtime to
// msgbind certain messages to netapi.dll and some of the services.
// This allows for OEMs to modify the message text in net.msg and
// have those changes show up. Only in case there is an error in
// retrieving the messages from net.msg do we then get the bound
// messages out of bak.msg (really out of the message segment).

{$EXTERNALSYM BACKUP_MSG_FILENAME}
BACKUP_MSG_FILENAME = 'BAK.MSG';

//**END_INTERNAL**/

// Keywords used in Function Prototypes

type
{$EXTERNALSYM NET_API_STATUS}
NET_API_STATUS = DWORD;
{$EXTERNALSYM API_RET_TYPE}
API_RET_TYPE = NET_API_STATUS; // Old value: do not use

// The platform ID indicates the levels to use for platform-specific
// information.

const
{$EXTERNALSYM PLATFORM_ID_DOS}
PLATFORM_ID_DOS = 300;
{$EXTERNALSYM PLATFORM_ID_OS2}
PLATFORM_ID_OS2 = 400;
{$EXTERNALSYM PLATFORM_ID_NT}
PLATFORM_ID_NT = 500;
{$EXTERNALSYM PLATFORM_ID_OSF}
PLATFORM_ID_OSF = 600;
{$EXTERNALSYM PLATFORM_ID_VMS}
PLATFORM_ID_VMS = 700;

// There message numbers assigned to different LANMAN components
// are as defined below.
//
// lmerr.h: 2100 - 2999 NERR_BASE
// alertmsg.h: 3000 - 3049 ALERT_BASE
// lmsvc.h: 3050 - 3099 SERVICE_BASE
// lmerrlog.h: 3100 - 3299 ERRLOG_BASE
// msgtext.h: 3300 - 3499 MTXT_BASE
// apperr.h: 3500 - 3999 APPERR_BASE
// apperrfs.h: 4000 - 4299 APPERRFS_BASE
// apperr2.h: 4300 - 5299 APPERR2_BASE
// ncberr.h: 5300 - 5499 NRCERR_BASE
// alertmsg.h: 5500 - 5599 ALERT2_BASE
// lmsvc.h: 5600 - 5699 SERVICE2_BASE
// lmerrlog.h 5700 - 5799 ERRLOG2_BASE

{$EXTERNALSYM MIN_LANMAN_MESSAGE_ID}
MIN_LANMAN_MESSAGE_ID = NERR_BASE;
{$EXTERNALSYM MAX_LANMAN_MESSAGE_ID}
MAX_LANMAN_MESSAGE_ID = 5799;

const
netapi32lib = 'netapi32.dll';
{$NODEFINE netapi32lib}

implementation

end.



{******************************************************************}
{ }
{ Borland Delphi Runtime Library }
{ LanManager error constants interface unit }
{ }
{ Portions created by Microsoft are }
{ Copyright (C) 1995-1999 Microsoft Corporation. }
{ All Rights Reserved. }
{ }
{ The original file is: lmerr.h, released 15 Mar 1999. }
{ The original Pascal code is: LmErr.pas, released 29 Dec 1999. }
{ The initial developer of the Pascal code is Petr Vones }
{ (petr.v@mujmail.cz). }
{ }
{ Portions created by Petr Vones are }
{ Copyright (C) 1999 Petr Vones }
{ }
{ Obtained through: }
{ }
{ Joint Endeavour of Delphi Innovators (Project JEDI) }
{ }
{ You may retrieve the latest version of this file at the Project }
{ JEDI home page, located at http://delphi-jedi.org }
{ }
{ The contents of this file are used with permission, subject to }
{ the Mozilla Public License Version 1.1 (the &quot;License&quot;); you may }
{ not use this file except in compliance with the License. You may }
{ obtain a copy of the License at }
{ http://www.mozilla.org/MPL/MPL-1.1.html }
{ }
{ Software distributed under the License is distributed on an }
{ &quot;AS IS&quot; basis, WITHOUT WARRANTY OF ANY KIND, either express or }
{ implied. See the License for the specific language governing }
{ rights and limitations under the License. }
{ }
{******************************************************************}

unit LmErr;

{$ALIGN ON}
{$MINENUMSIZE 4}
{$WEAKPACKAGEUNIT}

interface

uses
Windows;

(*$HPPEMIT '#include <winerror.h>'*)
(*$HPPEMIT '#include <lmerr.h>'*)

const

{$EXTERNALSYM NERR_Success}
NERR_Success = 0;

{$EXTERNALSYM NERR_BASE}
NERR_BASE = 2100;

// **********WARNING ****************
// *The range 2750-2799 has been *
// *allocated to the IBM LAN Server *
// **********************************

// **********WARNING ****************
// *The range 2900-2999 has been *
// *reserved for Microsoft OEMs *
// **********************************

{$EXTERNALSYM NERR_NetNotStarted}
NERR_NetNotStarted = (NERR_BASE+2);
// The workstation driver is not installed.

{$EXTERNALSYM NERR_UnknownServer}
NERR_UnknownServer = (NERR_BASE+3);
// The server could not be located.

{$EXTERNALSYM NERR_ShareMem}
NERR_ShareMem = (NERR_BASE+4);
// An internal error occurred. The network cannot access a shared memory segment.


{$EXTERNALSYM NERR_NoNetworkResource}
NERR_NoNetworkResource = (NERR_BASE+5);
// A network resource shortage occurred .

{$EXTERNALSYM NERR_RemoteOnly}
NERR_RemoteOnly = (NERR_BASE+6);
// This operation is not supported on workstations.

{$EXTERNALSYM NERR_DevNotRedirected}
NERR_DevNotRedirected = (NERR_BASE+7);
// The device is not connected.

// NERR_BASE+8 is used for ERROR_CONNECTED_OTHER_PASSWORD

{$EXTERNALSYM NERR_ServerNotStarted}
NERR_ServerNotStarted = (NERR_BASE+14);
// The Server service is not started.

{$EXTERNALSYM NERR_ItemNotFound}
NERR_ItemNotFound = (NERR_BASE+15);
// The queue is empty.

{$EXTERNALSYM NERR_UnknownDevDir}
NERR_UnknownDevDir = (NERR_BASE+16);
// The device or directory does not exist.

{$EXTERNALSYM NERR_RedirectedPath}
NERR_RedirectedPath = (NERR_BASE+17);
// The operation is invalid on a redirected resource.

{$EXTERNALSYM NERR_DuplicateShare}
NERR_DuplicateShare = (NERR_BASE+18);
// The name has already been shared.

{$EXTERNALSYM NERR_NoRoom}
NERR_NoRoom = (NERR_BASE+19);
// The server is currently out of the requested resource.

{$EXTERNALSYM NERR_TooManyItems}
NERR_TooManyItems = (NERR_BASE+21);
// Requested addition of items exceeds the maximum allowed.

{$EXTERNALSYM NERR_InvalidMaxUsers}
NERR_InvalidMaxUsers = (NERR_BASE+22);
// The Peer service supports only two simultaneous users.

{$EXTERNALSYM NERR_BufTooSmall}
NERR_BufTooSmall = (NERR_BASE+23);
// The API return buffer is too small.

{$EXTERNALSYM NERR_RemoteErr}
NERR_RemoteErr = (NERR_BASE+27);
// A remote API error occurred.

{$EXTERNALSYM NERR_LanmanIniError}
NERR_LanmanIniError = (NERR_BASE+31);
// An error occurred when opening or reading the configuration file.

{$EXTERNALSYM NERR_NetworkError}
NERR_NetworkError = (NERR_BASE+36);
// A general network error occurred.

{$EXTERNALSYM NERR_WkstaInconsistentState}
NERR_WkstaInconsistentState = (NERR_BASE+37);
// The Workstation service is in an inconsistent state. Restart the computer before restarting the Workstation service.

{$EXTERNALSYM NERR_WkstaNotStarted}
NERR_WkstaNotStarted = (NERR_BASE+38);
// The Workstation service has not been started.

{$EXTERNALSYM NERR_BrowserNotStarted}
NERR_BrowserNotStarted = (NERR_BASE+39);
// The requested information is not available.

{$EXTERNALSYM NERR_InternalError}
NERR_InternalError = (NERR_BASE+40);
// An internal Windows NT error occurred.

{$EXTERNALSYM NERR_BadTransactConfig}
NERR_BadTransactConfig = (NERR_BASE+41);
// The server is not configured for transactions.

{$EXTERNALSYM NERR_InvalidAPI}
NERR_InvalidAPI = (NERR_BASE+42);
// The requested API is not supported on the remote server.

{$EXTERNALSYM NERR_BadEventName}
NERR_BadEventName = (NERR_BASE+43);
// The event name is invalid.

{$EXTERNALSYM NERR_DupNameReboot}
NERR_DupNameReboot = (NERR_BASE+44);
// The computer name already exists on the network. Change it and restart the computer.

// Config API related
// Error codes from BASE+45 to BASE+49

{$EXTERNALSYM NERR_CfgCompNotFound}
NERR_CfgCompNotFound = (NERR_BASE+46);
// The specified component could not be found in the configuration information.

{$EXTERNALSYM NERR_CfgParamNotFound}
NERR_CfgParamNotFound = (NERR_BASE+47);
// The specified parameter could not be found in the configuration information.

{$EXTERNALSYM NERR_LineTooLong}
NERR_LineTooLong = (NERR_BASE+49);
// A line in the configuration file is too long.


// Spooler API related
// Error codes from BASE+50 to BASE+79

{$EXTERNALSYM NERR_QNotFound}
NERR_QNotFound = (NERR_BASE+50);
// The printer does not exist.

{$EXTERNALSYM NERR_JobNotFound}
NERR_JobNotFound = (NERR_BASE+51);
// The print job does not exist.

{$EXTERNALSYM NERR_DestNotFound}
NERR_DestNotFound = (NERR_BASE+52);
// The printer destination cannot be found.

{$EXTERNALSYM NERR_DestExists}
NERR_DestExists = (NERR_BASE+53);
// The printer destination already exists.

{$EXTERNALSYM NERR_QExists}
NERR_QExists = (NERR_BASE+54);
// The printer queue already exists.

{$EXTERNALSYM NERR_QNoRoom}
NERR_QNoRoom = (NERR_BASE+55);
// No more printers can be added.

{$EXTERNALSYM NERR_JobNoRoom}
NERR_JobNoRoom = (NERR_BASE+56);
// No more print jobs can be added.

{$EXTERNALSYM NERR_DestNoRoom}
NERR_DestNoRoom = (NERR_BASE+57);
// No more printer destinations can be added.

{$EXTERNALSYM NERR_DestIdle}
NERR_DestIdle = (NERR_BASE+58);
// This printer destination is idle and cannot accept control operations.

{$EXTERNALSYM NERR_DestInvalidOp}
NERR_DestInvalidOp = (NERR_BASE+59);
// This printer destination request contains an invalid control function.

{$EXTERNALSYM NERR_ProcNoRespond}
NERR_ProcNoRespond = (NERR_BASE+60);
// The print processor is not responding.

{$EXTERNALSYM NERR_SpoolerNotLoaded}
NERR_SpoolerNotLoaded = (NERR_BASE+61);
// The spooler is not running.

{$EXTERNALSYM NERR_DestInvalidState}
NERR_DestInvalidState = (NERR_BASE+62);
// This operation cannot be performed on the print destination in its current state.

{$EXTERNALSYM NERR_QInvalidState}
NERR_QInvalidState = (NERR_BASE+63);
// This operation cannot be performed on the printer queue in its current state.

{$EXTERNALSYM NERR_JobInvalidState}
NERR_JobInvalidState = (NERR_BASE+64);
// This operation cannot be performed on the print job in its current state.

{$EXTERNALSYM NERR_SpoolNoMemory}
NERR_SpoolNoMemory = (NERR_BASE+65);
// A spooler memory allocation failure occurred.

{$EXTERNALSYM NERR_DriverNotFound}
NERR_DriverNotFound = (NERR_BASE+66);
// The device driver does not exist.

{$EXTERNALSYM NERR_DataTypeInvalid}
NERR_DataTypeInvalid = (NERR_BASE+67);
// The data type is not supported by the print processor.

{$EXTERNALSYM NERR_ProcNotFound}
NERR_ProcNotFound = (NERR_BASE+68);
// The print processor is not installed.

// Service API related
// Error codes from BASE+80 to BASE+99

{$EXTERNALSYM NERR_ServiceTableLocked}
NERR_ServiceTableLocked = (NERR_BASE+80);
// The service database is locked.

{$EXTERNALSYM NERR_ServiceTableFull}
NERR_ServiceTableFull = (NERR_BASE+81);
// The service table is full.

{$EXTERNALSYM NERR_ServiceInstalled}
NERR_ServiceInstalled = (NERR_BASE+82);
// The requested service has already been started.

{$EXTERNALSYM NERR_ServiceEntryLocked}
NERR_ServiceEntryLocked = (NERR_BASE+83);
// The service does not respond to control actions.

{$EXTERNALSYM NERR_ServiceNotInstalled}
NERR_ServiceNotInstalled = (NERR_BASE+84);
// The service has not been started.

{$EXTERNALSYM NERR_BadServiceName}
NERR_BadServiceName = (NERR_BASE+85);
// The service name is invalid.

{$EXTERNALSYM NERR_ServiceCtlTimeout}
NERR_ServiceCtlTimeout = (NERR_BASE+86);
// The service is not responding to the control function.

{$EXTERNALSYM NERR_ServiceCtlBusy}
NERR_ServiceCtlBusy = (NERR_BASE+87);
// The service control is busy.

{$EXTERNALSYM NERR_BadServiceProgName}
NERR_BadServiceProgName = (NERR_BASE+88);
// The configuration file contains an invalid service program name.

{$EXTERNALSYM NERR_ServiceNotCtrl}
NERR_ServiceNotCtrl = (NERR_BASE+89);
// The service could not be controlled in its present state.

{$EXTERNALSYM NERR_ServiceKillProc}
NERR_ServiceKillProc = (NERR_BASE+90);
// The service ended abnormally.

{$EXTERNALSYM NERR_ServiceCtlNotValid}
NERR_ServiceCtlNotValid = (NERR_BASE+91);
// The requested pause or stop is not valid for this service.

{$EXTERNALSYM NERR_NotInDispatchTbl}
NERR_NotInDispatchTbl = (NERR_BASE+92);
// The service control dispatcher could not find the service name in the dispatch table.

{$EXTERNALSYM NERR_BadControlRecv}
NERR_BadControlRecv = (NERR_BASE+93);
// The service control dispatcher pipe read failed.

{$EXTERNALSYM NERR_ServiceNotStarting}
NERR_ServiceNotStarting = (NERR_BASE+94);
// A thread for the new service could not be created.

// Wksta and Logon API related
// Error codes from BASE+100 to BASE+118

{$EXTERNALSYM NERR_AlreadyLoggedOn}
NERR_AlreadyLoggedOn = (NERR_BASE+100);
// This workstation is already logged on to the local-area network.

{$EXTERNALSYM NERR_NotLoggedOn}
NERR_NotLoggedOn = (NERR_BASE+101);
// The workstation is not logged on to the local-area network.

{$EXTERNALSYM NERR_BadUsername}
NERR_BadUsername = (NERR_BASE+102);
// The user name or group name parameter is invalid.

{$EXTERNALSYM NERR_BadPassword}
NERR_BadPassword = (NERR_BASE+103);
// The password parameter is invalid.

{$EXTERNALSYM NERR_UnableToAddName_W}
NERR_UnableToAddName_W = (NERR_BASE+104);
// @W The logon processor did not add the message alias.

{$EXTERNALSYM NERR_UnableToAddName_F}
NERR_UnableToAddName_F = (NERR_BASE+105);
// The logon processor did not add the message alias.

{$EXTERNALSYM NERR_UnableToDelName_W}
NERR_UnableToDelName_W = (NERR_BASE+106);
// @W The logoff processor did not delete the message alias.

{$EXTERNALSYM NERR_UnableToDelName_F}
NERR_UnableToDelName_F = (NERR_BASE+107);
// The logoff processor did not delete the message alias.

{$EXTERNALSYM NERR_LogonsPaused}
NERR_LogonsPaused = (NERR_BASE+109);
// Network logons are paused.

{$EXTERNALSYM NERR_LogonServerConflict}
NERR_LogonServerConflict = (NERR_BASE+110);
// A centralized logon-server conflict occurred.

{$EXTERNALSYM NERR_LogonNoUserPath}
NERR_LogonNoUserPath = (NERR_BASE+111);
// The server is configured without a valid user path.

{$EXTERNALSYM NERR_LogonScriptError}
NERR_LogonScriptError = (NERR_BASE+112);
// An error occurred while loading or running the logon script.

{$EXTERNALSYM NERR_StandaloneLogon}
NERR_StandaloneLogon = (NERR_BASE+114);
// The logon server was not specified. Your computer will be logged on as STANDALONE.

{$EXTERNALSYM NERR_LogonServerNotFound}
NERR_LogonServerNotFound = (NERR_BASE+115);
// The logon server could not be found.

{$EXTERNALSYM NERR_LogonDomainExists}
NERR_LogonDomainExists = (NERR_BASE+116);
// There is already a logon domain for this computer.

{$EXTERNALSYM NERR_NonValidatedLogon}
NERR_NonValidatedLogon = (NERR_BASE+117);
// The logon server could not validate the logon.

// ACF API related (access, user, group);
// Error codes from BASE+119 to BASE+149

{$EXTERNALSYM NERR_ACFNotFound}
NERR_ACFNotFound = (NERR_BASE+119);
// The security database could not be found.

{$EXTERNALSYM NERR_GroupNotFound}
NERR_GroupNotFound = (NERR_BASE+120);
// The group name could not be found.

{$EXTERNALSYM NERR_UserNotFound}
NERR_UserNotFound = (NERR_BASE+121);
// The user name could not be found.

{$EXTERNALSYM NERR_ResourceNotFound}
NERR_ResourceNotFound = (NERR_BASE+122);
// The resource name could not be found.

{$EXTERNALSYM NERR_GroupExists}
NERR_GroupExists = (NERR_BASE+123);
// The group already exists.

{$EXTERNALSYM NERR_UserExists}
NERR_UserExists = (NERR_BASE+124);
// The user account already exists.

{$EXTERNALSYM NERR_ResourceExists}
NERR_ResourceExists = (NERR_BASE+125);
// The resource permission list already exists.

{$EXTERNALSYM NERR_NotPrimary}
NERR_NotPrimary = (NERR_BASE+126);
// This operation is only allowed on the primary domain controller of the domain.

{$EXTERNALSYM NERR_ACFNotLoaded}
NERR_ACFNotLoaded = (NERR_BASE+127);
// The security database has not been started.

{$EXTERNALSYM NERR_ACFNoRoom}
NERR_ACFNoRoom = (NERR_BASE+128);
// There are too many names in the user accounts database.

{$EXTERNALSYM NERR_ACFFileIOFail}
NERR_ACFFileIOFail = (NERR_BASE+129);
// A disk I/O failure occurred.

{$EXTERNALSYM NERR_ACFTooManyLists}
NERR_ACFTooManyLists = (NERR_BASE+130);
// The limit of 64 entries per resource was exceeded.

{$EXTERNALSYM NERR_UserLogon}
NERR_UserLogon = (NERR_BASE+131);
// Deleting a user with a session is not allowed.

{$EXTERNALSYM NERR_ACFNoParent}
NERR_ACFNoParent = (NERR_BASE+132);
// The parent directory could not be located.

{$EXTERNALSYM NERR_CanNotGrowSegment}
NERR_CanNotGrowSegment = (NERR_BASE+133);
// Unable to add to the security database session cache segment.

{$EXTERNALSYM NERR_SpeGroupOp}
NERR_SpeGroupOp = (NERR_BASE+134);
// This operation is not allowed on this special group.

{$EXTERNALSYM NERR_NotInCache}
NERR_NotInCache = (NERR_BASE+135);
// This user is not cached in user accounts database session cache.

{$EXTERNALSYM NERR_UserInGroup}
NERR_UserInGroup = (NERR_BASE+136);
// The user already belongs to this group.

{$EXTERNALSYM NERR_UserNotInGroup}
NERR_UserNotInGroup = (NERR_BASE+137);
// The user does not belong to this group.

{$EXTERNALSYM NERR_AccountUndefined}
NERR_AccountUndefined = (NERR_BASE+138);
// This user account is undefined.

{$EXTERNALSYM NERR_AccountExpired}
NERR_AccountExpired = (NERR_BASE+139);
// This user account has expired.

{$EXTERNALSYM NERR_InvalidWorkstation}
NERR_InvalidWorkstation = (NERR_BASE+140);
// The user is not allowed to log on from this workstation.

{$EXTERNALSYM NERR_InvalidLogonHours}
NERR_InvalidLogonHours = (NERR_BASE+141);
// The user is not allowed to log on at this time.

{$EXTERNALSYM NERR_PasswordExpired}
NERR_PasswordExpired = (NERR_BASE+142);
// The password of this user has expired.

{$EXTERNALSYM NERR_PasswordCantChange}
NERR_PasswordCantChange = (NERR_BASE+143);
// The password of this user cannot change.

{$EXTERNALSYM NERR_PasswordHistConflict}
NERR_PasswordHistConflict = (NERR_BASE+144);
// This password cannot be used now.

{$EXTERNALSYM NERR_PasswordTooShort}
NERR_PasswordTooShort = (NERR_BASE+145);
// The password is shorter than required.

{$EXTERNALSYM NERR_PasswordTooRecent}
NERR_PasswordTooRecent = (NERR_BASE+146);
// The password of this user is too recent to change.

{$EXTERNALSYM NERR_InvalidDatabase}
NERR_InvalidDatabase = (NERR_BASE+147);
// The security database is corrupted.

{$EXTERNALSYM NERR_DatabaseUpToDate}
NERR_DatabaseUpToDate = (NERR_BASE+148);
// No updates are necessary to this replicant network/local security database.

{$EXTERNALSYM NERR_SyncRequired}
NERR_SyncRequired = (NERR_BASE+149);
// This replicant database is outdated; synchronization is required.

// Use API related
// Error codes from BASE+150 to BASE+169

{$EXTERNALSYM NERR_UseNotFound}
NERR_UseNotFound = (NERR_BASE+150);
// The network connection could not be found.

{$EXTERNALSYM NERR_BadAsgType}
NERR_BadAsgType = (NERR_BASE+151);
// This asg_type is invalid.

{$EXTERNALSYM NERR_DeviceIsShared}
NERR_DeviceIsShared = (NERR_BASE+152);
// This device is currently being shared.

// Message Server related
// Error codes BASE+170 to BASE+209

{$EXTERNALSYM NERR_NoComputerName}
NERR_NoComputerName = (NERR_BASE+170);
// The computer name could not be added as a message alias. The name may already exist on the network.

{$EXTERNALSYM NERR_MsgAlreadyStarted}
NERR_MsgAlreadyStarted = (NERR_BASE+171);
// The Messenger service is already started.

{$EXTERNALSYM NERR_MsgInitFailed}
NERR_MsgInitFailed = (NERR_BASE+172);
// The Messenger service failed to start.

{$EXTERNALSYM NERR_NameNotFound}
NERR_NameNotFound = (NERR_BASE+173);
// The message alias could not be found on the network.

{$EXTERNALSYM NERR_AlreadyForwarded}
NERR_AlreadyForwarded = (NERR_BASE+174);
// This message alias has already been forwarded.

{$EXTERNALSYM NERR_AddForwarded}
NERR_AddForwarded = (NERR_BASE+175);
// This message alias has been added but is still forwarded.

{$EXTERNALSYM NERR_AlreadyExists}
NERR_AlreadyExists = (NERR_BASE+176);
// This message alias already exists locally.

{$EXTERNALSYM NERR_TooManyNames}
NERR_TooManyNames = (NERR_BASE+177);
// The maximum number of added message aliases has been exceeded.

{$EXTERNALSYM NERR_DelComputerName}
NERR_DelComputerName = (NERR_BASE+178);
// The computer name could not be deleted.

{$EXTERNALSYM NERR_LocalForward}
NERR_LocalForward = (NERR_BASE+179);
// Messages cannot be forwarded back to the same workstation.

{$EXTERNALSYM NERR_GrpMsgProcessor}
NERR_GrpMsgProcessor = (NERR_BASE+180);
// An error occurred in the domain message processor.

{$EXTERNALSYM NERR_PausedRemote}
NERR_PausedRemote = (NERR_BASE+181);
// The message was sent, but the recipient has paused the Messenger service.

{$EXTERNALSYM NERR_BadReceive}
NERR_BadReceive = (NERR_BASE+182);
// The message was sent but not received.

{$EXTERNALSYM NERR_NameInUse}
NERR_NameInUse = (NERR_BASE+183);
// The message alias is currently in use. Try again later.

{$EXTERNALSYM NERR_MsgNotStarted}
NERR_MsgNotStarted = (NERR_BASE+184);
// The Messenger service has not been started.

{$EXTERNALSYM NERR_NotLocalName}
NERR_NotLocalName = (NERR_BASE+185);
// The name is not on the local computer.

{$EXTERNALSYM NERR_NoForwardName}
NERR_NoForwardName = (NERR_BASE+186);
// The forwarded message alias could not be found on the network.

{$EXTERNALSYM NERR_RemoteFull}
NERR_RemoteFull = (NERR_BASE+187);
// The message alias table on the remote station is full.

{$EXTERNALSYM NERR_NameNotForwarded}
NERR_NameNotForwarded = (NERR_BASE+188);
// Messages for this alias are not currently being forwarded.

{$EXTERNALSYM NERR_TruncatedBroadcast}
NERR_TruncatedBroadcast = (NERR_BASE+189);
// The broadcast message was truncated.

{$EXTERNALSYM NERR_InvalidDevice}
NERR_InvalidDevice = (NERR_BASE+194);
// This is an invalid device name.

{$EXTERNALSYM NERR_WriteFault}
NERR_WriteFault = (NERR_BASE+195);
// A write fault occurred.

{$EXTERNALSYM NERR_DuplicateName}
NERR_DuplicateName = (NERR_BASE+197);
// A duplicate message alias exists on the network.

{$EXTERNALSYM NERR_DeleteLater}
NERR_DeleteLater = (NERR_BASE+198);
// @W This message alias will be deleted later.

{$EXTERNALSYM NERR_IncompleteDel}
NERR_IncompleteDel = (NERR_BASE+199);
// The message alias was not successfully deleted from all networks.

{$EXTERNALSYM NERR_MultipleNets}
NERR_MultipleNets = (NERR_BASE+200);
// This operation is not supported on computers with multiple networks.

// Server API related
// Error codes BASE+210 to BASE+229

{$EXTERNALSYM NERR_NetNameNotFound}
NERR_NetNameNotFound = (NERR_BASE+210);
// This shared resource does not exist.

{$EXTERNALSYM NERR_DeviceNotShared}
NERR_DeviceNotShared = (NERR_BASE+211);
// This device is not shared.

{$EXTERNALSYM NERR_ClientNameNotFound}
NERR_ClientNameNotFound = (NERR_BASE+212);
// A session does not exist with that computer name.

{$EXTERNALSYM NERR_FileIdNotFound}
NERR_FileIdNotFound = (NERR_BASE+214);
// There is not an open file with that identification number.

{$EXTERNALSYM NERR_ExecFailure}
NERR_ExecFailure = (NERR_BASE+215);
// A failure occurred when executing a remote administration command.

{$EXTERNALSYM NERR_TmpFile}
NERR_TmpFile = (NERR_BASE+216);
// A failure occurred when opening a remote temporary file.

{$EXTERNALSYM NERR_TooMuchData}
NERR_TooMuchData = (NERR_BASE+217);
// The data returned from a remote administration command has been truncated to 64K.

{$EXTERNALSYM NERR_DeviceShareConflict}
NERR_DeviceShareConflict = (NERR_BASE+218);
// This device cannot be shared as both a spooled and a non-spooled resource.

{$EXTERNALSYM NERR_BrowserTableIncomplete}
NERR_BrowserTableIncomplete = (NERR_BASE+219);
// The information in the list of servers may be incorrect.

{$EXTERNALSYM NERR_NotLocalDomain}
NERR_NotLocalDomain = (NERR_BASE+220);
// The computer is not active in this domain.

{$EXTERNALSYM NERR_IsDfsShare}
NERR_IsDfsShare = (NERR_BASE+221);
// The share must be removed from the Distributed File System before it can be deleted.

// CharDev API related
// Error codes BASE+230 to BASE+249

{$EXTERNALSYM NERR_DevInvalidOpCode}
NERR_DevInvalidOpCode = (NERR_BASE+231);
// The operation is invalid for this device.

{$EXTERNALSYM NERR_DevNotFound}
NERR_DevNotFound = (NERR_BASE+232);
// This device cannot be shared.

{$EXTERNALSYM NERR_DevNotOpen}
NERR_DevNotOpen = (NERR_BASE+233);
// This device was not open.

{$EXTERNALSYM NERR_BadQueueDevString}
NERR_BadQueueDevString = (NERR_BASE+234);
// This device name list is invalid.

{$EXTERNALSYM NERR_BadQueuePriority}
NERR_BadQueuePriority = (NERR_BASE+235);
// The queue priority is invalid.

{$EXTERNALSYM NERR_NoCommDevs}
NERR_NoCommDevs = (NERR_BASE+237);
// There are no shared communication devices.

{$EXTERNALSYM NERR_QueueNotFound}
NERR_QueueNotFound = (NERR_BASE+238);
// The queue you specified does not exist.

{$EXTERNALSYM NERR_BadDevString}
NERR_BadDevString = (NERR_BASE+240);
// This list of devices is invalid.

{$EXTERNALSYM NERR_BadDev}
NERR_BadDev = (NERR_BASE+241);
// The requested device is invalid.

{$EXTERNALSYM NERR_InUseBySpooler}
NERR_InUseBySpooler = (NERR_BASE+242);
// This device is already in use by the spooler.

{$EXTERNALSYM NERR_CommDevInUse}
NERR_CommDevInUse = (NERR_BASE+243);
// This device is already in use as a communication device.

// NetICanonicalize and NetIType and NetIMakeLMFileName
// NetIListCanon and NetINameCheck
// Error codes BASE+250 to BASE+269

{$EXTERNALSYM NERR_InvalidComputer}
NERR_InvalidComputer = (NERR_BASE+251);
// This computer name is invalid.

{$EXTERNALSYM NERR_MaxLenExceeded}
NERR_MaxLenExceeded = (NERR_BASE+254);
// The string and prefix specified are too long.

{$EXTERNALSYM NERR_BadComponent}
NERR_BadComponent = (NERR_BASE+256);
// This path component is invalid.

{$EXTERNALSYM NERR_CantType}
NERR_CantType = (NERR_BASE+257);
// Could not determine the type of input.

{$EXTERNALSYM NERR_TooManyEntries}
NERR_TooManyEntries = (NERR_BASE+262);
// The buffer for types is not big enough.

// NetProfile
// Error codes BASE+270 to BASE+276

{$EXTERNALSYM NERR_ProfileFileTooBig}
NERR_ProfileFileTooBig = (NERR_BASE+270);
// Profile files cannot exceed 64K.

{$EXTERNALSYM NERR_ProfileOffset}
NERR_ProfileOffset = (NERR_BASE+271);
// The start offset is out of range.

{$EXTERNALSYM NERR_ProfileCleanup}
NERR_ProfileCleanup = (NERR_BASE+272);
// The system cannot delete current connections to network resources.

{$EXTERNALSYM NERR_ProfileUnknownCmd}
NERR_ProfileUnknownCmd = (NERR_BASE+273);
// The system was unable to parse the command line in this file.

{$EXTERNALSYM NERR_ProfileLoadErr}
NERR_ProfileLoadErr = (NERR_BASE+274);
// An error occurred while loading the profile file.

{$EXTERNALSYM NERR_ProfileSaveErr}
NERR_ProfileSaveErr = (NERR_BASE+275);
// @W Errors occurred while saving the profile file. The profile was partially saved.

// NetAudit and NetErrorLog
// Error codes BASE+277 to BASE+279

{$EXTERNALSYM NERR_LogOverflow}
NERR_LogOverflow = (NERR_BASE+277);
// Log file %1 is full.

{$EXTERNALSYM NERR_LogFileChanged}
NERR_LogFileChanged = (NERR_BASE+278);
// This log file has changed between reads.

{$EXTERNALSYM NERR_LogFileCorrupt}
NERR_LogFileCorrupt = (NERR_BASE+279);
// Log file %1 is corrupt.

// NetRemote
// Error codes BASE+280 to BASE+299

{$EXTERNALSYM NERR_SourceIsDir}
NERR_SourceIsDir = (NERR_BASE+280);
// The source path cannot be a directory.

{$EXTERNALSYM NERR_BadSource}
NERR_BadSource = (NERR_BASE+281);
// The source path is illegal.

{$EXTERNALSYM NERR_BadDest}
NERR_BadDest = (NERR_BASE+282);
// The destination path is illegal.

{$EXTERNALSYM NERR_DifferentServers}
NERR_DifferentServers = (NERR_BASE+283);
// The source and destination paths are on different servers.

{$EXTERNALSYM NERR_RunSrvPaused}
NERR_RunSrvPaused = (NERR_BASE+285);
// The Run server you requested is paused.

{$EXTERNALSYM NERR_ErrCommRunSrv}
NERR_ErrCommRunSrv = (NERR_BASE+289);
// An error occurred when communicating with a Run server.

{$EXTERNALSYM NERR_ErrorExecingGhost}
NERR_ErrorExecingGhost = (NERR_BASE+291);
// An error occurred when starting a background process.

{$EXTERNALSYM NERR_ShareNotFound}
NERR_ShareNotFound = (NERR_BASE+292);
// The shared resource you are connected to could not be found.

// NetWksta.sys (redir); returned error codes.
// NERR_BASE + (300-329);

{$EXTERNALSYM NERR_InvalidLana}
NERR_InvalidLana = (NERR_BASE+300);
// The LAN adapter number is invalid.

{$EXTERNALSYM NERR_OpenFiles}
NERR_OpenFiles = (NERR_BASE+301);
// There are open files on the connection.

{$EXTERNALSYM NERR_ActiveConns}
NERR_ActiveConns = (NERR_BASE+302);
// Active connections still exist.

{$EXTERNALSYM NERR_BadPasswordCore}
NERR_BadPasswordCore = (NERR_BASE+303);
// This share name or password is invalid.

{$EXTERNALSYM NERR_DevInUse}
NERR_DevInUse = (NERR_BASE+304);
// The device is being accessed by an active process.

{$EXTERNALSYM NERR_LocalDrive}
NERR_LocalDrive = (NERR_BASE+305);
// The drive letter is in use locally.

// Alert error codes.
// NERR_BASE + (330-339);

{$EXTERNALSYM NERR_AlertExists}
NERR_AlertExists = (NERR_BASE+330);
// The specified client is already registered for the specified event.

{$EXTERNALSYM NERR_TooManyAlerts}
NERR_TooManyAlerts = (NERR_BASE+331);
// The alert table is full.

{$EXTERNALSYM NERR_NoSuchAlert}
NERR_NoSuchAlert = (NERR_BASE+332);
// An invalid or nonexistent alert name was raised.

{$EXTERNALSYM NERR_BadRecipient}
NERR_BadRecipient = (NERR_BASE+333);
// The alert recipient is invalid.

{$EXTERNALSYM NERR_AcctLimitExceeded}
NERR_AcctLimitExceeded = (NERR_BASE+334);
// A user's session with this server has been deleted because the user's logon hours are no longer valid.

// Additional Error and Audit log codes.
// NERR_BASE +(340-343)

{$EXTERNALSYM NERR_InvalidLogSeek}
NERR_InvalidLogSeek = (NERR_BASE+340);
// The log file does not contain the requested record number.

// Additional UAS and NETLOGON codes
// NERR_BASE +(350-359)

{$EXTERNALSYM NERR_BadUasConfig}
NERR_BadUasConfig = (NERR_BASE+350);
// The user accounts database is not configured correctly.

{$EXTERNALSYM NERR_InvalidUASOp}
NERR_InvalidUASOp = (NERR_BASE+351);
// This operation is not permitted when the Netlogon service is running.

{$EXTERNALSYM NERR_LastAdmin}
NERR_LastAdmin = (NERR_BASE+352);
// This operation is not allowed on the last administrative account.

{$EXTERNALSYM NERR_DCNotFound}
NERR_DCNotFound = (NERR_BASE+353);
// Could not find domain controller for this domain.

{$EXTERNALSYM NERR_LogonTrackingError}
NERR_LogonTrackingError = (NERR_BASE+354);
// Could not set logon information for this user.

{$EXTERNALSYM NERR_NetlogonNotStarted}
NERR_NetlogonNotStarted = (NERR_BASE+355);
// The Netlogon service has not been started.

{$EXTERNALSYM NERR_CanNotGrowUASFile}
NERR_CanNotGrowUASFile = (NERR_BASE+356);
// Unable to add to the user accounts database.

{$EXTERNALSYM NERR_TimeDiffAtDC}
NERR_TimeDiffAtDC = (NERR_BASE+357);
// This server's clock is not synchronized with the primary domain controller's clock.

{$EXTERNALSYM NERR_PasswordMismatch}
NERR_PasswordMismatch = (NERR_BASE+358);
// A password mismatch has been detected.

// Server Integration error codes.
// NERR_BASE +(360-369)

{$EXTERNALSYM NERR_NoSuchServer}
NERR_NoSuchServer = (NERR_BASE+360);
// The server identification does not specify a valid server.

{$EXTERNALSYM NERR_NoSuchSession}
NERR_NoSuchSession = (NERR_BASE+361);
// The session identification does not specify a valid session.

{$EXTERNALSYM NERR_NoSuchConnection}
NERR_NoSuchConnection = (NERR_BASE+362);
// The connection identification does not specify a valid connection.

{$EXTERNALSYM NERR_TooManyServers}
NERR_TooManyServers = (NERR_BASE+363);
// There is no space for another entry in the table of available servers.

{$EXTERNALSYM NERR_TooManySessions}
NERR_TooManySessions = (NERR_BASE+364);
// The server has reached the maximum number of sessions it supports.

{$EXTERNALSYM NERR_TooManyConnections}
NERR_TooManyConnections = (NERR_BASE+365);
// The server has reached the maximum number of connections it supports.

{$EXTERNALSYM NERR_TooManyFiles}
NERR_TooManyFiles = (NERR_BASE+366);
// The server cannot open more files because it has reached its maximum number.

{$EXTERNALSYM NERR_NoAlternateServers}
NERR_NoAlternateServers = (NERR_BASE+367);
// There are no alternate servers registered on this server.

{$EXTERNALSYM NERR_TryDownLevel}
NERR_TryDownLevel = (NERR_BASE+370);
// Try down-level (remote admin protocol); version of API instead.

// UPS error codes.
// NERR_BASE + (380-384);

{$EXTERNALSYM NERR_UPSDriverNotStarted}
NERR_UPSDriverNotStarted = (NERR_BASE+380);
// The UPS driver could not be accessed by the UPS service.

{$EXTERNALSYM NERR_UPSInvalidConfig}
NERR_UPSInvalidConfig = (NERR_BASE+381);
// The UPS service is not configured correctly.

{$EXTERNALSYM NERR_UPSInvalidCommPort}
NERR_UPSInvalidCommPort = (NERR_BASE+382);
// The UPS service could not access the specified Comm Port.

{$EXTERNALSYM NERR_UPSSignalAsserted}
NERR_UPSSignalAsserted = (NERR_BASE+383);
// The UPS indicated a line fail or low battery situation. Service not started.

{$EXTERNALSYM NERR_UPSShutdownFailed}
NERR_UPSShutdownFailed = (NERR_BASE+384);
// The UPS service failed to perform a system shut down.

// Remoteboot error codes.
// NERR_BASE + (400-419);
// Error codes 400 - 405 are used by RPLBOOT.SYS.
// Error codes 403, 407 - 416 are used by RPLLOADR.COM,
// Error code 417 is the alerter message of REMOTEBOOT (RPLSERVR.EXE);.
// Error code 418 is for when REMOTEBOOT can't start
// Error code 419 is for a disallowed 2nd rpl connection

{$EXTERNALSYM NERR_BadDosRetCode}
NERR_BadDosRetCode = (NERR_BASE+400);
// The program below returned an MS-DOS error code:

{$EXTERNALSYM NERR_ProgNeedsExtraMem}
NERR_ProgNeedsExtraMem = (NERR_BASE+401);
// The program below needs more memory:

{$EXTERNALSYM NERR_BadDosFunction}
NERR_BadDosFunction = (NERR_BASE+402);
// The program below called an unsupported MS-DOS function:

{$EXTERNALSYM NERR_RemoteBootFailed}
NERR_RemoteBootFailed = (NERR_BASE+403);
// The workstation failed to boot.

{$EXTERNALSYM NERR_BadFileCheckSum}
NERR_BadFileCheckSum = (NERR_BASE+404);
// The file below is corrupt.

{$EXTERNALSYM NERR_NoRplBootSystem}
NERR_NoRplBootSystem = (NERR_BASE+405);
// No loader is specified in the boot-block definition file.

{$EXTERNALSYM NERR_RplLoadrNetBiosErr}
NERR_RplLoadrNetBiosErr = (NERR_BASE+406);
// NetBIOS returned an error: The NCB and SMB are dumped above.

{$EXTERNALSYM NERR_RplLoadrDiskErr}
NERR_RplLoadrDiskErr = (NERR_BASE+407);
// A disk I/O error occurred.

{$EXTERNALSYM NERR_ImageParamErr}
NERR_ImageParamErr = (NERR_BASE+408);
// Image parameter substitution failed.

{$EXTERNALSYM NERR_TooManyImageParams}
NERR_TooManyImageParams = (NERR_BASE+409);
// Too many image parameters cross disk sector boundaries.

{$EXTERNALSYM NERR_NonDosFloppyUsed}
NERR_NonDosFloppyUsed = (NERR_BASE+410);
// The image was not generated from an MS-DOS diskette formatted with /S.

{$EXTERNALSYM NERR_RplBootRestart}
NERR_RplBootRestart = (NERR_BASE+411);
// Remote boot will be restarted later.

{$EXTERNALSYM NERR_RplSrvrCallFailed}
NERR_RplSrvrCallFailed = (NERR_BASE+412);
// The call to the Remoteboot server failed.

{$EXTERNALSYM NERR_CantConnectRplSrvr}
NERR_CantConnectRplSrvr = (NERR_BASE+413);
// Cannot connect to the Remoteboot server.

{$EXTERNALSYM NERR_CantOpenImageFile}
NERR_CantOpenImageFile = (NERR_BASE+414);
// Cannot open image file on the Remoteboot server.

{$EXTERNALSYM NERR_CallingRplSrvr}
NERR_CallingRplSrvr = (NERR_BASE+415);
// Connecting to the Remoteboot server...

{$EXTERNALSYM NERR_StartingRplBoot}
NERR_StartingRplBoot = (NERR_BASE+416);
// Connecting to the Remoteboot server...

{$EXTERNALSYM NERR_RplBootServiceTerm}
NERR_RplBootServiceTerm = (NERR_BASE+417);
// Remote boot service was stopped; check the error log for the cause of the problem.

{$EXTERNALSYM NERR_RplBootStartFailed}
NERR_RplBootStartFailed = (NERR_BASE+418);
// Remote boot startup failed; check the error log for the cause of the problem.

{$EXTERNALSYM NERR_RPL_CONNECTED}
NERR_RPL_CONNECTED = (NERR_BASE+419);
// A second connection to a Remoteboot resource is not allowed.

// FTADMIN API error codes
// NERR_BASE + (425-434)
// (Currently not used in NT);

// Browser service API error codes
// NERR_BASE + (450-475)

{$EXTERNALSYM NERR_BrowserConfiguredToNotRun}
NERR_BrowserConfiguredToNotRun = (NERR_BASE+450);
// The browser service was configured with MaintainServerList=No.

// Additional Remoteboot error codes.
// NERR_BASE + (510-550);

{$EXTERNALSYM NERR_RplNoAdaptersStarted}
NERR_RplNoAdaptersStarted = (NERR_BASE+510);
//Service failed to start since none of the network adapters started with this service.

{$EXTERNALSYM NERR_RplBadRegistry}
NERR_RplBadRegistry = (NERR_BASE+511);
//Service failed to start due to bad startup information in the registry.

{$EXTERNALSYM NERR_RplBadDatabase}
NERR_RplBadDatabase = (NERR_BASE+512);
//Service failed to start because its database is absent or corrupt.

{$EXTERNALSYM NERR_RplRplfilesShare}
NERR_RplRplfilesShare = (NERR_BASE+513);
//Service failed to start because RPLFILES share is absent.

{$EXTERNALSYM NERR_RplNotRplServer}
NERR_RplNotRplServer = (NERR_BASE+514);
//Service failed to start because RPLUSER group is absent.

{$EXTERNALSYM NERR_RplCannotEnum}
NERR_RplCannotEnum = (NERR_BASE+515);
//Cannot enumerate service records.

{$EXTERNALSYM NERR_RplWkstaInfoCorrupted}
NERR_RplWkstaInfoCorrupted = (NERR_BASE+516);
//Workstation record information has been corrupted.

{$EXTERNALSYM NERR_RplWkstaNotFound}
NERR_RplWkstaNotFound = (NERR_BASE+517);
//Workstation record was not found.

{$EXTERNALSYM NERR_RplWkstaNameUnavailable}
NERR_RplWkstaNameUnavailable = (NERR_BASE+518);
//Workstation name is in use by some other workstation.

{$EXTERNALSYM NERR_RplProfileInfoCorrupted}
NERR_RplProfileInfoCorrupted = (NERR_BASE+519);
//Profile record information has been corrupted.

{$EXTERNALSYM NERR_RplProfileNotFound}
NERR_RplProfileNotFound = (NERR_BASE+520);
//Profile record was not found.

{$EXTERNALSYM NERR_RplProfileNameUnavailable}
NERR_RplProfileNameUnavailable = (NERR_BASE+521);
//Profile name is in use by some other profile.

{$EXTERNALSYM NERR_RplProfileNotEmpty}
NERR_RplProfileNotEmpty = (NERR_BASE+522);
//There are workstations using this profile.

{$EXTERNALSYM NERR_RplConfigInfoCorrupted}
NERR_RplConfigInfoCorrupted = (NERR_BASE+523);
//Configuration record information has been corrupted.

{$EXTERNALSYM NERR_RplConfigNotFound}
NERR_RplConfigNotFound = (NERR_BASE+524);
//Configuration record was not found.

{$EXTERNALSYM NERR_RplAdapterInfoCorrupted}
NERR_RplAdapterInfoCorrupted = (NERR_BASE+525);
//Adapter id record information has been corrupted.

{$EXTERNALSYM NERR_RplInternal}
NERR_RplInternal = (NERR_BASE+526);
//An internal service error has occurred.

{$EXTERNALSYM NERR_RplVendorInfoCorrupted}
NERR_RplVendorInfoCorrupted = (NERR_BASE+527);
//Vendor id record information has been corrupted.

{$EXTERNALSYM NERR_RplBootInfoCorrupted}
NERR_RplBootInfoCorrupted = (NERR_BASE+528);
//Boot block record information has been corrupted.

{$EXTERNALSYM NERR_RplWkstaNeedsUserAcct}
NERR_RplWkstaNeedsUserAcct = (NERR_BASE+529);
//The user account for this workstation record is missing.

{$EXTERNALSYM NERR_RplNeedsRPLUSERAcct}
NERR_RplNeedsRPLUSERAcct = (NERR_BASE+530);
//The RPLUSER local group could not be found.

{$EXTERNALSYM NERR_RplBootNotFound}
NERR_RplBootNotFound = (NERR_BASE+531);
//Boot block record was not found.

{$EXTERNALSYM NERR_RplIncompatibleProfile}
NERR_RplIncompatibleProfile = (NERR_BASE+532);
//Chosen profile is incompatible with this workstation.

{$EXTERNALSYM NERR_RplAdapterNameUnavailable}
NERR_RplAdapterNameUnavailable = (NERR_BASE+533);
//Chosen network adapter id is in use by some other workstation.

{$EXTERNALSYM NERR_RplConfigNotEmpty}
NERR_RplConfigNotEmpty = (NERR_BASE+534);
//There are profiles using this configuration.

{$EXTERNALSYM NERR_RplBootInUse}
NERR_RplBootInUse = (NERR_BASE+535);
//There are workstations, profiles or configurations using this boot block.

{$EXTERNALSYM NERR_RplBackupDatabase}
NERR_RplBackupDatabase = (NERR_BASE+536);
//Service failed to backup Remoteboot database.

{$EXTERNALSYM NERR_RplAdapterNotFound}
NERR_RplAdapterNotFound = (NERR_BASE+537);
//Adapter record was not found.

{$EXTERNALSYM NERR_RplVendorNotFound}
NERR_RplVendorNotFound = (NERR_BASE+538);
//Vendor record was not found.

{$EXTERNALSYM NERR_RplVendorNameUnavailable}
NERR_RplVendorNameUnavailable = (NERR_BASE+539);
//Vendor name is in use by some other vendor record.

{$EXTERNALSYM NERR_RplBootNameUnavailable}
NERR_RplBootNameUnavailable = (NERR_BASE+540);
//(boot name, vendor id); is in use by some other boot block record.

{$EXTERNALSYM NERR_RplConfigNameUnavailable}
NERR_RplConfigNameUnavailable = (NERR_BASE+541);
//Configuration name is in use by some other configuration.


// **INTERNAL_ONLY**

// Dfs API error codes.
// NERR_BASE + (560-590);

{$EXTERNALSYM NERR_DfsInternalCorruption}
NERR_DfsInternalCorruption = (NERR_BASE+560);
//The internal database maintained by the Dfs service is corrupt

{$EXTERNALSYM NERR_DfsVolumeDataCorrupt}
NERR_DfsVolumeDataCorrupt = (NERR_BASE+561);
//One of the records in the internal Dfs database is corrupt

{$EXTERNALSYM NERR_DfsNoSuchVolume}
NERR_DfsNoSuchVolume = (NERR_BASE+562);
//There is no volume whose entry path matches the input Entry Path

{$EXTERNALSYM NERR_DfsVolumeAlreadyExists}
NERR_DfsVolumeAlreadyExists = (NERR_BASE+563);
//A volume with the given name already exists

{$EXTERNALSYM NERR_DfsAlreadyShared}
NERR_DfsAlreadyShared = (NERR_BASE+564);
//The server share specified is already shared in the Dfs

{$EXTERNALSYM NERR_DfsNoSuchShare}
NERR_DfsNoSuchShare = (NERR_BASE+565);
//The indicated server share does not support the indicated Dfs volume

{$EXTERNALSYM NERR_DfsNotALeafVolume}
NERR_DfsNotALeafVolume = (NERR_BASE+566);
//The operation is not valid on a non-leaf volume

{$EXTERNALSYM NERR_DfsLeafVolume}
NERR_DfsLeafVolume = (NERR_BASE+567);
//The operation is not valid on a leaf volume

{$EXTERNALSYM NERR_DfsVolumeHasMultipleServers}
NERR_DfsVolumeHasMultipleServers = (NERR_BASE+568);
//The operation is ambiguous because the volume has multiple servers

{$EXTERNALSYM NERR_DfsCantCreateJunctionPoint}
NERR_DfsCantCreateJunctionPoint = (NERR_BASE+569);
//Unable to create a junction point

{$EXTERNALSYM NERR_DfsServerNotDfsAware}
NERR_DfsServerNotDfsAware = (NERR_BASE+570);
//The server is not Dfs Aware

{$EXTERNALSYM NERR_DfsBadRenamePath}
NERR_DfsBadRenamePath = (NERR_BASE+571);
//The specified rename target path is invalid

{$EXTERNALSYM NERR_DfsVolumeIsOffline}
NERR_DfsVolumeIsOffline = (NERR_BASE+572);
//The specified Dfs volume is offline

{$EXTERNALSYM NERR_DfsNoSuchServer}
NERR_DfsNoSuchServer = (NERR_BASE+573);
//The specified server is not a server for this volume

{$EXTERNALSYM NERR_DfsCyclicalName}
NERR_DfsCyclicalName = (NERR_BASE+574);
//A cycle in the Dfs name was detected

{$EXTERNALSYM NERR_DfsNotSupportedInServerDfs}
NERR_DfsNotSupportedInServerDfs = (NERR_BASE+575);
//The operation is not supported on a server-based Dfs

{$EXTERNALSYM NERR_DfsDuplicateService}
NERR_DfsDuplicateService = (NERR_BASE+576);
//This volume is already supported by the specified server-share

{$EXTERNALSYM NERR_DfsCantRemoveLastServerShare}
NERR_DfsCantRemoveLastServerShare = (NERR_BASE+577);
//Can't remove the last server-share supporting this volume

{$EXTERNALSYM NERR_DfsVolumeIsInterDfs}
NERR_DfsVolumeIsInterDfs = (NERR_BASE+578);
//The operation is not supported for an Inter-Dfs volume

{$EXTERNALSYM NERR_DfsInconsistent}
NERR_DfsInconsistent = (NERR_BASE+579);
//The internal state of the Dfs Service has become inconsistent

{$EXTERNALSYM NERR_DfsServerUpgraded}
NERR_DfsServerUpgraded = (NERR_BASE+580);
//The Dfs Service has been installed on the specified server

{$EXTERNALSYM NERR_DfsDataIsIdentical}
NERR_DfsDataIsIdentical = (NERR_BASE+581);
//The Dfs data being reconciled is identical

{$EXTERNALSYM NERR_DfsCantRemoveDfsRoot}
NERR_DfsCantRemoveDfsRoot = (NERR_BASE+582);
//The Dfs root volume cannot be deleted - Uninstall Dfs if required

{$EXTERNALSYM NERR_DfsChildOrParentInDfs}
NERR_DfsChildOrParentInDfs = (NERR_BASE+583);
//A child or parent directory of the share is already in a Dfs

{$EXTERNALSYM NERR_DfsInternalError}
NERR_DfsInternalError = (NERR_BASE+590);
//Dfs internal error

// Net setup error codes.
// NERR_BASE + (591-600);

{$EXTERNALSYM NERR_SetupAlreadyJoined}
NERR_SetupAlreadyJoined = (NERR_BASE+591);
//This machine is already joined to a domain.

{$EXTERNALSYM NERR_SetupNotJoined}
NERR_SetupNotJoined = (NERR_BASE+592);
//This machine is not currently joined to a domain.

{$EXTERNALSYM NERR_SetupDomainController}
NERR_SetupDomainController = (NERR_BASE+593);
//This machine is a domain controller and cannot be unjoined from a domain.

{$EXTERNALSYM NERR_DefaultJoinRequired}
NERR_DefaultJoinRequired = (NERR_BASE+594);
//*The destination domain controller does not support creating machine accounts in OUs.

{$EXTERNALSYM NERR_InvalidWorkgroupName}
NERR_InvalidWorkgroupName = (NERR_BASE+595);
//*The specified workgroup name is invalid

{$EXTERNALSYM NERR_NameUsesIncompatibleCodePage}
NERR_NameUsesIncompatibleCodePage = (NERR_BASE+596);
//*The specified computer name is incompatible with the default language used on the domain controller.

{$EXTERNALSYM NERR_ComputerAccountNotFound}
NERR_ComputerAccountNotFound = (NERR_BASE+597);
//*The specified computer account could not be found.


// ***********WARNING ****************
// *The range 2750-2799 has been *
// *allocated to the IBM LAN Server *
// ***********************************

// ***********WARNING ****************
// *The range 2900-2999 has been *
// *reserved for Microsoft OEMs *
// ***********************************

// **END_INTERNAL**


{$EXTERNALSYM MAX_NERR}
MAX_NERR = (NERR_BASE+899);
// This is the last error in NERR range.

implementation

end.
 
我下了个dialup,但不知怎用,烦请教!
 
后退
顶部