📄 lm.pas
字号:
{******************************************************************}
{ }
{ Borland Delphi Runtime Library }
{ Lan Manager interface unit }
{ }
{ Portions created by Microsoft are }
{ Copyright (C) 1995-1999 Microsoft Corporation. }
{ All Rights Reserved. }
{ }
{ The original file is: lm.h, released July 2000. }
{ The original Pascal code is: LM.pas, released 30 Oct 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 }
{ }
{ Obtained through: }
{ }
{ Joint Endeavour of Delphi Innovators (Project JEDI) }
{ }
{ You may retrieve the latest version of this file at the Project }
{ JEDI home page, located at http://delphi-jedi.org }
{ }
{ The contents of this file are used with permission, subject to }
{ the Mozilla Public License Version 1.1 (the "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. }
{ }
{******************************************************************}
unit LM;
{$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
Windows, WinSvc;
// 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);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -