JwaLM.pas
资源名称:win32api.zip [点击查看]
上传用户:davidchvip
上传日期:2009-07-28
资源大小:1749k
文件大小:407k
源码类别:
Windows编程
开发平台:
Delphi
- {******************************************************************************}
- { }
- { Lan Manager API interface Unit for Object Pascal }
- { }
- { Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
- { Corporation. All Rights Reserved. }
- { }
- { The original file is: lm.h, released June 2000. The original Pascal }
- { code is: LM.pas, released December 2000. The initial developer of the }
- { Pascal code is Petr Vones (petr.v@mujmail.cz). }
- { }
- { Portions created by Petr Vones are Copyright (C) 2000 Petr Vones }
- { }
- { Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
- { Marcel van Brakel. All Rights Reserved. }
- { }
- { 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 or my personal homepage located at }
- { http://members.chello.nl/m.vanbrakel2 }
- { }
- { The contents of this file are used with permission, subject to the Mozilla }
- { Public License Version 1.1 (the "License"); 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 "AS IS" basis, }
- { WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
- { the specific language governing rights and limitations under the License. }
- { }
- { Alternatively, the contents of this file may be used under the terms of the }
- { GNU Lesser General Public License (the "LGPL License"), in which case the }
- { provisions of the LGPL License are applicable instead of those above. }
- { If you wish to allow use of your version of this file only under the terms }
- { of the LGPL License and not to allow others to use your version of this file }
- { under the MPL, indicate your decision by deleting the provisions above and }
- { replace them with the notice and other provisions required by the LGPL }
- { License. If you do not delete the provisions above, a recipient may use }
- { your version of this file under either the MPL or the LGPL License. }
- { }
- { For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
- { }
- {******************************************************************************}
- unit JwaLM;
- {$ALIGN ON}
- {$MINENUMSIZE 4}
- {$WEAKPACKAGEUNIT}
- interface
- (*$HPPEMIT '#include <windef.h>'*)
- (*$HPPEMIT '#include <winerror.h>'*)
- (*$HPPEMIT '#include <winsvc.h>'*)
- (*$HPPEMIT '#include <netcons.h>'*)
- (*$HPPEMIT '#include <netsetup.h>'*)
- (*$HPPEMIT '#include <lmaccess.h>'*)
- (*$HPPEMIT '#include <lmalert.h>'*)
- (*$HPPEMIT '#include <lmapibuf.h>'*)
- (*$HPPEMIT '#include <lmaudit.h>'*)
- (*$HPPEMIT '#include <lmat.h>'*)
- (*$HPPEMIT '#include <lmbrowsr.h>'*)
- (*$HPPEMIT '#include <lmconfig.h>'*)
- (*$HPPEMIT '#include <lmchdev.h>'*)
- (*$HPPEMIT '#include <lmcons.h>'*)
- (*$HPPEMIT '#include <lmdfs.h>'*)
- (*$HPPEMIT '#include <lmerr.h>'*)
- (*$HPPEMIT '#include <lmerrlog.h>'*)
- (*$HPPEMIT '#include <lmjoin.h>'*)
- (*$HPPEMIT '#include <lmmsg.h>'*)
- (*$HPPEMIT '#include <lmsname.h>'*)
- (*$HPPEMIT '#include <lmremutl.h>'*)
- (*$HPPEMIT '#include <lmrepl.h>'*)
- (*$HPPEMIT '#include <lmserver.h>'*)
- (*$HPPEMIT '#include <lmshare.h>'*)
- (*$HPPEMIT '#include <lmstats.h>'*)
- (*$HPPEMIT '#include <lmsvc.h>'*)
- (*$HPPEMIT '#include <lmuse.h>'*)
- (*$HPPEMIT '#include <lmuseflg.h>'*)
- (*$HPPEMIT '#include <lmwksta.h>'*)
- uses
- JwaWinSvc, JwaWinType, JwaWinBase, JwaWinNT;
- // Translated from 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.
- // Translated from 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 "preferred maximum length"
- // parameter. This value indicates that the API should just allocate
- // "as much as it takes."
- {$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;
- // Translated from LMACCESS.H
- // User Class
- // Function Prototypes - User
- {$EXTERNALSYM NetUserAdd}
- function NetUserAdd(servername: LPCWSTR; level: DWORD; buf: Pointer;
- parm_err: PDWORD): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetUserEnum}
- function NetUserEnum(servername: LPCWSTR; level: DWORD; filter: DWORD;
- var bufptr: Pointer; prefmaxlen: DWORD; var entriesread: DWORD;
- var totalentries: DWORD; resume_handle: PDWORD): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetUserGetInfo}
- function NetUserGetInfo(servername: LPCWSTR; username: LPCWSTR; level: DWORD;
- var bufptr: Pointer): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetUserSetInfo}
- function NetUserSetInfo(servername: LPCWSTR; username: LPCWSTR; level: DWORD;
- buf: Pointer; parm_err: PDWORD): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetUserDel}
- function NetUserDel(servername: LPCWSTR; username: LPCWSTR): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetUserGetGroups}
- function NetUserGetGroups(servername: LPCWSTR; username: LPCWSTR; level: DWORD;
- var bufptr: Pointer; prefmaxlen: DWORD; var entriesread: DWORD;
- var totalentries: DWORD): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetUserSetGroups}
- function NetUserSetGroups(servername: LPCWSTR; username: LPCWSTR; level: DWORD;
- buf: Pointer; num_entries: DWORD): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetUserGetLocalGroups}
- function NetUserGetLocalGroups(servername: LPCWSTR; username: LPCWSTR;
- level: DWORD; flags: DWORD; var bufptr: Pointer; prefmaxlen: DWORD;
- var entriesread: DWORD; var totalentries: DWORD): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetUserModalsGet}
- function NetUserModalsGet(servername: LPCWSTR; level: DWORD;
- var bufptr: Pointer): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetUserModalsSet}
- function NetUserModalsSet(servername: LPCWSTR; level: DWORD; buf: Pointer;
- parm_err: PDWORD): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetUserChangePassword}
- function NetUserChangePassword(domainname, username, oldpassword,
- newpassword: LPCWSTR): NET_API_STATUS; stdcall;
- // Data Structures - User
- type
- PUserInfo0 = ^TUserInfo0;
- {$EXTERNALSYM _USER_INFO_0}
- _USER_INFO_0 = record
- usri0_name: LPWSTR;
- end;
- TUserInfo0 = _USER_INFO_0;
- {$EXTERNALSYM USER_INFO_0}
- USER_INFO_0 = _USER_INFO_0;
- PUserInfo1 = ^TUserInfo1;
- {$EXTERNALSYM _USER_INFO_1}
- _USER_INFO_1 = record
- usri1_name: LPWSTR;
- usri1_password: LPWSTR;
- usri1_password_age: DWORD;
- usri1_priv: DWORD;
- usri1_home_dir: LPWSTR;
- usri1_comment: LPWSTR;
- usri1_flags: DWORD;
- usri1_script_path: LPWSTR;
- end;
- TUserInfo1 = _USER_INFO_1;
- {$EXTERNALSYM USER_INFO_1}
- USER_INFO_1 = _USER_INFO_1;
- PUserInfo2 = ^TUserInfo2;
- {$EXTERNALSYM _USER_INFO_2}
- _USER_INFO_2 = record
- usri2_name: LPWSTR;
- usri2_password: LPWSTR;
- usri2_password_age: DWORD;
- usri2_priv: DWORD;
- usri2_home_dir: LPWSTR;
- usri2_comment: LPWSTR;
- usri2_flags: DWORD;
- usri2_script_path: LPWSTR;
- usri2_auth_flags: DWORD;
- usri2_full_name: LPWSTR;
- usri2_usr_comment: LPWSTR;
- usri2_parms: LPWSTR;
- usri2_workstations: LPWSTR;
- usri2_last_logon: DWORD;
- usri2_last_logoff: DWORD;
- usri2_acct_expires: DWORD;
- usri2_max_storage: DWORD;
- usri2_units_per_week: DWORD;
- usri2_logon_hours: PBYTE;
- usri2_bad_pw_count: DWORD;
- usri2_num_logons: DWORD;
- usri2_logon_server: LPWSTR;
- usri2_country_code: DWORD;
- usri2_code_page: DWORD;
- end;
- TUserInfo2 = _USER_INFO_2;
- {$EXTERNALSYM USER_INFO_2}
- USER_INFO_2 = _USER_INFO_2;
- PUserInfo3 = ^TUserInfo3;
- {$EXTERNALSYM _USER_INFO_3}
- _USER_INFO_3 = record
- usri3_name: LPWSTR;
- usri3_password: LPWSTR;
- usri3_password_age: DWORD;
- usri3_priv: DWORD;
- usri3_home_dir: LPWSTR;
- usri3_comment: LPWSTR;
- usri3_flags: DWORD;
- usri3_script_path: LPWSTR;
- usri3_auth_flags: DWORD;
- usri3_full_name: LPWSTR;
- usri3_usr_comment: LPWSTR;
- usri3_parms: LPWSTR;
- usri3_workstations: LPWSTR;
- usri3_last_logon: DWORD;
- usri3_last_logoff: DWORD;
- usri3_acct_expires: DWORD;
- usri3_max_storage: DWORD;
- usri3_units_per_week: DWORD;
- usri3_logon_hours: PBYTE;
- usri3_bad_pw_count: DWORD;
- usri3_num_logons: DWORD;
- usri3_logon_server: LPWSTR;
- usri3_country_code: DWORD;
- usri3_code_page: DWORD;
- usri3_user_id: DWORD;
- usri3_primary_group_id: DWORD;
- usri3_profile: LPWSTR;
- usri3_home_dir_drive: LPWSTR;
- usri3_password_expired: DWORD;
- end;
- TUserInfo3 = _USER_INFO_3;
- {$EXTERNALSYM USER_INFO_3}
- USER_INFO_3 = _USER_INFO_3;
- PUserInfo10 = ^TUserInfo10;
- {$EXTERNALSYM _USER_INFO_10}
- _USER_INFO_10 = record
- usri10_name: LPWSTR;
- usri10_comment: LPWSTR;
- usri10_usr_comment: LPWSTR;
- usri10_full_name: LPWSTR;
- end;
- TUserInfo10 = _USER_INFO_10;
- {$EXTERNALSYM USER_INFO_10}
- USER_INFO_10 = _USER_INFO_10;
- PUserInfo11 = ^TUserInfo11;
- {$EXTERNALSYM _USER_INFO_11}
- _USER_INFO_11 = record
- usri11_name: LPWSTR;
- usri11_comment: LPWSTR;
- usri11_usr_comment: LPWSTR;
- usri11_full_name: LPWSTR;
- usri11_priv: DWORD;
- usri11_auth_flags: DWORD;
- usri11_password_age: DWORD;
- usri11_home_dir: LPWSTR;
- usri11_parms: LPWSTR;
- usri11_last_logon: DWORD;
- usri11_last_logoff: DWORD;
- usri11_bad_pw_count: DWORD;
- usri11_num_logons: DWORD;
- usri11_logon_server: LPWSTR;
- usri11_country_code: DWORD;
- usri11_workstations: LPWSTR;
- usri11_max_storage: DWORD;
- usri11_units_per_week: DWORD;
- usri11_logon_hours: PBYTE;
- usri11_code_page: DWORD;
- end;
- TUserInfo11 = _USER_INFO_11;
- {$EXTERNALSYM USER_INFO_11}
- USER_INFO_11 = _USER_INFO_11;
- PUserInfo20 = ^TUserInfo20;
- {$EXTERNALSYM _USER_INFO_20}
- _USER_INFO_20 = record
- usri20_name: LPWSTR;
- usri20_full_name: LPWSTR;
- usri20_comment: LPWSTR;
- usri20_flags: DWORD;
- usri20_user_id: DWORD;
- end;
- TUserInfo20 = _USER_INFO_20;
- {$EXTERNALSYM USER_INFO_20}
- USER_INFO_20 = _USER_INFO_20;
- PUserInfo21 = ^TUserInfo21;
- {$EXTERNALSYM _USER_INFO_21}
- _USER_INFO_21 = record
- usri21_password: array[0..ENCRYPTED_PWLEN-1] of Byte;
- end;
- TUserInfo21 = _USER_INFO_21;
- {$EXTERNALSYM USER_INFO_21}
- USER_INFO_21 = _USER_INFO_21;
- PUserInfo22 = ^TUserInfo22;
- {$EXTERNALSYM _USER_INFO_22}
- _USER_INFO_22 = record
- usri22_name: LPWSTR;
- usri22_password: array[0..ENCRYPTED_PWLEN-1] of Byte;
- usri22_password_age: DWORD;
- usri22_priv: DWORD;
- usri22_home_dir: LPWSTR;
- usri22_comment: LPWSTR;
- usri22_flags: DWORD;
- usri22_script_path: LPWSTR;
- usri22_auth_flags: DWORD;
- usri22_full_name: LPWSTR;
- usri22_usr_comment: LPWSTR;
- usri22_parms: LPWSTR;
- usri22_workstations: LPWSTR;
- usri22_last_logon: DWORD;
- usri22_last_logoff: DWORD;
- usri22_acct_expires: DWORD;
- usri22_max_storage: DWORD;
- usri22_units_per_week: DWORD;
- usri22_logon_hours: PBYTE;
- usri22_bad_pw_count: DWORD;
- usri22_num_logons: DWORD;
- usri22_logon_server: LPWSTR;
- usri22_country_code: DWORD;
- usri22_code_page: DWORD;
- end;
- TUserInfo22 = _USER_INFO_22;
- {$EXTERNALSYM USER_INFO_22}
- USER_INFO_22 = _USER_INFO_22;
- PUserInfo1003 = ^TUserInfo1003;
- {$EXTERNALSYM _USER_INFO_1003}
- _USER_INFO_1003 = record
- usri1003_password: LPWSTR;
- end;
- TUserInfo1003 = _USER_INFO_1003;
- {$EXTERNALSYM USER_INFO_1003}
- USER_INFO_1003 = _USER_INFO_1003;
- PUserInfo1005 = ^TUserInfo1005;
- {$EXTERNALSYM _USER_INFO_1005}
- _USER_INFO_1005 = record
- usri1005_priv: DWORD;
- end;
- TUserInfo1005 = _USER_INFO_1005;
- {$EXTERNALSYM USER_INFO_1005}
- USER_INFO_1005 = _USER_INFO_1005;
- PUserInfo1006 = ^TUserInfo1006;
- {$EXTERNALSYM _USER_INFO_1006}
- _USER_INFO_1006 = record
- usri1006_home_dir: LPWSTR;
- end;
- TUserInfo1006 = _USER_INFO_1006;
- {$EXTERNALSYM USER_INFO_1006}
- USER_INFO_1006 = _USER_INFO_1006;
- PUserInfo1007 = ^TUserInfo1007;
- {$EXTERNALSYM _USER_INFO_1007}
- _USER_INFO_1007 = record
- usri1007_comment: LPWSTR;
- end;
- TUserInfo1007 = _USER_INFO_1007;
- {$EXTERNALSYM USER_INFO_1007}
- USER_INFO_1007 = _USER_INFO_1007;
- PUserInfo1008 = ^TUserInfo1008;
- {$EXTERNALSYM _USER_INFO_1008}
- _USER_INFO_1008 = record
- usri1008_flags: DWORD;
- end;
- TUserInfo1008 = _USER_INFO_1008;
- {$EXTERNALSYM USER_INFO_1008}
- USER_INFO_1008 = _USER_INFO_1008;
- PUserInfo1009 = ^TUserInfo1009;
- {$EXTERNALSYM _USER_INFO_1009}
- _USER_INFO_1009 = record
- usri1009_script_path: LPWSTR;
- end;
- TUserInfo1009 = _USER_INFO_1009;
- {$EXTERNALSYM USER_INFO_1009}
- USER_INFO_1009 = _USER_INFO_1009;
- PUserInfo1010 = ^TUserInfo1010;
- {$EXTERNALSYM _USER_INFO_1010}
- _USER_INFO_1010 = record
- usri1010_auth_flags: DWORD;
- end;
- TUserInfo1010 = _USER_INFO_1010;
- {$EXTERNALSYM USER_INFO_1010}
- USER_INFO_1010 = _USER_INFO_1010;
- PUserInfo1011 = ^TUserInfo1011;
- {$EXTERNALSYM _USER_INFO_1011}
- _USER_INFO_1011 = record
- usri1011_full_name: LPWSTR;
- end;
- TUserInfo1011 = _USER_INFO_1011;
- {$EXTERNALSYM USER_INFO_1011}
- USER_INFO_1011 = _USER_INFO_1011;
- PUserInfo1012 = ^TUserInfo1012;
- {$EXTERNALSYM _USER_INFO_1012}
- _USER_INFO_1012 = record
- usri1012_usr_comment: LPWSTR;
- end;
- TUserInfo1012 = _USER_INFO_1012;
- {$EXTERNALSYM USER_INFO_1012}
- USER_INFO_1012 = _USER_INFO_1012;
- PUserInfo1013 = ^TUserInfo1013;
- {$EXTERNALSYM _USER_INFO_1013}
- _USER_INFO_1013 = record
- usri1013_parms: LPWSTR;
- end;
- TUserInfo1013 = _USER_INFO_1013;
- {$EXTERNALSYM USER_INFO_1013}
- USER_INFO_1013 = _USER_INFO_1013;
- PUserInfo1014 = ^TUserInfo1014;
- {$EXTERNALSYM _USER_INFO_1014}
- _USER_INFO_1014 = record
- usri1014_workstations: LPWSTR;
- end;
- TUserInfo1014 = _USER_INFO_1014;
- {$EXTERNALSYM USER_INFO_1014}
- USER_INFO_1014 = _USER_INFO_1014;
- PUserInfo1017 = ^TUserInfo1017;
- {$EXTERNALSYM _USER_INFO_1017}
- _USER_INFO_1017 = record
- usri1017_acct_expires: DWORD;
- end;
- TUserInfo1017 = _USER_INFO_1017;
- {$EXTERNALSYM USER_INFO_1017}
- USER_INFO_1017 = _USER_INFO_1017;
- PUserInfo1018 = ^TUserInfo1018;
- {$EXTERNALSYM _USER_INFO_1018}
- _USER_INFO_1018 = record
- usri1018_max_storage: DWORD;
- end;
- TUserInfo1018 = _USER_INFO_1018;
- {$EXTERNALSYM USER_INFO_1018}
- USER_INFO_1018 = _USER_INFO_1018;
- PUserInfo1020 = ^TUserInfo1020;
- {$EXTERNALSYM _USER_INFO_1020}
- _USER_INFO_1020 = record
- usri1020_units_per_week: DWORD;
- usri1020_logon_hours: Pointer;
- end;
- TUserInfo1020 = _USER_INFO_1020;
- {$EXTERNALSYM USER_INFO_1020}
- USER_INFO_1020 = _USER_INFO_1020;
- PUserInfo1023 = ^TUserInfo1023;
- {$EXTERNALSYM _USER_INFO_1023}
- _USER_INFO_1023 = record
- usri1023_logon_server: LPWSTR;
- end;
- TUserInfo1023 = _USER_INFO_1023;
- {$EXTERNALSYM USER_INFO_1023}
- USER_INFO_1023 = _USER_INFO_1023;
- PUserInfo1024 = ^TUserInfo1024;
- {$EXTERNALSYM _USER_INFO_1024}
- _USER_INFO_1024 = record
- usri1024_country_code: DWORD;
- end;
- TUserInfo1024 = _USER_INFO_1024;
- {$EXTERNALSYM USER_INFO_1024}
- USER_INFO_1024 = _USER_INFO_1024;
- PUserInfo1025 = ^TUserInfo1025;
- {$EXTERNALSYM _USER_INFO_1025}
- _USER_INFO_1025 = record
- usri1025_code_page: DWORD;
- end;
- TUserInfo1025 = _USER_INFO_1025;
- {$EXTERNALSYM USER_INFO_1025}
- USER_INFO_1025 = _USER_INFO_1025;
- PUserInfo1051 = ^TUserInfo1051;
- {$EXTERNALSYM _USER_INFO_1051}
- _USER_INFO_1051 = record
- usri1051_primary_group_id: DWORD;
- end;
- TUserInfo1051 = _USER_INFO_1051;
- {$EXTERNALSYM USER_INFO_1051}
- USER_INFO_1051 = _USER_INFO_1051;
- PUserInfo1052 = ^TUserInfo1052;
- {$EXTERNALSYM _USER_INFO_1052}
- _USER_INFO_1052 = record
- usri1052_profile: LPWSTR;
- end;
- TUserInfo1052 = _USER_INFO_1052;
- {$EXTERNALSYM USER_INFO_1052}
- USER_INFO_1052 = _USER_INFO_1052;
- PUserInfo1053 = ^TUserInfo1053;
- {$EXTERNALSYM _USER_INFO_1053}
- _USER_INFO_1053 = record
- usri1053_home_dir_drive: LPWSTR;
- end;
- TUserInfo1053 = _USER_INFO_1053;
- {$EXTERNALSYM USER_INFO_1053}
- USER_INFO_1053 = _USER_INFO_1053;
- // Data Structures - User Modals
- PUserModalsInfo0 = ^TUserModalsInfo0;
- {$EXTERNALSYM _USER_MODALS_INFO_0}
- _USER_MODALS_INFO_0 = record
- usrmod0_min_passwd_len: DWORD;
- usrmod0_max_passwd_age: DWORD;
- usrmod0_min_passwd_age: DWORD;
- usrmod0_force_logoff: DWORD;
- usrmod0_password_hist_len: DWORD;
- end;
- TUserModalsInfo0 = _USER_MODALS_INFO_0;
- {$EXTERNALSYM USER_MODALS_INFO_0}
- USER_MODALS_INFO_0 = _USER_MODALS_INFO_0;
- PUserModalsInfo1 = ^TUserModalsInfo1;
- {$EXTERNALSYM _USER_MODALS_INFO_1}
- _USER_MODALS_INFO_1 = record
- usrmod1_role: DWORD;
- usrmod1_primary: LPWSTR;
- end;
- TUserModalsInfo1 = _USER_MODALS_INFO_1;
- {$EXTERNALSYM USER_MODALS_INFO_1}
- USER_MODALS_INFO_1 = _USER_MODALS_INFO_1;
- PUserModalsInfo2 = ^TUserModalsInfo2;
- {$EXTERNALSYM _USER_MODALS_INFO_2}
- _USER_MODALS_INFO_2 = record
- usrmod2_domain_name: LPWSTR;
- usrmod2_domain_id: PSID;
- end;
- TUserModalsInfo2 = _USER_MODALS_INFO_2;
- {$EXTERNALSYM USER_MODALS_INFO_2}
- USER_MODALS_INFO_2 = _USER_MODALS_INFO_2;
- PUserModalsInfo3 = ^TUserModalsInfo3;
- {$EXTERNALSYM _USER_MODALS_INFO_3}
- _USER_MODALS_INFO_3 = record
- usrmod3_lockout_duration: DWORD;
- usrmod3_lockout_observation_window: DWORD;
- usrmod3_lockout_threshold: DWORD;
- end;
- TUserModalsInfo3 = _USER_MODALS_INFO_3;
- {$EXTERNALSYM USER_MODALS_INFO_3}
- USER_MODALS_INFO_3 = _USER_MODALS_INFO_3;
- PUserModalsInfo1001 = ^TUserModalsInfo1001;
- {$EXTERNALSYM _USER_MODALS_INFO_1001}
- _USER_MODALS_INFO_1001 = record
- usrmod1001_min_passwd_len: DWORD;
- end;
- TUserModalsInfo1001 = _USER_MODALS_INFO_1001;
- {$EXTERNALSYM USER_MODALS_INFO_1001}
- USER_MODALS_INFO_1001 = _USER_MODALS_INFO_1001;
- PUserModalsInfo1002 = ^TUserModalsInfo1002;
- {$EXTERNALSYM _USER_MODALS_INFO_1002}
- _USER_MODALS_INFO_1002 = record
- usrmod1002_max_passwd_age: DWORD;
- end;
- TUserModalsInfo1002 = _USER_MODALS_INFO_1002;
- {$EXTERNALSYM USER_MODALS_INFO_1002}
- USER_MODALS_INFO_1002 = _USER_MODALS_INFO_1002;
- PUserModalsInfo1003 = ^TUserModalsInfo1003;
- {$EXTERNALSYM _USER_MODALS_INFO_1003}
- _USER_MODALS_INFO_1003 = record
- usrmod1003_min_passwd_age: DWORD;
- end;
- TUserModalsInfo1003 = _USER_MODALS_INFO_1003;
- {$EXTERNALSYM USER_MODALS_INFO_1003}
- USER_MODALS_INFO_1003 = _USER_MODALS_INFO_1003;
- PUserModalsInfo1004 = ^TUserModalsInfo1004;
- {$EXTERNALSYM _USER_MODALS_INFO_1004}
- _USER_MODALS_INFO_1004 = record
- usrmod1004_force_logoff: DWORD;
- end;
- TUserModalsInfo1004 = _USER_MODALS_INFO_1004;
- {$EXTERNALSYM USER_MODALS_INFO_1004}
- USER_MODALS_INFO_1004 = _USER_MODALS_INFO_1004;
- PUserModalsInfo1005 = ^TUserModalsInfo1005;
- {$EXTERNALSYM _USER_MODALS_INFO_1005}
- _USER_MODALS_INFO_1005 = record
- usrmod1005_password_hist_len: DWORD;
- end;
- TUserModalsInfo1005 = _USER_MODALS_INFO_1005;
- {$EXTERNALSYM USER_MODALS_INFO_1005}
- USER_MODALS_INFO_1005 = _USER_MODALS_INFO_1005;
- PUserModalsInfo1006 = ^TUserModalsInfo1006;
- {$EXTERNALSYM _USER_MODALS_INFO_1006}
- _USER_MODALS_INFO_1006 = record
- usrmod1006_role: DWORD;
- end;
- TUserModalsInfo1006 = _USER_MODALS_INFO_1006;
- {$EXTERNALSYM USER_MODALS_INFO_1006}
- USER_MODALS_INFO_1006 = _USER_MODALS_INFO_1006;
- PUserModalsInfo1007 = ^TUserModalsInfo1007;
- {$EXTERNALSYM _USER_MODALS_INFO_1007}
- _USER_MODALS_INFO_1007 = record
- usrmod1007_primary: LPWSTR;
- end;
- TUserModalsInfo1007 = _USER_MODALS_INFO_1007;
- {$EXTERNALSYM USER_MODALS_INFO_1007}
- USER_MODALS_INFO_1007 = _USER_MODALS_INFO_1007;
- // Special Values and Constants - User
- // Bit masks for field usriX_flags of USER_INFO_X (X = 0/1).
- const
- {$EXTERNALSYM UF_SCRIPT}
- UF_SCRIPT = $0001;
- {$EXTERNALSYM UF_ACCOUNTDISABLE}
- UF_ACCOUNTDISABLE = $0002;
- {$EXTERNALSYM UF_HOMEDIR_REQUIRED}
- UF_HOMEDIR_REQUIRED = $0008;
- {$EXTERNALSYM UF_LOCKOUT}
- UF_LOCKOUT = $0010;
- {$EXTERNALSYM UF_PASSWD_NOTREQD}
- UF_PASSWD_NOTREQD = $0020;
- {$EXTERNALSYM UF_PASSWD_CANT_CHANGE}
- UF_PASSWD_CANT_CHANGE = $0040;
- {$EXTERNALSYM UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED}
- UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED = $0080;
- // Account type bits as part of usri_flags.
- {$EXTERNALSYM UF_TEMP_DUPLICATE_ACCOUNT}
- UF_TEMP_DUPLICATE_ACCOUNT = $0100;
- {$EXTERNALSYM UF_NORMAL_ACCOUNT}
- UF_NORMAL_ACCOUNT = $0200;
- {$EXTERNALSYM UF_INTERDOMAIN_TRUST_ACCOUNT}
- UF_INTERDOMAIN_TRUST_ACCOUNT = $0800;
- {$EXTERNALSYM UF_WORKSTATION_TRUST_ACCOUNT}
- UF_WORKSTATION_TRUST_ACCOUNT = $1000;
- {$EXTERNALSYM UF_SERVER_TRUST_ACCOUNT}
- UF_SERVER_TRUST_ACCOUNT = $2000;
- {$EXTERNALSYM UF_MACHINE_ACCOUNT_MASK}
- UF_MACHINE_ACCOUNT_MASK = UF_INTERDOMAIN_TRUST_ACCOUNT or
- UF_WORKSTATION_TRUST_ACCOUNT or UF_SERVER_TRUST_ACCOUNT;
- {$EXTERNALSYM UF_ACCOUNT_TYPE_MASK}
- UF_ACCOUNT_TYPE_MASK = UF_TEMP_DUPLICATE_ACCOUNT or UF_NORMAL_ACCOUNT or
- UF_INTERDOMAIN_TRUST_ACCOUNT or UF_WORKSTATION_TRUST_ACCOUNT or
- UF_SERVER_TRUST_ACCOUNT;
- {$EXTERNALSYM UF_DONT_EXPIRE_PASSWD}
- UF_DONT_EXPIRE_PASSWD = $10000;
- {$EXTERNALSYM UF_MNS_LOGON_ACCOUNT}
- UF_MNS_LOGON_ACCOUNT = $20000;
- {$EXTERNALSYM UF_SMARTCARD_REQUIRED}
- UF_SMARTCARD_REQUIRED = $40000;
- {$EXTERNALSYM UF_TRUSTED_FOR_DELEGATION}
- UF_TRUSTED_FOR_DELEGATION = $80000;
- {$EXTERNALSYM UF_NOT_DELEGATED}
- UF_NOT_DELEGATED = $100000;
- {$EXTERNALSYM UF_USE_DES_KEY_ONLY}
- UF_USE_DES_KEY_ONLY = $200000;
- {$EXTERNALSYM UF_DONT_REQUIRE_PREAUTH}
- UF_DONT_REQUIRE_PREAUTH = $400000;
- {$EXTERNALSYM UF_SETTABLE_BITS}
- UF_SETTABLE_BITS = UF_SCRIPT or UF_ACCOUNTDISABLE or UF_LOCKOUT or
- UF_HOMEDIR_REQUIRED or UF_PASSWD_NOTREQD or UF_PASSWD_CANT_CHANGE or
- UF_ACCOUNT_TYPE_MASK or UF_DONT_EXPIRE_PASSWD or UF_MNS_LOGON_ACCOUNT or
- UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED or UF_SMARTCARD_REQUIRED or
- UF_TRUSTED_FOR_DELEGATION or UF_NOT_DELEGATED or UF_USE_DES_KEY_ONLY or
- UF_DONT_REQUIRE_PREAUTH;
- // bit masks for the NetUserEnum filter parameter.
- {$EXTERNALSYM FILTER_TEMP_DUPLICATE_ACCOUNT}
- FILTER_TEMP_DUPLICATE_ACCOUNT = $0001;
- {$EXTERNALSYM FILTER_NORMAL_ACCOUNT}
- FILTER_NORMAL_ACCOUNT = $0002;
- {$EXTERNALSYM FILTER_PROXY_ACCOUNT}
- FILTER_PROXY_ACCOUNT = $0004;
- {$EXTERNALSYM FILTER_INTERDOMAIN_TRUST_ACCOUNT}
- FILTER_INTERDOMAIN_TRUST_ACCOUNT = $0008;
- {$EXTERNALSYM FILTER_WORKSTATION_TRUST_ACCOUNT}
- FILTER_WORKSTATION_TRUST_ACCOUNT = $0010;
- {$EXTERNALSYM FILTER_SERVER_TRUST_ACCOUNT}
- FILTER_SERVER_TRUST_ACCOUNT = $0020;
- // bit masks for the NetUserGetLocalGroups flags
- {$EXTERNALSYM LG_INCLUDE_INDIRECT}
- LG_INCLUDE_INDIRECT = $0001;
- // Bit masks for field usri2_auth_flags of USER_INFO_2.
- {$EXTERNALSYM AF_OP_PRINT}
- AF_OP_PRINT = $1;
- {$EXTERNALSYM AF_OP_COMM}
- AF_OP_COMM = $2;
- {$EXTERNALSYM AF_OP_SERVER}
- AF_OP_SERVER = $4;
- {$EXTERNALSYM AF_OP_ACCOUNTS}
- AF_OP_ACCOUNTS = $8;
- {$EXTERNALSYM AF_SETTABLE_BITS}
- AF_SETTABLE_BITS = AF_OP_PRINT or AF_OP_COMM or AF_OP_SERVER or AF_OP_ACCOUNTS;
- // UAS role manifests under NETLOGON
- {$EXTERNALSYM UAS_ROLE_STANDALONE}
- UAS_ROLE_STANDALONE = 0;
- {$EXTERNALSYM UAS_ROLE_MEMBER}
- UAS_ROLE_MEMBER = 1;
- {$EXTERNALSYM UAS_ROLE_BACKUP}
- UAS_ROLE_BACKUP = 2;
- {$EXTERNALSYM UAS_ROLE_PRIMARY}
- UAS_ROLE_PRIMARY = 3;
- // Values for ParmError for NetUserSetInfo.
- {$EXTERNALSYM USER_NAME_PARMNUM}
- USER_NAME_PARMNUM = 1;
- {$EXTERNALSYM USER_PASSWORD_PARMNUM}
- USER_PASSWORD_PARMNUM = 3;
- {$EXTERNALSYM USER_PASSWORD_AGE_PARMNUM}
- USER_PASSWORD_AGE_PARMNUM = 4;
- {$EXTERNALSYM USER_PRIV_PARMNUM}
- USER_PRIV_PARMNUM = 5;
- {$EXTERNALSYM USER_HOME_DIR_PARMNUM}
- USER_HOME_DIR_PARMNUM = 6;
- {$EXTERNALSYM USER_COMMENT_PARMNUM}
- USER_COMMENT_PARMNUM = 7;
- {$EXTERNALSYM USER_FLAGS_PARMNUM}
- USER_FLAGS_PARMNUM = 8;
- {$EXTERNALSYM USER_SCRIPT_PATH_PARMNUM}
- USER_SCRIPT_PATH_PARMNUM = 9;
- {$EXTERNALSYM USER_AUTH_FLAGS_PARMNUM}
- USER_AUTH_FLAGS_PARMNUM = 10;
- {$EXTERNALSYM USER_FULL_NAME_PARMNUM}
- USER_FULL_NAME_PARMNUM = 11;
- {$EXTERNALSYM USER_USR_COMMENT_PARMNUM}
- USER_USR_COMMENT_PARMNUM = 12;
- {$EXTERNALSYM USER_PARMS_PARMNUM}
- USER_PARMS_PARMNUM = 13;
- {$EXTERNALSYM USER_WORKSTATIONS_PARMNUM}
- USER_WORKSTATIONS_PARMNUM = 14;
- {$EXTERNALSYM USER_LAST_LOGON_PARMNUM}
- USER_LAST_LOGON_PARMNUM = 15;
- {$EXTERNALSYM USER_LAST_LOGOFF_PARMNUM}
- USER_LAST_LOGOFF_PARMNUM = 16;
- {$EXTERNALSYM USER_ACCT_EXPIRES_PARMNUM}
- USER_ACCT_EXPIRES_PARMNUM = 17;
- {$EXTERNALSYM USER_MAX_STORAGE_PARMNUM}
- USER_MAX_STORAGE_PARMNUM = 18;
- {$EXTERNALSYM USER_UNITS_PER_WEEK_PARMNUM}
- USER_UNITS_PER_WEEK_PARMNUM = 19;
- {$EXTERNALSYM USER_LOGON_HOURS_PARMNUM}
- USER_LOGON_HOURS_PARMNUM = 20;
- {$EXTERNALSYM USER_PAD_PW_COUNT_PARMNUM}
- USER_PAD_PW_COUNT_PARMNUM = 21;
- {$EXTERNALSYM USER_NUM_LOGONS_PARMNUM}
- USER_NUM_LOGONS_PARMNUM = 22;
- {$EXTERNALSYM USER_LOGON_SERVER_PARMNUM}
- USER_LOGON_SERVER_PARMNUM = 23;
- {$EXTERNALSYM USER_COUNTRY_CODE_PARMNUM}
- USER_COUNTRY_CODE_PARMNUM = 24;
- {$EXTERNALSYM USER_CODE_PAGE_PARMNUM}
- USER_CODE_PAGE_PARMNUM = 25;
- {$EXTERNALSYM USER_PRIMARY_GROUP_PARMNUM}
- USER_PRIMARY_GROUP_PARMNUM = 51;
- {$EXTERNALSYM USER_PROFILE}
- USER_PROFILE = 52; // ?? Delete when convenient
- {$EXTERNALSYM USER_PROFILE_PARMNUM}
- USER_PROFILE_PARMNUM = 52;
- {$EXTERNALSYM USER_HOME_DIR_DRIVE_PARMNUM}
- USER_HOME_DIR_DRIVE_PARMNUM = 53;
- // the new infolevel counterparts of the old info level + parmnum
- {$EXTERNALSYM USER_NAME_INFOLEVEL}
- USER_NAME_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + USER_NAME_PARMNUM);
- {$EXTERNALSYM USER_PASSWORD_INFOLEVEL}
- USER_PASSWORD_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + USER_PASSWORD_PARMNUM);
- {$EXTERNALSYM USER_PASSWORD_AGE_INFOLEVEL}
- USER_PASSWORD_AGE_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + USER_PASSWORD_AGE_PARMNUM);
- {$EXTERNALSYM USER_PRIV_INFOLEVEL}
- USER_PRIV_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + USER_PRIV_PARMNUM);
- {$EXTERNALSYM USER_HOME_DIR_INFOLEVEL}
- USER_HOME_DIR_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + USER_HOME_DIR_PARMNUM);
- {$EXTERNALSYM USER_COMMENT_INFOLEVEL}
- USER_COMMENT_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + USER_COMMENT_PARMNUM);
- {$EXTERNALSYM USER_FLAGS_INFOLEVEL}
- USER_FLAGS_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + USER_FLAGS_PARMNUM);
- {$EXTERNALSYM USER_SCRIPT_PATH_INFOLEVEL}
- USER_SCRIPT_PATH_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + USER_SCRIPT_PATH_PARMNUM);
- {$EXTERNALSYM USER_AUTH_FLAGS_INFOLEVEL}
- USER_AUTH_FLAGS_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + USER_AUTH_FLAGS_PARMNUM);
- {$EXTERNALSYM USER_FULL_NAME_INFOLEVEL}
- USER_FULL_NAME_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + USER_FULL_NAME_PARMNUM);
- {$EXTERNALSYM USER_USR_COMMENT_INFOLEVEL}
- USER_USR_COMMENT_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + USER_USR_COMMENT_PARMNUM);
- {$EXTERNALSYM USER_PARMS_INFOLEVEL}
- USER_PARMS_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + USER_PARMS_PARMNUM);
- {$EXTERNALSYM USER_WORKSTATIONS_INFOLEVEL}
- USER_WORKSTATIONS_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + USER_WORKSTATIONS_PARMNUM);
- {$EXTERNALSYM USER_LAST_LOGON_INFOLEVEL}
- USER_LAST_LOGON_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + USER_LAST_LOGON_PARMNUM);
- {$EXTERNALSYM USER_LAST_LOGOFF_INFOLEVEL}
- USER_LAST_LOGOFF_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + USER_LAST_LOGOFF_PARMNUM);
- {$EXTERNALSYM USER_ACCT_EXPIRES_INFOLEVEL}
- USER_ACCT_EXPIRES_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + USER_ACCT_EXPIRES_PARMNUM);
- {$EXTERNALSYM USER_MAX_STORAGE_INFOLEVEL}
- USER_MAX_STORAGE_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + USER_MAX_STORAGE_PARMNUM);
- {$EXTERNALSYM USER_UNITS_PER_WEEK_INFOLEVEL}
- USER_UNITS_PER_WEEK_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + USER_UNITS_PER_WEEK_PARMNUM);
- {$EXTERNALSYM USER_LOGON_HOURS_INFOLEVEL}
- USER_LOGON_HOURS_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + USER_LOGON_HOURS_PARMNUM);
- {$EXTERNALSYM USER_PAD_PW_COUNT_INFOLEVEL}
- USER_PAD_PW_COUNT_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + USER_PAD_PW_COUNT_PARMNUM);
- {$EXTERNALSYM USER_NUM_LOGONS_INFOLEVEL}
- USER_NUM_LOGONS_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + USER_NUM_LOGONS_PARMNUM);
- {$EXTERNALSYM USER_LOGON_SERVER_INFOLEVEL}
- USER_LOGON_SERVER_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + USER_LOGON_SERVER_PARMNUM);
- {$EXTERNALSYM USER_COUNTRY_CODE_INFOLEVEL}
- USER_COUNTRY_CODE_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + USER_COUNTRY_CODE_PARMNUM);
- {$EXTERNALSYM USER_CODE_PAGE_INFOLEVEL}
- USER_CODE_PAGE_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + USER_CODE_PAGE_PARMNUM);
- {$EXTERNALSYM USER_PRIMARY_GROUP_INFOLEVEL}
- USER_PRIMARY_GROUP_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + USER_PRIMARY_GROUP_PARMNUM);
- // {$EXTERNALSYM USER_POSIX_ID_INFOLEVEL}
- // USER_POSIX_ID_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + USER_POSIX_ID_PARMNUM);
- {$EXTERNALSYM USER_HOME_DIR_DRIVE_INFOLEVEL}
- USER_HOME_DIR_DRIVE_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + USER_HOME_DIR_DRIVE_PARMNUM);
- // For SetInfo call (parmnum 0) when password change not required
- {$EXTERNALSYM NULL_USERSETINFO_PASSWD}
- NULL_USERSETINFO_PASSWD = ' ';
- {$EXTERNALSYM TIMEQ_FOREVER}
- TIMEQ_FOREVER = DWORD(-1);
- {$EXTERNALSYM USER_MAXSTORAGE_UNLIMITED}
- USER_MAXSTORAGE_UNLIMITED = DWORD(-1);
- {$EXTERNALSYM USER_NO_LOGOFF}
- USER_NO_LOGOFF = DWORD(-1);
- {$EXTERNALSYM UNITS_PER_DAY}
- UNITS_PER_DAY = 24;
- {$EXTERNALSYM UNITS_PER_WEEK}
- UNITS_PER_WEEK = UNITS_PER_DAY * 7;
- // Privilege levels (USER_INFO_X field usriX_priv (X = 0/1)).
- {$EXTERNALSYM USER_PRIV_MASK}
- USER_PRIV_MASK = $3;
- {$EXTERNALSYM USER_PRIV_GUEST}
- USER_PRIV_GUEST = 0;
- {$EXTERNALSYM USER_PRIV_USER}
- USER_PRIV_USER = 1;
- {$EXTERNALSYM USER_PRIV_ADMIN}
- USER_PRIV_ADMIN = 2;
- // user modals related defaults
- {$EXTERNALSYM MAX_PASSWD_LEN}
- MAX_PASSWD_LEN = PWLEN;
- {$EXTERNALSYM DEF_MIN_PWLEN}
- DEF_MIN_PWLEN = 6;
- {$EXTERNALSYM DEF_PWUNIQUENESS}
- DEF_PWUNIQUENESS = 5;
- {$EXTERNALSYM DEF_MAX_PWHIST}
- DEF_MAX_PWHIST = 8;
- {$EXTERNALSYM DEF_MAX_PWAGE}
- DEF_MAX_PWAGE = TIMEQ_FOREVER; // forever
- {$EXTERNALSYM DEF_MIN_PWAGE}
- DEF_MIN_PWAGE = 0; // 0 days
- {$EXTERNALSYM DEF_FORCE_LOGOFF}
- DEF_FORCE_LOGOFF = MAXDWORD; // never
- {$EXTERNALSYM DEF_MAX_BADPW}
- DEF_MAX_BADPW = 0; // no limit
- {$EXTERNALSYM ONE_DAY}
- ONE_DAY = 01*24*3600; // 01 day
- // User Logon Validation (codes returned)
- {$EXTERNALSYM VALIDATED_LOGON}
- VALIDATED_LOGON = 0;
- {$EXTERNALSYM PASSWORD_EXPIRED}
- PASSWORD_EXPIRED = 2;
- {$EXTERNALSYM NON_VALIDATED_LOGON}
- NON_VALIDATED_LOGON = 3;
- {$EXTERNALSYM VALID_LOGOFF}
- VALID_LOGOFF = 1;
- // parmnum manifests for user modals
- {$EXTERNALSYM MODALS_MIN_PASSWD_LEN_PARMNUM}
- MODALS_MIN_PASSWD_LEN_PARMNUM = 1;
- {$EXTERNALSYM MODALS_MAX_PASSWD_AGE_PARMNUM}
- MODALS_MAX_PASSWD_AGE_PARMNUM = 2;
- {$EXTERNALSYM MODALS_MIN_PASSWD_AGE_PARMNUM}
- MODALS_MIN_PASSWD_AGE_PARMNUM = 3;
- {$EXTERNALSYM MODALS_FORCE_LOGOFF_PARMNUM}
- MODALS_FORCE_LOGOFF_PARMNUM = 4;
- {$EXTERNALSYM MODALS_PASSWD_HIST_LEN_PARMNUM}
- MODALS_PASSWD_HIST_LEN_PARMNUM = 5;
- {$EXTERNALSYM MODALS_ROLE_PARMNUM}
- MODALS_ROLE_PARMNUM = 6;
- {$EXTERNALSYM MODALS_PRIMARY_PARMNUM}
- MODALS_PRIMARY_PARMNUM = 7;
- {$EXTERNALSYM MODALS_DOMAIN_NAME_PARMNUM}
- MODALS_DOMAIN_NAME_PARMNUM = 8;
- {$EXTERNALSYM MODALS_DOMAIN_ID_PARMNUM}
- MODALS_DOMAIN_ID_PARMNUM = 9;
- {$EXTERNALSYM MODALS_LOCKOUT_DURATION_PARMNUM}
- MODALS_LOCKOUT_DURATION_PARMNUM = 10;
- {$EXTERNALSYM MODALS_LOCKOUT_OBSERVATION_WINDOW_PARMNUM}
- MODALS_LOCKOUT_OBSERVATION_WINDOW_PARMNUM = 11;
- {$EXTERNALSYM MODALS_LOCKOUT_THRESHOLD_PARMNUM}
- MODALS_LOCKOUT_THRESHOLD_PARMNUM = 12;
- // the new infolevel counterparts of the old info level + parmnum
- {$EXTERNALSYM MODALS_MIN_PASSWD_LEN_INFOLEVEL}
- MODALS_MIN_PASSWD_LEN_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + MODALS_MIN_PASSWD_LEN_PARMNUM);
- {$EXTERNALSYM MODALS_MAX_PASSWD_AGE_INFOLEVEL}
- MODALS_MAX_PASSWD_AGE_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + MODALS_MAX_PASSWD_AGE_PARMNUM);
- {$EXTERNALSYM MODALS_MIN_PASSWD_AGE_INFOLEVEL}
- MODALS_MIN_PASSWD_AGE_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + MODALS_MIN_PASSWD_AGE_PARMNUM);
- {$EXTERNALSYM MODALS_FORCE_LOGOFF_INFOLEVEL}
- MODALS_FORCE_LOGOFF_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + MODALS_FORCE_LOGOFF_PARMNUM);
- {$EXTERNALSYM MODALS_PASSWD_HIST_LEN_INFOLEVEL}
- MODALS_PASSWD_HIST_LEN_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + MODALS_PASSWD_HIST_LEN_PARMNUM);
- {$EXTERNALSYM MODALS_ROLE_INFOLEVEL}
- MODALS_ROLE_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + MODALS_ROLE_PARMNUM);
- {$EXTERNALSYM MODALS_PRIMARY_INFOLEVEL}
- MODALS_PRIMARY_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + MODALS_PRIMARY_PARMNUM);
- {$EXTERNALSYM MODALS_DOMAIN_NAME_INFOLEVEL}
- MODALS_DOMAIN_NAME_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + MODALS_DOMAIN_NAME_PARMNUM);
- {$EXTERNALSYM MODALS_DOMAIN_ID_INFOLEVEL}
- MODALS_DOMAIN_ID_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + MODALS_DOMAIN_ID_PARMNUM);
- // Group Class
- // Function Prototypes
- {$EXTERNALSYM NetGroupAdd}
- function NetGroupAdd(servername: LPCWSTR; level: DWORD; buf: Pointer;
- parm_err: PDWORD): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetGroupAddUser}
- function NetGroupAddUser(servername: LPCWSTR; GroupName: LPCWSTR;
- username: LPCWSTR): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetGroupEnum}
- function NetGroupEnum(servername: LPCWSTR; level: DWORD; var bufptr: Pointer;
- prefmaxlen: DWORD; var entriesread: DWORD; var totalentries: DWORD;
- resume_handle: PDWORD): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetGroupGetInfo}
- function NetGroupGetInfo(servername: LPCWSTR; groupname: LPCWSTR; level: DWORD;
- var bufptr: Pointer): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetGroupSetInfo}
- function NetGroupSetInfo(servername: LPCWSTR; groupname: LPCWSTR; level: DWORD;
- buf: Pointer; parm_err: PDWORD): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetGroupDel}
- function NetGroupDel(servername, groupname: LPCWSTR): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetGroupDelUser}
- function NetGroupDelUser(servername: LPCWSTR; GroupName: LPCWSTR;
- Username: LPCWSTR): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetGroupGetUsers}
- function NetGroupGetUsers(servername: LPCWSTR; groupname: LPCWSTR; level: DWORD;
- var bufptr: Pointer; prefmaxlen: DWORD; var entriesread: DWORD;
- var totalentries: DWORD; ResumeHandle: PDWORD): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetGroupSetUsers}
- function NetGroupSetUsers(servername: LPCWSTR; groupname: LPCWSTR; level: DWORD;
- buf: Pointer; totalentries: DWORD): NET_API_STATUS; stdcall;
- // Data Structures - Group
- type
- PGroupInfo0 = ^TGroupInfo0;
- {$EXTERNALSYM _GROUP_INFO_0}
- _GROUP_INFO_0 = record
- grpi0_name: LPWSTR;
- end;
- TGroupInfo0 = _GROUP_INFO_0;
- {$EXTERNALSYM GROUP_INFO_0}
- GROUP_INFO_0 = _GROUP_INFO_0;
- PGroupInfo1 = ^TGroupInfo1;
- {$EXTERNALSYM _GROUP_INFO_1}
- _GROUP_INFO_1 = record
- grpi1_name: LPWSTR;
- grpi1_comment: LPWSTR;
- end;
- TGroupInfo1 = _GROUP_INFO_1;
- {$EXTERNALSYM GROUP_INFO_1}
- GROUP_INFO_1 = _GROUP_INFO_1;
- PGroupInfo2 = ^TGroupInfo2;
- {$EXTERNALSYM _GROUP_INFO_2}
- _GROUP_INFO_2 = record
- grpi2_name: LPWSTR;
- grpi2_comment: LPWSTR;
- grpi2_group_id: DWORD;
- grpi2_attributes: DWORD;
- end;
- TGroupInfo2 = _GROUP_INFO_2;
- {$EXTERNALSYM GROUP_INFO_2}
- GROUP_INFO_2 = _GROUP_INFO_2;
- PGroupInfo1002 = ^TGroupInfo1002;
- {$EXTERNALSYM _GROUP_INFO_1002}
- _GROUP_INFO_1002 = record
- grpi1002_comment: LPWSTR;
- end;
- TGroupInfo1002 = _GROUP_INFO_1002;
- {$EXTERNALSYM GROUP_INFO_1002}
- GROUP_INFO_1002 = _GROUP_INFO_1002;
- PGroupInfo1005 = ^TGroupInfo1005;
- {$EXTERNALSYM _GROUP_INFO_1005}
- _GROUP_INFO_1005 = record
- grpi1005_attributes: DWORD;
- end;
- TGroupInfo1005 = _GROUP_INFO_1005;
- {$EXTERNALSYM GROUP_INFO_1005}
- GROUP_INFO_1005 = _GROUP_INFO_1005;
- PGroupUsersInfo0 = ^TGroupUsersInfo0;
- {$EXTERNALSYM _GROUP_USERS_INFO_0}
- _GROUP_USERS_INFO_0 = record
- grui0_name: LPWSTR;
- end;
- TGroupUsersInfo0 = _GROUP_USERS_INFO_0;
- {$EXTERNALSYM GROUP_USERS_INFO_0}
- GROUP_USERS_INFO_0 = _GROUP_USERS_INFO_0;
- PGroupUsersInfo1 = ^TGroupUsersInfo1;
- {$EXTERNALSYM _GROUP_USERS_INFO_1}
- _GROUP_USERS_INFO_1 = record
- grui1_name: LPWSTR;
- grui1_attributes: DWORD;
- end;
- TGroupUsersInfo1 = _GROUP_USERS_INFO_1;
- {$EXTERNALSYM GROUP_USERS_INFO_1}
- GROUP_USERS_INFO_1 = _GROUP_USERS_INFO_1;
- //
- // Special Values and Constants - Group
- //
- const
- {$EXTERNALSYM GROUPIDMASK}
- GROUPIDMASK = $8000; // MSB set if uid refers;
- // to a group
- // Predefined group for all normal users, administrators and guests
- // LOCAL is a special group for pinball local security.
- {$EXTERNALSYM GROUP_SPECIALGRP_USERS}
- GROUP_SPECIALGRP_USERS = 'USERS';
- {$EXTERNALSYM GROUP_SPECIALGRP_ADMINS}
- GROUP_SPECIALGRP_ADMINS = 'ADMINS';
- {$EXTERNALSYM GROUP_SPECIALGRP_GUESTS}
- GROUP_SPECIALGRP_GUESTS = 'GUESTS';
- {$EXTERNALSYM GROUP_SPECIALGRP_LOCAL}
- GROUP_SPECIALGRP_LOCAL = 'LOCAL';
- // parmnum manifests for SetInfo calls (only comment is settable)
- {$EXTERNALSYM GROUP_ALL_PARMNUM}
- GROUP_ALL_PARMNUM = 0;
- {$EXTERNALSYM GROUP_NAME_PARMNUM}
- GROUP_NAME_PARMNUM = 1;
- {$EXTERNALSYM GROUP_COMMENT_PARMNUM}
- GROUP_COMMENT_PARMNUM = 2;
- {$EXTERNALSYM GROUP_ATTRIBUTES_PARMNUM}
- GROUP_ATTRIBUTES_PARMNUM = 3;
- // the new infolevel counterparts of the old info level + parmnum
- {$EXTERNALSYM GROUP_ALL_INFOLEVEL}
- GROUP_ALL_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + GROUP_ALL_PARMNUM);
- {$EXTERNALSYM GROUP_NAME_INFOLEVEL}
- GROUP_NAME_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + GROUP_NAME_PARMNUM);
- {$EXTERNALSYM GROUP_COMMENT_INFOLEVEL}
- GROUP_COMMENT_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + GROUP_COMMENT_PARMNUM);
- {$EXTERNALSYM GROUP_ATTRIBUTES_INFOLEVEL}
- GROUP_ATTRIBUTES_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + GROUP_ATTRIBUTES_PARMNUM);
- // {$EXTERNALSYM GROUP_POSIX_ID_INFOLEVEL}
- // GROUP_POSIX_ID_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + GROUP_POSIX_ID_PARMNUM);
- // LocalGroup Class
- // Function Prototypes
- {$EXTERNALSYM NetLocalGroupAdd}
- function NetLocalGroupAdd(servername: LPCWSTR; level: DWORD; buf: Pointer;
- parm_err: PDWORD): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetLocalGroupAddMember}
- function NetLocalGroupAddMember(servername: LPCWSTR; groupname: LPCWSTR;
- membersid: PSID): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetLocalGroupEnum}
- function NetLocalGroupEnum(servername: LPCWSTR; level: DWORD; var bufptr: Pointer;
- prefmaxlen: DWORD; var entriesread: DWORD; var totalentries: DWORD;
- resumehandle: PDWORD): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetLocalGroupGetInfo}
- function NetLocalGroupGetInfo(servername: LPCWSTR; groupname: LPCWSTR;
- level: DWORD; var bufptr: Pointer): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetLocalGroupSetInfo}
- function NetLocalGroupSetInfo(servername: LPCWSTR; groupname: LPCWSTR;
- level: DWORD; buf: Pointer; parm_err: PDWORD): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetLocalGroupDel}
- function NetLocalGroupDel(servername, groupname: LPCWSTR): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetLocalGroupDelMember}
- function NetLocalGroupDelMember(servername: LPCWSTR; groupname: LPCWSTR;
- membersid: PSID): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetLocalGroupGetMembers}
- function NetLocalGroupGetMembers(servername: LPCWSTR; localgroupname: LPCWSTR;
- level: DWORD; var bufptr: Pointer; prefmaxlen: DWORD; var entriesread: DWORD;
- var totalentries: DWORD; resumehandle: PDWORD): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetLocalGroupSetMembers}
- function NetLocalGroupSetMembers(servername: LPCWSTR; groupname: LPCWSTR;
- level: DWORD; buf: Pointer; totalentries: DWORD): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetLocalGroupAddMembers}
- function NetLocalGroupAddMembers(servername: LPCWSTR; groupname: LPCWSTR;
- level: DWORD; buf: Pointer; totalentries: DWORD): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetLocalGroupDelMembers}
- function NetLocalGroupDelMembers(servername: LPCWSTR; groupname: LPCWSTR;
- level: DWORD; buf: Pointer; totalentries: DWORD): NET_API_STATUS; stdcall;
- // Data Structures - LocalGroup
- type
- PLocalGroupInfo0 = ^TLocalGroupInfo0;
- {$EXTERNALSYM _LOCALGROUP_INFO_0}
- _LOCALGROUP_INFO_0 = record
- lgrpi0_name: LPWSTR;
- end;
- TLocalGroupInfo0 = _LOCALGROUP_INFO_0;
- {$EXTERNALSYM LOCALGROUP_INFO_0}
- LOCALGROUP_INFO_0 = _LOCALGROUP_INFO_0;
- PLocalGroupInfo1 = ^TLocalGroupInfo1;
- {$EXTERNALSYM _LOCALGROUP_INFO_1}
- _LOCALGROUP_INFO_1 = record
- lgrpi1_name: LPWSTR;
- lgrpi1_comment: LPWSTR;
- end;
- TLocalGroupInfo1 = _LOCALGROUP_INFO_1;
- {$EXTERNALSYM LOCALGROUP_INFO_1}
- LOCALGROUP_INFO_1 = _LOCALGROUP_INFO_1;
- PLocalGroupInfo1002 = ^TLocalGroupInfo1002;
- {$EXTERNALSYM _LOCALGROUP_INFO_1002}
- _LOCALGROUP_INFO_1002 = record
- lgrpi1002_comment: LPWSTR;
- end;
- TLocalGroupInfo1002 = _LOCALGROUP_INFO_1002;
- {$EXTERNALSYM LOCALGROUP_INFO_1002}
- LOCALGROUP_INFO_1002 = _LOCALGROUP_INFO_1002;
- PLocalGroupMembersInfo0 = ^TLocalGroupMembersInfo0;
- {$EXTERNALSYM _LOCALGROUP_MEMBERS_INFO_0}
- _LOCALGROUP_MEMBERS_INFO_0 = record
- lgrmi0_sid: PSID;
- end;
- TLocalGroupMembersInfo0 = _LOCALGROUP_MEMBERS_INFO_0;
- {$EXTERNALSYM LOCALGROUP_MEMBERS_INFO_0}
- LOCALGROUP_MEMBERS_INFO_0 = _LOCALGROUP_MEMBERS_INFO_0;
- PLocalGroupMembersInfo1 = ^TLocalGroupMembersInfo1;
- {$EXTERNALSYM _LOCALGROUP_MEMBERS_INFO_1}
- _LOCALGROUP_MEMBERS_INFO_1 = record
- lgrmi1_sid: PSID;
- lgrmi1_sidusage: SID_NAME_USE;
- lgrmi1_name: LPWSTR;
- end;
- TLocalGroupMembersInfo1 = _LOCALGROUP_MEMBERS_INFO_1;
- {$EXTERNALSYM LOCALGROUP_MEMBERS_INFO_1}
- LOCALGROUP_MEMBERS_INFO_1 = _LOCALGROUP_MEMBERS_INFO_1;
- PLocalGroupMembersInfo2 = ^TLocalGroupMembersInfo2;
- {$EXTERNALSYM _LOCALGROUP_MEMBERS_INFO_2}
- _LOCALGROUP_MEMBERS_INFO_2 = record
- lgrmi2_sid: PSID;
- lgrmi2_sidusage: SID_NAME_USE;
- lgrmi2_domainandname: LPWSTR;
- end;
- TLocalGroupMembersInfo2 = _LOCALGROUP_MEMBERS_INFO_2;
- {$EXTERNALSYM LOCALGROUP_MEMBERS_INFO_2}
- LOCALGROUP_MEMBERS_INFO_2 = _LOCALGROUP_MEMBERS_INFO_2;
- PLocalGroupMembersInfo3 = ^TLocalGroupMembersInfo3;
- {$EXTERNALSYM _LOCALGROUP_MEMBERS_INFO_3}
- _LOCALGROUP_MEMBERS_INFO_3 = record
- lgrmi3_domainandname: LPWSTR;
- end;
- TLocalGroupMembersInfo3 = _LOCALGROUP_MEMBERS_INFO_3;
- {$EXTERNALSYM LOCALGROUP_MEMBERS_INFO_3}
- LOCALGROUP_MEMBERS_INFO_3 = _LOCALGROUP_MEMBERS_INFO_3;
- PLocalGroupUserInfo0 = ^TLocalGroupUserInfo0;
- {$EXTERNALSYM _LOCALGROUP_USERS_INFO_0}
- _LOCALGROUP_USERS_INFO_0 = record
- lgrui0_name: LPWSTR;
- end;
- TLocalGroupUserInfo0 = _LOCALGROUP_USERS_INFO_0;
- {$EXTERNALSYM LOCALGROUP_USERS_INFO_0}
- LOCALGROUP_USERS_INFO_0 = _LOCALGROUP_USERS_INFO_0;
- const
- {$EXTERNALSYM LOCALGROUP_NAME_PARMNUM}
- LOCALGROUP_NAME_PARMNUM = 1;
- {$EXTERNALSYM LOCALGROUP_COMMENT_PARMNUM}
- LOCALGROUP_COMMENT_PARMNUM = 2;
- // Display Information APIs
- {$EXTERNALSYM NetQueryDisplayInformation}
- function NetQueryDisplayInformation(ServerName: LPCWSTR; Level: DWORD;
- Index: DWORD; EntriesRequested: DWORD; PreferredMaximumLength: DWORD;
- var ReturnedEntryCount: DWORD; var SortedBuffer: Pointer): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetGetDisplayInformationIndex}
- function NetGetDisplayInformationIndex(ServerName: LPCWSTR; Level: DWORD;
- Prefix: LPCWSTR; var Index: DWORD): NET_API_STATUS; stdcall;
- // QueryDisplayInformation levels
- type
- PNetDisplayUser = ^TNetDisplayUser;
- {$EXTERNALSYM _NET_DISPLAY_USER}
- _NET_DISPLAY_USER = record
- usri1_name: LPWSTR;
- usri1_comment: LPWSTR;
- usri1_flags: DWORD;
- usri1_full_name: LPWSTR;
- usri1_user_id: DWORD;
- usri1_next_index: DWORD;
- end;
- TNetDisplayUser = _NET_DISPLAY_USER;
- {$EXTERNALSYM NET_DISPLAY_USER}
- NET_DISPLAY_USER = _NET_DISPLAY_USER;
- PNetDisplayMachine = ^TNetDisplayMachine;
- {$EXTERNALSYM _NET_DISPLAY_MACHINE}
- _NET_DISPLAY_MACHINE = record
- usri2_name: LPWSTR;
- usri2_comment: LPWSTR;
- usri2_flags: DWORD;
- usri2_user_id: DWORD;
- usri2_next_index: DWORD;
- end;
- TNetDisplayMachine = _NET_DISPLAY_MACHINE;
- {$EXTERNALSYM NET_DISPLAY_MACHINE}
- NET_DISPLAY_MACHINE = _NET_DISPLAY_MACHINE;
- PNetDisplayGroup = ^TNetDisplayGroup;
- {$EXTERNALSYM _NET_DISPLAY_GROUP}
- _NET_DISPLAY_GROUP = record
- grpi3_name: LPWSTR;
- grpi3_comment: LPWSTR;
- grpi3_group_id: DWORD;
- grpi3_attributes: DWORD;
- grpi3_next_index: DWORD;
- end;
- TNetDisplayGroup = _NET_DISPLAY_GROUP;
- {$EXTERNALSYM NET_DISPLAY_GROUP}
- NET_DISPLAY_GROUP = _NET_DISPLAY_GROUP;
- // Access Class
- // Function Prototypes - Access
- // The NetAccess APIs are only available to downlevel
- //#define NetAccessAdd RxNetAccessAdd
- {$EXTERNALSYM NetAccessAdd}
- function NetAccessAdd(servername: LPCWSTR; level: DWORD; buf: Pointer;
- parm_err: PDWORD): NET_API_STATUS; stdcall;
- //#define NetAccessEnum RxNetAccessEnum
- {$EXTERNALSYM NetAccessEnum}
- function NetAccessEnum(servername: LPCWSTR; BasePath: LPCWSTR; Recursive: DWORD;
- level: DWORD; bufptr: Pointer; prefmaxlen: DWORD; var entriesread: DWORD;
- var totalentries: DWORD; resume_handle: PDWORD): NET_API_STATUS; stdcall;
- //#define NetAccessGetInfo RxNetAccessGetInfo
- {$EXTERNALSYM NetAccessGetInfo}
- function NetAccessGetInfo(servername: LPCWSTR; resource: LPCWSTR; level: DWORD;
- bufptr: Pointer): NET_API_STATUS; stdcall;
- //#define NetAccessSetInfo RxNetAccessSetInfo
- {$EXTERNALSYM NetAccessSetInfo}
- function NetAccessSetInfo(servername: LPCWSTR; resource: LPCWSTR; level: DWORD;
- buf: Pointer; parm_err: PDWORD): NET_API_STATUS; stdcall;
- //#define NetAccessDel RxNetAccessDel
- {$EXTERNALSYM NetAccessDel}
- function NetAccessDel(servername, resource: LPCWSTR): NET_API_STATUS; stdcall;
- //#define NetAccessGetUserPerms RxNetAccessGetUserPerms
- {$EXTERNALSYM NetAccessGetUserPerms}
- function NetAccessGetUserPerms(servername: LPCWSTR; UGname: LPCWSTR;
- resource: LPCWSTR; var Perms: DWORD): NET_API_STATUS; stdcall;
- //
- // Data Structures - Access
- //
- type
- PAccessInfo0 = ^TAccessInfo0;
- {EXTERNALSYM _ACCESS_INFO_0}
- _ACCESS_INFO_0 = record
- acc0_resource_name: LPWSTR;
- end;
- TAccessInfo0 = _ACCESS_INFO_0;
- {$EXTERNALSYM ACCESS_INFO_0}
- ACCESS_INFO_0 = _ACCESS_INFO_0;
- PAccessInfo1 = ^TAccessInfo1;
- {EXTERNALSYM _ACCESS_INFO_1}
- _ACCESS_INFO_1 = record
- acc1_resource_name: LPWSTR;
- acc1_attr: DWORD;
- acc1_count: DWORD;
- end;
- TAccessInfo1 = _ACCESS_INFO_1;
- {$EXTERNALSYM ACCESS_INFO_1}
- ACCESS_INFO_1 = _ACCESS_INFO_1;
- PAccessInfo1002 = ^TAccessInfo1002;
- {EXTERNALSYM _ACCESS_INFO_1002}
- _ACCESS_INFO_1002 = record
- acc1002_attr: DWORD;
- end;
- TAccessInfo1002 = _ACCESS_INFO_1002;
- {$EXTERNALSYM ACCESS_INFO_1002}
- ACCESS_INFO_1002 = _ACCESS_INFO_1002;
- PAccessList = ^TAccessList;
- {EXTERNALSYM _ACCESS_LIST}
- _ACCESS_LIST = record
- acl_ugname: LPWSTR;
- acl_access: DWORD;
- end;
- TAccessList = _ACCESS_LIST;
- {$EXTERNALSYM ACCESS_LIST}
- ACCESS_LIST = _ACCESS_LIST;
- // Special Values and Constants - Access
- // Maximum number of permission entries for each resource.
- const
- {$EXTERNALSYM MAXPERMENTRIES}
- MAXPERMENTRIES = 64;
- // Bit values for the access permissions. ACCESS_ALL is a handy
- // way to specify maximum permissions. These are used in
- // acl_access field of access_list structures.
- {$EXTERNALSYM ACCESS_NONE}
- ACCESS_NONE = 0;
- {$EXTERNALSYM ACCESS_READ}
- ACCESS_READ = $01;
- {$EXTERNALSYM ACCESS_WRITE}
- ACCESS_WRITE = $02;
- {$EXTERNALSYM ACCESS_CREATE}
- ACCESS_CREATE = $04;
- {$EXTERNALSYM ACCESS_EXEC}
- ACCESS_EXEC = $08;
- {$EXTERNALSYM ACCESS_DELETE}
- ACCESS_DELETE = $10;
- {$EXTERNALSYM ACCESS_ATRIB}
- ACCESS_ATRIB = $20;
- {$EXTERNALSYM ACCESS_PERM}
- ACCESS_PERM = $40;
- {$EXTERNALSYM ACCESS_GROUP}
- ACCESS_GROUP = $8000;
- {$EXTERNALSYM ACCESS_ALL}
- ACCESS_ALL = ACCESS_READ or ACCESS_WRITE or ACCESS_CREATE or ACCESS_EXEC or
- ACCESS_DELETE or ACCESS_ATRIB or ACCESS_PERM;
- // Bit values for the acc1_attr field of the ACCESS_INFO_1 structure.
- {$EXTERNALSYM ACCESS_AUDIT}
- ACCESS_AUDIT = $1;
- {$EXTERNALSYM ACCESS_SUCCESS_OPEN}
- ACCESS_SUCCESS_OPEN = $10;
- {$EXTERNALSYM ACCESS_SUCCESS_WRITE}
- ACCESS_SUCCESS_WRITE = $20;
- {$EXTERNALSYM ACCESS_SUCCESS_DELETE}
- ACCESS_SUCCESS_DELETE = $40;
- {$EXTERNALSYM ACCESS_SUCCESS_ACL}
- ACCESS_SUCCESS_ACL = $80;
- {$EXTERNALSYM ACCESS_SUCCESS_MASK}
- ACCESS_SUCCESS_MASK = $F0;
- {$EXTERNALSYM ACCESS_FAIL_OPEN}
- ACCESS_FAIL_OPEN = $100;
- {$EXTERNALSYM ACCESS_FAIL_WRITE}
- ACCESS_FAIL_WRITE = $200;
- {$EXTERNALSYM ACCESS_FAIL_DELETE}
- ACCESS_FAIL_DELETE = $400;
- {$EXTERNALSYM ACCESS_FAIL_ACL}
- ACCESS_FAIL_ACL = $800;
- {$EXTERNALSYM ACCESS_FAIL_MASK}
- ACCESS_FAIL_MASK = $F00;
- {$EXTERNALSYM ACCESS_FAIL_SHIFT}
- ACCESS_FAIL_SHIFT = 4;
- // Parmnum value for NetAccessSetInfo.
- {$EXTERNALSYM ACCESS_RESOURCE_NAME_PARMNUM}
- ACCESS_RESOURCE_NAME_PARMNUM = 1;
- {$EXTERNALSYM ACCESS_ATTR_PARMNUM}
- ACCESS_ATTR_PARMNUM = 2;
- {$EXTERNALSYM ACCESS_COUNT_PARMNUM}
- ACCESS_COUNT_PARMNUM = 3;
- {$EXTERNALSYM ACCESS_ACCESS_LIST_PARMNUM}
- ACCESS_ACCESS_LIST_PARMNUM = 4;
- // the new infolevel counterparts of the old info level + parmnum
- {$EXTERNALSYM ACCESS_RESOURCE_NAME_INFOLEVEL}
- ACCESS_RESOURCE_NAME_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + ACCESS_RESOURCE_NAME_PARMNUM);
- {$EXTERNALSYM ACCESS_ATTR_INFOLEVEL}
- ACCESS_ATTR_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + ACCESS_ATTR_PARMNUM);
- {$EXTERNALSYM ACCESS_COUNT_INFOLEVEL}
- ACCESS_COUNT_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + ACCESS_COUNT_PARMNUM);
- {$EXTERNALSYM ACCESS_ACCESS_LIST_INFOLEVEL}
- ACCESS_ACCESS_LIST_INFOLEVEL = (PARMNUM_BASE_INFOLEVEL + ACCESS_ACCESS_LIST_PARMNUM);
- // ACCESS_LETTERS defines a letter for each bit position in
- // the acl_access field of struct access_list. Note that some
- // bits have a corresponding letter of ' ' (space).
- {$EXTERNALSYM ACCESS_LETTERS}
- ACCESS_LETTERS = 'RWCXDAP ';
- // Domain Class
- // Function Prototypes - Domain
- {$EXTERNALSYM NetGetDCName}
- function NetGetDCName(servername: LPCWSTR; domainname: LPCWSTR;
- bufptr: Pointer): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetGetAnyDCName}
- function NetGetAnyDCName(servername: LPCWSTR; domainname: LPCWSTR;
- bufptr: Pointer): NET_API_STATUS; stdcall;
- {$EXTERNALSYM I_NetLogonControl}
- function I_NetLogonControl(ServerName: LPCWSTR; FunctionCode: DWORD;
- QueryLevel: DWORD; Buffer: Pointer): NET_API_STATUS; stdcall;
- {$EXTERNALSYM I_NetLogonControl2}
- function I_NetLogonControl2(ServerName: LPCWSTR; FunctionCode: DWORD;
- QueryLevel: DWORD; Data: Pointer; Buffer: Pointer): NET_API_STATUS; stdcall;
- type
- PNtStatus = ^TNtStatus;
- NTSTATUS = LongInt;
- {$EXTERNALSYM NTSTATUS}
- TNtStatus = NTSTATUS;
- {$EXTERNALSYM NetEnumerateTrustedDomains}
- function NetEnumerateTrustedDomains(ServerName: LPWSTR; var DomainNames: LPWSTR): NET_API_STATUS; stdcall;
- // Special Values and Constants - Domain
- // FunctionCode values for I_NetLogonControl.
- // NOTE : if you change the following NETLOGON_CONTROL_* values,
- // change them in netsvcdllslogonsrvlogon.idl file also.
- const
- {$EXTERNALSYM NETLOGON_CONTROL_QUERY}
- NETLOGON_CONTROL_QUERY = 1; // No-op: just query
- {$EXTERNALSYM NETLOGON_CONTROL_REPLICATE}
- NETLOGON_CONTROL_REPLICATE = 2; // Force replicate on BDC
- {$EXTERNALSYM NETLOGON_CONTROL_SYNCHRONIZE}
- NETLOGON_CONTROL_SYNCHRONIZE = 3; // Force synchronize on BDC
- {$EXTERNALSYM NETLOGON_CONTROL_PDC_REPLICATE}
- NETLOGON_CONTROL_PDC_REPLICATE = 4; // Force PDC to broadcast change
- {$EXTERNALSYM NETLOGON_CONTROL_REDISCOVER}
- NETLOGON_CONTROL_REDISCOVER = 5; // Force to re-discover trusted domain DCs
- {$EXTERNALSYM NETLOGON_CONTROL_TC_QUERY}
- NETLOGON_CONTROL_TC_QUERY = 6; // Query status of specified trusted channel status
- {$EXTERNALSYM NETLOGON_CONTROL_TRANSPORT_NOTIFY}
- NETLOGON_CONTROL_TRANSPORT_NOTIFY = 7; // Notify netlogon that a new transport has come online
- {$EXTERNALSYM NETLOGON_CONTROL_FIND_USER}
- NETLOGON_CONTROL_FIND_USER = 8; // Find named user in a trusted domain
- {$EXTERNALSYM NETLOGON_CONTROL_CHANGE_PASSWORD}
- NETLOGON_CONTROL_CHANGE_PASSWORD = 9; // Change machine password on a secure channel to a trusted domain
- // Debug function codes
- {$EXTERNALSYM NETLOGON_CONTROL_UNLOAD_NETLOGON_DLL}
- NETLOGON_CONTROL_UNLOAD_NETLOGON_DLL = $FFFB;
- {$EXTERNALSYM NETLOGON_CONTROL_BACKUP_CHANGE_LOG}
- NETLOGON_CONTROL_BACKUP_CHANGE_LOG = $FFFC;
- {$EXTERNALSYM NETLOGON_CONTROL_TRUNCATE_LOG}
- NETLOGON_CONTROL_TRUNCATE_LOG = $FFFD;
- {$EXTERNALSYM NETLOGON_CONTROL_SET_DBFLAG}
- NETLOGON_CONTROL_SET_DBFLAG = $FFFE;
- {$EXTERNALSYM NETLOGON_CONTROL_BREAKPOINT}
- NETLOGON_CONTROL_BREAKPOINT = $FFFF;
- // Query level 1 for I_NetLogonControl
- type
- PNetLogonInfo1 = ^TNetLogonInfo1;
- {$EXTERNALSYM _NETLOGON_INFO_1}
- _NETLOGON_INFO_1 = record
- netlog1_flags: DWORD;
- netlog1_pdc_connection_status: NET_API_STATUS;
- end;
- TNetLogonInfo1 = _NETLOGON_INFO_1;
- {$EXTERNALSYM NETLOGON_INFO_1}
- NETLOGON_INFO_1 = _NETLOGON_INFO_1;
- PNetLogonInfo2 = ^TNetLogonInfo2;
- {$EXTERNALSYM _NETLOGON_INFO_2}
- _NETLOGON_INFO_2 = record
- netlog2_flags: DWORD;
- netlog2_pdc_connection_status: NET_API_STATUS;
- netlog2_trusted_dc_name: LPWSTR;
- netlog2_tc_connection_status: NET_API_STATUS;
- end;
- TNetLogonInfo2 = _NETLOGON_INFO_2;
- {$EXTERNALSYM NETLOGON_INFO_2}
- NETLOGON_INFO_2 = _NETLOGON_INFO_2;
- PNetLogonInfo3 = ^TNetLogonInfo3;
- {$EXTERNALSYM _NETLOGON_INFO_3}
- _NETLOGON_INFO_3 = record
- netlog3_flags: DWORD;
- netlog3_logon_attempts: DWORD;
- netlog3_reserved1: DWORD;
- netlog3_reserved2: DWORD;
- netlog3_reserved3: DWORD;
- netlog3_reserved4: DWORD;
- netlog3_reserved5: DWORD;
- end;
- TNetLogonInfo3 = _NETLOGON_INFO_3;
- {$EXTERNALSYM NETLOGON_INFO_3}
- NETLOGON_INFO_3 = _NETLOGON_INFO_3;
- PNetLogonInfo4 = ^TNetLogonInfo4;
- {$EXTERNALSYM _NETLOGON_INFO_4}
- _NETLOGON_INFO_4 = record
- netlog4_trusted_dc_name: LPWSTR;
- netlog4_trusted_domain_name: LPWSTR;
- end;
- TNetLogonInfo4 = _NETLOGON_INFO_4;
- {$EXTERNALSYM NETLOGON_INFO_4}
- NETLOGON_INFO_4 = _NETLOGON_INFO_4;
- // Values of netlog1_flags
- const
- {$EXTERNALSYM NETLOGON_REPLICATION_NEEDED}
- NETLOGON_REPLICATION_NEEDED = $01; // Database is out of date
- {$EXTERNALSYM NETLOGON_REPLICATION_IN_PROGRESS}
- NETLOGON_REPLICATION_IN_PROGRESS = $02; // Replication is happening now
- {$EXTERNALSYM NETLOGON_FULL_SYNC_REPLICATION}
- NETLOGON_FULL_SYNC_REPLICATION = $04; // full sync replication required/progress
- {$EXTERNALSYM NETLOGON_REDO_NEEDED}
- NETLOGON_REDO_NEEDED = $08; // Redo of previous replication needed
- {$EXTERNALSYM NETLOGON_HAS_IP}
- NETLOGON_HAS_IP = $10; // The trusted domain DC has an IP address
- {$EXTERNALSYM NETLOGON_HAS_TIMESERV}
- NETLOGON_HAS_TIMESERV = $20; // The trusted domain DC runs the Windows Time Service
- // Translated from LMALERT.H
- // Function Prototypes
- {$EXTERNALSYM NetAlertRaise}
- function NetAlertRaise(AlertEventName: LPCWSTR; Buffer: Pointer;
- BufferSize: DWORD): NET_API_STATUS; stdcall;
- {$EXTERNALSYM NetAlertRaiseEx}
- function NetAlertRaiseEx(AlertEventName: LPCWSTR; VariableInfo: Pointer;
- VariableInfoSize: DWORD; ServiceName: LPCWSTR): NET_API_STATUS; stdcall;
- // Data Structures
- type
- PStdAlert = ^TStdAlert;
- {$EXTERNALSYM _STD_ALERT}
- _STD_ALERT = record
- alrt_timestamp: DWORD;
- alrt_eventname: packed array[0..EVLEN] of WCHAR;
- alrt_servicename: packed array[0..SNLEN] of WCHAR;
- end;
- TStdAlert = _STD_ALERT;
- STD_ALERT = _STD_ALERT;
- {$EXTERNALSYM STD_ALERT}
- PAdminOtherInfo = ^TAdminOtherInfo;
- {$EXTERNALSYM _ADMIN_OTHER_INFO}
- _ADMIN_OTHER_INFO = record
- alrtad_errcode: DWORD;
- alrtad_numstrings: DWORD;
- end;
- TAdminOtherInfo = _ADMIN_OTHER_INFO;
- ADMIN_OTHER_INFO = _ADMIN_OTHER_INFO;
- {$EXTERNALSYM ADMIN_OTHER_INFO}
- PErrorOtherInfo = ^TErrorOtherInfo;
- {$EXTERNALSYM _ERRLOG_OTHER_INFO}
- _ERRLOG_OTHER_INFO = record
- alrter_errcode: DWORD;
- alrter_offset: DWORD;
- end;
- TErrorOtherInfo = _ERRLOG_OTHER_INFO;
- ERRLOG_OTHER_INFO = _ERRLOG_OTHER_INFO;
- {$EXTERNALSYM ERRLOG_OTHER_INFO}
- PPrintOtherInfo = ^TPrintOtherInfo;
- {$EXTERNALSYM _PRINT_OTHER_INFO}
- _PRINT_OTHER_INFO = record
- alrtpr_jobid: DWORD;
- alrtpr_status: DWORD;
- alrtpr_submitted: DWORD;
- alrtpr_size: DWORD;
- end;
- TPrintOtherInfo = _PRINT_OTHER_INFO;
- PRINT_OTHER_INFO = _PRINT_OTHER_INFO;
- {$EXTERNALSYM PRINT_OTHER_INFO}
- PUserOtherInfo = ^TUserOtherInfo;
- {$EXTERNALSYM _USER_OTHER_INFO}
- _USER_OTHER_INFO = record
- alrtus_errcode: DWORD;
- alrtus_numstrings: DWORD;
- end;
- TUserOtherInfo = _USER_OTHER_INFO;
- USER_OTHER_INFO = _USER_OTHER_INFO;
- {$EXTERNALSYM USER_OTHER_INFO}
- // Special Values and Constants
- // Name of mailslot to send alert notifications
- const
- {$EXTERNALSYM ALERTER_MAILSLOT}
- ALERTER_MAILSLOT = '\.MAILSLOTAlerter';
- // The following macro gives a pointer to the other_info data.
- // It takes an alert structure and returns a pointer to structure
- // beyond the standard portion.
- function ALERT_OTHER_INFO(x: Pointer): Pointer;
- //((LPBYTE)(x) + sizeof(STD_ALERT))
- // The following macro gives a pointer to the variable-length data.
- // It takes a pointer to one of the other-info structs and returns a
- // pointer to the variable data portion.
- function ALERT_VAR_DATA(const p): Pointer;
- //((LPBYTE)(p) + sizeof(*p))
- // Names of standard Microsoft-defined alert events.
- const
- {$EXTERNALSYM ALERT_PRINT_EVENT}
- ALERT_PRINT_EVENT = 'PRINTING';
- {$EXTERNALSYM ALERT_MESSAGE_EVENT}