home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 February / Chip_2004-02_cd1.bin / zkuste / konfig / download / msic / Help / Int / MiTeC_NetAPI32.int < prev    next >
Encoding:
Text File  |  2003-08-26  |  52.3 KB  |  1,037 lines

  1. {*******************************************************}
  2. {                                                       }
  3. {       MiTeC System Information Component              }
  4. {               Lan Manager API                         }
  5. {           version 7.0 for Delphi 5,6c                 }
  6. {                                                       }
  7. {       Copyright ⌐ 1997,2002 Michal Mutl               }
  8. {                                                       }
  9. {*******************************************************}
  10.  
  11. {$INCLUDE MITEC_DEF.INC}
  12.  
  13. unit MiTeC_NetAPI32;
  14.  
  15. interface
  16.  
  17. uses
  18.   Windows, SysUtils;
  19.  
  20. const
  21.   NERR_SUCCESS = 0;
  22.   NETERR_INCLUDED = 2102;    // The workstation driver is not installed.
  23.   NERR_UnknownServer = 2103;    // The server could not be located.
  24.   NERR_ShareMem = 2104; //An internal error occurred. The network cannot access a shared memory segment.
  25.   NERR_NoNetworkResource = 2105;    // A network resource shortage occurred .
  26.   NERR_RemoteOnly = 2106;    // This operation is not supported on workstations.
  27.   NERR_DevNotRedirected = 2107;    // The device is not connected.
  28.   NERR_ServerNotStarted = 2114;    // The Server service is not started.
  29.   NERR_ItemNotFound = 2115;    // The queue is empty.
  30.   NERR_UnknownDevDir = 2116;    // The device or directory does not exist.
  31.   NERR_RedirectedPath = 2117;    // The operation is invalid on a redirected resource.
  32.   NERR_DuplicateShare = 2118;    // The name has already been shared.
  33.   NERR_NoRoom = 2119;    // The server is currently out of the requested resource.
  34.   NERR_TooManyItems = 2121;    // Requested addition of items exceeds the maximum allowed.
  35.   NERR_InvalidMaxUsers = 2122;    // The Peer service supports only two simultaneous users.
  36.   NERR_BufTooSmall = 2123;    // The API return buffer is too small.
  37.   NERR_RemoteErr = 2127;    // A remote API error occurred.
  38.   NERR_LanmanIniError = 2131;    // An error occurred when opening or reading the configuration file.
  39.   NERR_NetworkError = 2136;    // A general network error occurred.
  40.   NERR_WkstaInconsistentState = 2137;  // The Workstation service is in an inconsistent state. Restart the computer before restarting the Workstation service.
  41.   NERR_WkstaNotStarted = 2138;    // The Workstation service has not been started.
  42.   NERR_BrowserNotStarted = 2139;    // The requested information is not available.
  43.   NERR_InternalError = 2140;    // An internal Windows NT error occurred.
  44.   NERR_BadTransactConfig = 2141;    // The server is not configured for transactions.
  45.   NERR_InvalidAPI = 2142;    // The requested API is not supported on the remote server.
  46.   NERR_BadEventName = 2143;    // The event name is invalid.
  47.   NERR_DupNameReboot = 2144;  // The computer name already exists on the network. Change it and restart the computer.
  48.   NERR_CfgCompNotFound = 2146;    // The specified component could not be found in the configuration information.
  49.   NERR_CfgParamNotFound = 2147;    // The specified parameter could not be found in the configuration information.
  50.   NERR_LineTooLong = 2149;    // A line in the configuration file is too long.
  51.   NERR_QNotFound = 2150;    // The printer does not exist.
  52.   NERR_JobNotFound = 2151;    // The print job does not exist.
  53.   NERR_DestNotFound = 2152;    // The printer destination cannot be found.
  54.   NERR_DestExists = 2153;    // The printer destination already exists.
  55.   NERR_QExists = 2154;    // The printer queue already exists.
  56.   NERR_QNoRoom = 2155;    // No more printers can be added.
  57.   NERR_JobNoRoom = 2156;    // No more print jobs can be added.
  58.   NERR_DestNoRoom = 2157;    // No more printer destinations can be added.
  59.   NERR_DestIdle = 2158;    // This printer destination is idle and cannot accept control operations.
  60.   NERR_DestInvalidOp = 2159;    // This printer destination request contains an invalid control function.
  61.   NERR_ProcNoRespond = 2160;    // The print processor is not responding.
  62.   NERR_SpoolerNotLoaded = 2161;    // The spooler is not running.
  63.   NERR_DestInvalidState = 2162;    // This operation cannot be performed on the print destination in its current state.
  64.   NERR_QInvalidState = 2163;    // This operation cannot be performed on the printer queue in its current state.
  65.   NERR_JobInvalidState = 2164;    // This operation cannot be performed on the print job in its current state.
  66.   NERR_SpoolNoMemory = 2165;    // A spooler memory allocation failure occurred.
  67.   NERR_DriverNotFound = 2166;    // The device driver does not exist.
  68.   NERR_DataTypeInvalid = 2167;    // The data type is not supported by the print processor.
  69.   NERR_ProcNotFound = 2168;    // The print processor is not installed.
  70.   NERR_ServiceTableLocked = 2180;    // The service database is locked.
  71.   NERR_ServiceTableFull = 2181;    // The service table is full.
  72.   NERR_ServiceInstalled = 2182;    // The requested service has already been started.
  73.   NERR_ServiceEntryLocked = 2183;    // The service does not respond to control actions.
  74.   NERR_ServiceNotInstalled = 2184;    // The service has not been started.
  75.   NERR_BadServiceName = 2185;    // The service name is invalid.
  76.   NERR_ServiceCtlTimeout = 2186;    // The service is not responding to the control function.
  77.   NERR_ServiceCtlBusy = 2187;    // The service control is busy.
  78.   NERR_BadServiceProgName = 2188;    // The configuration file contains an invalid service program name.
  79.   NERR_ServiceNotCtrl = 2189;    // The service could not be controlled in its present state.
  80.   NERR_ServiceKillProc = 2190;    // The service ended abnormally.
  81.   NERR_ServiceCtlNotValid = 2191;    // The requested pause or stop is not valid for this service.
  82.   NERR_NotInDispatchTbl = 2192;    // The service control dispatcher could not find the service name in the dispatch table.
  83.   NERR_BadControlRecv = 2193;    // The service control dispatcher pipe read failed.
  84.   NERR_ServiceNotStarting = 2194;    // A thread for the new service could not be created.
  85.   NERR_AlreadyLoggedOn = 2200;    // This workstation is already logged on to the local-area network.
  86.   NERR_NotLoggedOn = 2201;    // The workstation is not logged on to the local-area network.
  87.   NERR_BadUsername = 2202;    // The user name or group name parameter is invalid.
  88.   NERR_BadPassword = 2203;    // The password parameter is invalid.
  89.   NERR_UnableToAddName_W = 2204;    // @W The logon processor did not add the message alias.
  90.   NERR_UnableToAddName_F = 2205;    // The logon processor did not add the message alias.
  91.   NERR_UnableToDelName_W = 2206;    // @W The logoff processor did not delete the message alias.
  92.   NERR_UnableToDelName_F = 2207;    // The logoff processor did not delete the message alias.
  93.   NERR_LogonsPaused = 2209;    // Network logons are paused.
  94.   NERR_LogonServerConflict = 2210;    // A centralized logon-server conflict occurred.
  95.   NERR_LogonNoUserPath = 2211;    // The server is configured without a valid user path.
  96.   NERR_LogonScriptError = 2212;    // An error occurred while loading or running the logon script.
  97.   NERR_StandaloneLogon = 2214;    // The logon server was not specified. Your computer will be logged on as STANDALONE.
  98.   NERR_LogonServerNotFound = 2215;    // The logon server could not be found.
  99.   NERR_LogonDomainExists = 2216;    // There is already a logon domain for this computer.
  100.   NERR_NonValidatedLogon = 2217;    // The logon server could not validate the logon.
  101.   NERR_ACFNotFound = 2219;    // The security database could not be found.
  102.   NERR_GroupNotFound = 2220;    // The group name could not be found.
  103.   NERR_UserNotFound = 2221;    // The user name could not be found.
  104.   NERR_ResourceNotFound = 2222;    // The resource name could not be found.
  105.   NERR_GroupExists = 2223;    // The group already exists.
  106.   NERR_UserExists = 2224;    // The user account already exists.
  107.   NERR_ResourceExists = 2225;    // The resource permission list already exists.
  108.   NERR_NotPrimary = 2226;    // This operation is only allowed on the primary domain controller of the domain.
  109.   NERR_ACFNotLoaded = 2227;    // The security database has not been started.
  110.   NERR_ACFNoRoom = 2228;    // There are too many names in the user accounts database.
  111.   NERR_ACFFileIOFail = 2229;    // A disk I/O failure occurred.
  112.   NERR_ACFTooManyLists = 2230;    // The limit of 64 entries per resource was exceeded.
  113.   NERR_UserLogon = 2231;    // Deleting a user with a session is not allowed.
  114.   NERR_ACFNoParent = 2232;    // The parent directory could not be located.
  115.   NERR_CanNotGrowSegment = 2233;    // Unable to add to the security database session cache segment.
  116.   NERR_SpeGroupOp = 2234;    // This operation is not allowed on this special group.
  117.   NERR_NotInCache = 2235;    // This user is not cached in user accounts database session cache.
  118.   NERR_UserInGroup = 2236;    // The user already belongs to this group.
  119.   NERR_UserNotInGroup = 2237;    // The user does not belong to this group.
  120.   NERR_AccountUndefined = 2238;    // This user account is undefined.
  121.   NERR_AccountExpired = 2239;    // This user account has expired.
  122.   NERR_InvalidWorkstation = 2240;    // The user is not allowed to log on from this workstation.
  123.   NERR_InvalidLogonHours = 2241;    // The user is not allowed to log on at this time.
  124.   NERR_PasswordExpired = 2242;    // The password of this user has expired.
  125.   NERR_PasswordCantChange = 2243;    // The password of this user cannot change.
  126.   NERR_PasswordHistConflict = 2244;    // This password cannot be used now.
  127.   NERR_PasswordTooShort = 2245;    // The password is shorter than required.
  128.   NERR_PasswordTooRecent = 2246;    // The password of this user is too recent to change.
  129.   NERR_InvalidDatabase = 2247;    // The security database is corrupted.
  130.   NERR_DatabaseUpToDate = 2248;    // No updates are necessary to this replicant network/local security database.
  131.   NERR_SyncRequired = 2249;    // This replicant database is outdated; synchronization is required.
  132.   NERR_UseNotFound = 2250;    // The network connection could not be found.
  133.   NERR_BadAsgType = 2251;    // This asg_type is invalid.
  134.   NERR_DeviceIsShared = 2252;    // This device is currently being shared.
  135.   NERR_NoComputerName = 2270;   // The computer name could not be added as a message alias. The name may already exist on the network.
  136.   NERR_MsgAlreadyStarted = 2271;    // The Messenger service is already started.
  137.   NERR_MsgInitFailed = 2272;    // The Messenger service failed to start.
  138.   NERR_NameNotFound = 2273;    // The message alias could not be found on the network.
  139.   NERR_AlreadyForwarded = 2274;    // This message alias has already been forwarded.
  140.   NERR_AddForwarded = 2275;    // This message alias has been added but is still forwarded.
  141.   NERR_AlreadyExists = 2276;    // This message alias already exists locally.
  142.   NERR_TooManyNames = 2277;    // The maximum number of added message aliases has been exceeded.
  143.   NERR_DelComputerName = 2278;    // The computer name could not be deleted.
  144.   NERR_LocalForward = 2279;    // Messages cannot be forwarded back to the same workstation.
  145.   NERR_GrpMsgProcessor = 2280;    // An error occurred in the domain message processor.
  146.   NERR_PausedRemote = 2281;    // The message was sent, but the recipient has paused the Messenger service.
  147.   NERR_BadReceive = 2282;    // The message was sent but not received.
  148.   NERR_NameInUse = 2283;   // The message alias is currently in use. Try again later.
  149.   NERR_MsgNotStarted = 2284;    // The Messenger service has not been started.
  150.   NERR_NotLocalName = 2285;    // The name is not on the local computer.
  151.   NERR_NoForwardName = 2286;    // The forwarded message alias could not be found on the network.
  152.   NERR_RemoteFull = 2287;    // The message alias table on the remote station is full.
  153.   NERR_NameNotForwarded = 2288;    // Messages for this alias are not currently being forwarded.
  154.   NERR_TruncatedBroadcast = 2289;    // The broadcast message was truncated.
  155.   NERR_InvalidDevice = 2294;    // This is an invalid device name.
  156.   NERR_WriteFault = 2295;    // A write fault occurred.
  157.   NERR_DuplicateName = 2297;    // A duplicate message alias exists on the network.
  158.   NERR_DeleteLater = 2298;    // @W This message alias will be deleted later.
  159.   NERR_IncompleteDel = 2299;    // The message alias was not successfully deleted from all networks.
  160.   NERR_MultipleNets = 2300;    // This operation is not supported on computers with multiple networks.
  161.   NERR_NetNameNotFound = 2310;    // This shared resource does not exist.
  162.   NERR_DeviceNotShared = 2311;    // This device is not shared.
  163.   NERR_ClientNameNotFound = 2312;    // A session does not exist with that computer name.
  164.   NERR_FileIdNotFound = 2314;    // There is not an open file with that identification number.
  165.   NERR_ExecFailure = 2315;    // A failure occurred when executing a remote administration command.
  166.   NERR_TmpFile = 2316;    // A failure occurred when opening a remote temporary file.
  167.   NERR_TooMuchData = 2317;    // The data returned from a remote administration command has been truncated to 64K.
  168.   NERR_DeviceShareConflict = 2318;    // This device cannot be shared as both a spooled and a non-spooled resource.
  169.   NERR_BrowserTableIncomplete = 2319;    // The information in the list of servers may be incorrect.
  170.   NERR_NotLocalDomain = 2320;    // The computer is not active in this domain.
  171.   NERR_IsDfsShare = 2321;    // The share must be removed from the Distributed File System before it can be deleted.
  172.   NERR_DevInvalidOpCode = 2331;    // The operation is invalid for this device.
  173.   NERR_DevNotFound = 2332;    // This device cannot be shared.
  174.   NERR_DevNotOpen = 2333;    // This device was not open.
  175.   NERR_BadQueueDevString = 2334;    // This device name list is invalid.
  176.   NERR_BadQueuePriority = 2335;    // The queue priority is invalid.
  177.   NERR_NoCommDevs = 2337;    // There are no shared communication devices.
  178.   NERR_QueueNotFound = 2338;    // The queue you specified does not exist.
  179.   NERR_BadDevString = 2340;    // This list of devices is invalid.
  180.   NERR_BadDev = 2341;    // The requested device is invalid.
  181.   NERR_InUseBySpooler = 2342;    // This device is already in use by the spooler.
  182.   NERR_CommDevInUse = 2343;    // This device is already in use as a communication device.
  183.   NERR_InvalidComputer = 2351;    // This computer name is invalid.
  184.   NERR_MaxLenExceeded = 2354;    // The string and prefix specified are too long.
  185.   NERR_BadComponent = 2356;    // This path component is invalid.
  186.   NERR_CantType = 2357;    // Could not determine the type of input.
  187.   NERR_TooManyEntries = 2362;    // The buffer for types is not big enough.
  188.   NERR_ProfileFileTooBig = 2370;    // Profile files cannot exceed 64K.
  189.   NERR_ProfileOffset = 2371;    // The start offset is out of range.
  190.   NERR_ProfileCleanup = 2372;    // The system cannot delete current connections to network resources.
  191.   NERR_ProfileUnknownCmd = 2373;    // The system was unable to parse the command line in this file.
  192.   NERR_ProfileLoadErr = 2374;    // An error occurred while loading the profile file.
  193.   NERR_ProfileSaveErr = 2375;    // @W Errors occurred while saving the profile file. The profile was partially saved.
  194.   NERR_LogOverflow = 2377;    // Log file %1 is full.
  195.   NERR_LogFileChanged = 2378;    // This log file has changed between reads.
  196.   NERR_LogFileCorrupt = 2379;    // Log file %1 is corrupt.
  197.   NERR_SourceIsDir = 2380;    // The source path cannot be a directory.
  198.   NERR_BadSource = 2381;    // The source path is illegal.
  199.   NERR_BadDest = 2382;    // The destination path is illegal.
  200.   NERR_DifferentServers = 2383;    // The source and destination paths are on different servers.
  201.   NERR_RunSrvPaused = 2385;    // The Run server you requested is paused.
  202.   NERR_ErrCommRunSrv = 2389;    // An error occurred when communicating with a Run server.
  203.   NERR_ErrorExecingGhost = 2391;    // An error occurred when starting a background process.
  204.   NERR_ShareNotFound = 2392;    // The shared resource you are connected to could not be found.
  205.   NERR_InvalidLana = 2400;    // The LAN adapter number is invalid.
  206.   NERR_OpenFiles = 2401;    // There are open files on the connection.
  207.   NERR_ActiveConns = 2402;    // Active connections still exist.
  208.   NERR_BadPasswordCore = 2403;    // This share name or password is invalid.
  209.   NERR_DevInUse = 2404;    // The device is being accessed by an active process.
  210.   NERR_LocalDrive = 2405;    // The drive letter is in use locally.
  211.   NERR_AlertExists = 2430;    // The specified client is already registered for the specified event.
  212.   NERR_TooManyAlerts = 2431;    // The alert table is full.
  213.   NERR_NoSuchAlert = 2432;    // An invalid or nonexistent alert name was raised.
  214.   NERR_BadRecipient = 2433;    // The alert recipient is invalid.
  215.   NERR_AcctLimitExceeded = 2434;    //A user's session with this server has been deleted
  216.   NERR_InvalidLogSeek = 2440;    // The log file does not contain the requested record number.
  217.   NERR_BadUasConfig = 2450;    // The user accounts database is not configured correctly.
  218.   NERR_InvalidUASOp = 2451;    // This operation is not permitted when the Netlogon service is running.
  219.   NERR_LastAdmin = 2452;    // This operation is not allowed on the last administrative account.
  220.   NERR_DCNotFound = 2453;    // Could not find domain controller for this domain.
  221.   NERR_LogonTrackingError = 2454;    // Could not set logon information for this user.
  222.   NERR_NetlogonNotStarted = 2455;    // The Netlogon service has not been started.
  223.   NERR_CanNotGrowUASFile = 2456;    // Unable to add to the user accounts database.
  224.   NERR_TimeDiffAtDC = 2457;    // This server's clock is not synchronized with the primary domain controller's clock.
  225.   NERR_PasswordMismatch = 2458;    // A password mismatch has been detected.
  226.   NERR_NoSuchServer = 2460;    // The server identification does not specify a valid server.
  227.   NERR_NoSuchSession = 2461;    // The session identification does not specify a valid session.
  228.   NERR_NoSuchConnection = 2462;    // The connection identification does not specify a valid connection.
  229.   NERR_TooManyServers = 2463;    // There is no space for another entry in the table of available servers.
  230.   NERR_TooManySessions = 2464;    // The server has reached the maximum number of sessions it supports.
  231.   NERR_TooManyConnections = 2465;    // The server has reached the maximum number of connections it supports.
  232.   NERR_TooManyFiles = 2466;    // The server cannot open more files because it has reached its maximum number.
  233.   NERR_NoAlternateServers = 2467;    // There are no alternate servers registered on this server.
  234.   NERR_TryDownLevel = 2470;    // Try down-level (remote admin protocol) version of API instead.
  235.   NERR_UPSDriverNotStarted = 2480;    // The UPS driver could not be accessed by the UPS service.
  236.   NERR_UPSInvalidConfig = 2481;    // The UPS service is not configured correctly.
  237.   NERR_UPSInvalidCommPort = 2482;    // The UPS service could not access the specified Comm Port.
  238.   NERR_UPSSignalAsserted = 2483;  // The UPS indicated a line fail or low battery situation. Service not started.
  239.   NERR_UPSShutdownFailed = 2484;    // The UPS service failed to perform a system shut down.
  240.   NERR_BadDosRetCode = 2500;    //The program below returned an MS-DOS error code:
  241.   NERR_ProgNeedsExtraMem = 2501;    //The program below needs more memory:
  242.   NERR_BadDosFunction = 2502;    //The program below called an unsupported MS-DOS function:
  243.   NERR_RemoteBootFailed = 2503;    // The workstation failed to boot.
  244.   NERR_BadFileCheckSum = 2504;    // The file below is corrupt.
  245.   NERR_NoRplBootSystem = 2505;    // No loader is specified in the boot-block definition file.
  246.   NERR_RplLoadrNetBiosErr = 2506;    // NetBIOS returned an error: The NCB and SMB are dumped above.
  247.   NERR_RplLoadrDiskErr = 2507;    // A disk I/O error occurred.
  248.   NERR_ImageParamErr = 2508;    // Image parameter substitution failed.
  249.   NERR_TooManyImageParams = 2509;    // Too many image parameters cross disk sector boundaries.
  250.   NERR_NonDosFloppyUsed = 2510;    // The image was not generated from an MS-DOS diskette formatted with /S.
  251.   NERR_RplBootRestart = 2511;    // Remote boot will be restarted later.
  252.   NERR_RplSrvrCallFailed = 2512;    // The call to the Remoteboot server failed.
  253.   NERR_CantConnectRplSrvr = 2513;    // Cannot connect to the Remoteboot server.
  254.   NERR_CantOpenImageFile = 2514;    // Cannot open image file on the Remoteboot server.
  255.   NERR_CallingRplSrvr = 2515;    // Connecting to the Remoteboot server..
  256.   NERR_StartingRplBoot = 2516;    // Connecting to the Remoteboot server..
  257.   NERR_RplBootServiceTerm = 2517;    // Remote boot service was stopped; check the error log for the cause of the problem.
  258.   NERR_RplBootStartFailed = 2518;    // Remote boot startup failed; check the error log for the cause of the problem.
  259.   NERR_RPL_CONNECTED = 2519;    // A second connection to a Remoteboot resource is not allowed.
  260.   NERR_BrowserConfiguredToNotRun = 2550;    // The browser service was configured with MaintainServerList=No.
  261.   NERR_RplNoAdaptersStarted = 2610;    // Service failed to start since none of the network adapters started with this service.
  262.   NERR_RplBadRegistry = 2611;    // Service failed to start due to bad startup information in the registry.
  263.   NERR_RplBadDatabase = 2612;    // Service failed to start because its database is absent or corrupt.
  264.   NERR_RplRplfilesShare = 2613;    // Service failed to start because RPLFILES share is absent.
  265.   NERR_RplNotRplServer = 2614;    // Service failed to start because RPLUSER group is absent.
  266.   NERR_RplCannotEnum = 2615;    // Cannot enumerate service records.
  267.   NERR_RplWkstaInfoCorrupted = 2616;    // Workstation record information has been corrupted.
  268.   NERR_RplWkstaNotFound = 2617;    // Workstation record was not found.
  269.   NERR_RplWkstaNameUnavailable = 2618;    // Workstation name is in use by some other workstation.
  270.   NERR_RplProfileInfoCorrupted = 2619;    // Profile record information has been corrupted.
  271.   NERR_RplProfileNotFound = 2620;    // Profile record was not found.
  272.   NERR_RplProfileNameUnavailable = 2621;    // Profile name is in use by some other profile.
  273.   NERR_RplProfileNotEmpty = 2622;    // There are workstations using this profile.
  274.   NERR_RplConfigInfoCorrupted = 2623;    // Configuration record information has been corrupted.
  275.   NERR_RplConfigNotFound = 2624;    // Configuration record was not found.
  276.   NERR_RplAdapterInfoCorrupted = 2625;    // Adapter id record information has been corrupted.
  277.   NERR_RplInternal = 2626;    // An internal service error has occurred.
  278.   NERR_RplVendorInfoCorrupted = 2627;    // Vendor id record information has been corrupted.
  279.   NERR_RplBootInfoCorrupted = 2628;    // Boot block record information has been corrupted.
  280.   NERR_RplWkstaNeedsUserAcct = 2629;    // The user account for this workstation record is missing.
  281.   NERR_RplNeedsRPLUSERAcct = 2630;    // The RPLUSER local group could not be found.
  282.   NERR_RplBootNotFound = 2631;    // Boot block record was not found.
  283.   NERR_RplIncompatibleProfile = 2632;    // Chosen profile is incompatible with this workstation.
  284.   NERR_RplAdapterNameUnavailable = 2633;    // Chosen network adapter id is in use by some other workstation.
  285.   NERR_RplConfigNotEmpty = 2634;    // There are profiles using this configuration.
  286.   NERR_RplBootInUse = 2635;    // There are workstations, profiles, or configurations using this boot block.
  287.   NERR_RplBackupDatabase = 2636;    // Service failed to backup Remoteboot database.
  288.   NERR_RplAdapterNotFound = 2637;    // Adapter record was not found.
  289.   NERR_RplVendorNotFound = 2638;    // Vendor record was not found.
  290.   NERR_RplVendorNameUnavailable = 2639;    // Vendor name is in use by some other vendor record.
  291.   NERR_RplBootNameUnavailable = 2640;    // (boot name, vendor id) is in use by some other boot block record.
  292.   NERR_RplConfigNameUnavailable = 2641;    // Configuration name is in use by some other configuration.
  293.   NERR_DfsInternalCorruption = 2660;    //The internal database maintained by the Dfs service is corrupt
  294.   NERR_DfsVolumeDataCorrupt = 2661;    //One of the records in the internal Dfs database is corrupt
  295.   NERR_DfsNoSuchVolume = 2662;    //There is no volume whose entry path matches the input Entry Path
  296.   NERR_DfsVolumeAlreadyExists = 2663;    //A volume with the given name already exists
  297.   NERR_DfsAlreadyShared = 2664;    //The server share specified is already shared in the Dfs
  298.   NERR_DfsNoSuchShare = 2665;    //The indicated server share does not support the indicated Dfs volume
  299.   NERR_DfsNotALeafVolume = 2666;    //The operation is not valid on a non-leaf volume
  300.   NERR_DfsLeafVolume = 2667;    //The operation is not valid on a leaf volume
  301.   NERR_DfsVolumeHasMultipleServers = 2668;    //The operation is ambiguous because the volume has multiple servers
  302.   NERR_DfsCantCreateJunctionPoint = 2669;    //Unable to create a junction point
  303.   NERR_DfsServerNotDfsAware = 2670;    //The server is not Dfs Aware
  304.   NERR_DfsBadRenamePath = 2671;    //The specified rename target path is invalid
  305.   NERR_DfsVolumeIsOffline = 2672;    //The specified Dfs volume is offline
  306.   NERR_DfsNoSuchServer = 2673;    //The specified server is not a server for this volume
  307.   NERR_DfsCyclicalName = 2674;    //A cycle in the Dfs name was detected
  308.   NERR_DfsNotSupportedInServerDfs = 2675;    //The operation is not supported on a server-based Dfs
  309.   NERR_DfsInternalError = 2690;    //Dfs internal error
  310.   NERR_SetupAlreadyJoined = 2691;    // This machine is already joined to a domain.
  311.   NERR_SetupNotJoined = 2692;    // This machine is not currently joined to a domain.
  312.   NERR_SetupDomainController = 2693;    // This machine is a domain controller and cannot be unjoined from a domain.
  313.   NERR_InvalidWeekDays    = 2000;
  314.   NERR_InvalidMonthDays   = 2001;
  315.  
  316.   SV_TYPE_WORKSTATION       = $00000001;  // All LAN Manager workstations
  317.   SV_TYPE_SERVER            = $00000002;  // All LAN Manager servers
  318.   SV_TYPE_SQLSERVER         = $00000004; // Any server running with Microsoft SQL Server
  319.   SV_TYPE_DOMAIN_CTRL       = $00000008; // Primary domain controller
  320.   SV_TYPE_DOMAIN_BAKCTRL    = $00000010; // Backup domain controller
  321.   SV_TYPE_TIMESOURCE        = $00000020; // Server running the Timesource service
  322.   SV_TYPE_AFP               = $00000040; // Apple File Protocol servers
  323.   SV_TYPE_NOVELL            = $00000080; // Novell servers
  324.   SV_TYPE_DOMAIN_MEMBER     = $00000100; // LAN Manager 2.x Domain Member
  325.   SV_TYPE_LOCAL_LIST_ONLY   = $40000000; //Servers maintained by the browser
  326.   SV_TYPE_PRINT             = $00000200; //Server sharing print queue
  327.   SV_TYPE_DIALIN            = $00000400; // Server running dial-in service
  328.   SV_TYPE_XENIX_SERVER      = $00000800; // Xenix server
  329.   SV_TYPE_MFPN              = $00004000; // Microsoft File and Print for Netware
  330.   SV_TYPE_NT                = $00001000; // Windows NT (either Workstation or Server)
  331.   SV_TYPE_WFW               = $00002000; // Server running Windows for Workgroups
  332.   SV_TYPE_SERVER_NT         = $00008000; // Windows NT non-DC server
  333.   SV_TYPE_POTENTIAL_BROWSER = $00010000; // Server that can run the Browser service
  334.   SV_TYPE_BACKUP_BROWSER    = $00020000; // Server running a Browser service as backup
  335.   SV_TYPE_MASTER_BROWSER    = $00040000; // Server running the master Browser service
  336.   SV_TYPE_DOMAIN_MASTER     = $00080000; // Server running the domain master Browser
  337.   SV_TYPE_DOMAIN_ENUM       = $80000000; // Primary Domain
  338.   SV_TYPE_WINDOWS           = $00400000; // Windows 95 or later
  339.   SV_TYPE_ALL               = $FFFFFFFF; //All servers
  340.  
  341.   FILTER_TEMP_DUPLICATE_ACCOUNT     =  $0001;
  342.   FILTER_NORMAL_ACCOUNT             =  $0002;
  343.   FILTER_PROXY_ACCOUNT              =  $0004;
  344.   FILTER_INTERDOMAIN_TRUST_ACCOUNT  =  $0008;
  345.   FILTER_WORKSTATION_TRUST_ACCOUNT  =  $0010;
  346.   FILTER_SERVER_TRUST_ACCOUNT       =  $0020;
  347.  
  348.   LM20_NNLEN = 12;
  349.   SHPWLEN = 8;
  350.  
  351.   STYPE_DISKTREE = 0;
  352.   STYPE_PRINTQ   = 1;
  353.   STYPE_DEVICE   = 2;
  354.   STYPE_IPC      = 3;
  355.  
  356.   STYPE_SPECIAL  = $80000000;
  357.  
  358.   ACCESS_NONE   = $00;
  359.   ACCESS_READ   = $01;
  360.   ACCESS_WRITE  = $02;
  361.   ACCESS_CREATE = $04;
  362.   ACCESS_EXEC   = $08;
  363.   ACCESS_DELETE = $10;
  364.   ACCESS_ATRIB  = $20;
  365.   ACCESS_PERM   = $40;
  366.   ACCESS_ALL    = ACCESS_READ or ACCESS_WRITE or
  367.                   ACCESS_CREATE or ACCESS_EXEC or
  368.                   ACCESS_DELETE or ACCESS_ATRIB or
  369.                   ACCESS_PERM;
  370.  
  371.   LG_INCLUDE_INDIRECT = $0001;
  372.  
  373.   SESS_GUEST        = $00000001;
  374.   SESS_NOENCRYPTION = $00000002;
  375.  
  376.   PERM_FILE_READ   =   $1;
  377.   PERM_FILE_WRITE  =   $2;
  378.   PERM_FILE_CREATE =   $4;
  379.  
  380.   JOB_RUN_PERIODICALLY   = $01;    //  set if EVERY
  381.   JOB_EXEC_ERROR         = $02;    //  set if error
  382.   JOB_RUNS_TODAY         = $04;    //  set if today
  383.   JOB_ADD_CURRENT_DATE   = $08;    // set if to add current date
  384.   JOB_NONINTERACTIVE     = $10;    // set for noninteractive
  385.   JOB_INPUT_FLAGS        = JOB_RUN_PERIODICALLY or JOB_ADD_CURRENT_DATE or JOB_NONINTERACTIVE;
  386.   JOB_OUTPUT_FLAGS       = JOB_RUN_PERIODICALLY or JOB_EXEC_ERROR or JOB_RUNS_TODAY or JOB_NONINTERACTIVE;
  387.   MAX_PREFERRED_LENGTH   = -1;
  388.  
  389.   UF_SCRIPT              = $0001;
  390.   UF_ACCOUNTDISABLE      = $0002;
  391.   UF_HOMEDIR_REQUIRED    = $0008;
  392.   UF_LOCKOUT             = $0010;
  393.   UF_PASSWD_NOTREQD      = $0020;
  394.   UF_PASSWD_CANT_CHANGE  = $0040;
  395.  
  396.   UF_TEMP_DUPLICATE_ACCOUNT      = $0100;
  397.   UF_NORMAL_ACCOUNT              = $0200;
  398.   UF_INTERDOMAIN_TRUST_ACCOUNT   = $0800;
  399.   UF_WORKSTATION_TRUST_ACCOUNT   = $1000;
  400.   UF_SERVER_TRUST_ACCOUNT        = $2000;
  401.  
  402.   UF_MACHINE_ACCOUNT_MASK = UF_INTERDOMAIN_TRUST_ACCOUNT or
  403.                             UF_WORKSTATION_TRUST_ACCOUNT or
  404.                             UF_SERVER_TRUST_ACCOUNT;
  405.  
  406.   UF_ACCOUNT_TYPE_MASK = UF_TEMP_DUPLICATE_ACCOUNT or
  407.                          UF_NORMAL_ACCOUNT or
  408.                          UF_INTERDOMAIN_TRUST_ACCOUNT or
  409.                          UF_WORKSTATION_TRUST_ACCOUNT or
  410.                          UF_SERVER_TRUST_ACCOUNT;
  411.  
  412.   UF_DONT_EXPIRE_PASSWD = $10000;
  413.   UF_MNS_LOGON_ACCOUNT  = $20000;
  414.  
  415.  
  416.   UF_SETTABLE_BITS = UF_SCRIPT or
  417.                      UF_ACCOUNTDISABLE or
  418.                      UF_LOCKOUT or
  419.                      UF_HOMEDIR_REQUIRED or
  420.                      UF_PASSWD_NOTREQD or
  421.                      UF_PASSWD_CANT_CHANGE or
  422.                      UF_ACCOUNT_TYPE_MASK or
  423.                      UF_DONT_EXPIRE_PASSWD or
  424.                      UF_MNS_LOGON_ACCOUNT;
  425.  
  426. type
  427.   NET_API_STATUS = DWORD;
  428.  
  429.   _NET_DISPLAY_USER = record
  430.     usri1_name: LPWSTR;
  431.     usri1_comment: LPWSTR;
  432.     usri1_flags: DWORD;
  433.     usri1_full_name: LPWSTR;
  434.     usri1_user_id: DWORD;
  435.     usri1_next_index: DWORD;
  436.   end;
  437.  
  438.   PNET_DISPLAY_USER = ^NET_DISPLAY_USER;
  439.   NET_DISPLAY_USER = _NET_DISPLAY_USER;
  440.  
  441.   _NET_DISPLAY_MACHINE = record
  442.     usri2_name: LPWSTR;
  443.     usri2_comment: LPWSTR;
  444.     usri2_flags: DWORD;
  445.     usri2_user_id: DWORD;
  446.     usri2_next_index: DWORD;
  447.   end;
  448.  
  449.   PNET_DISPLAY_MACHINE = ^NET_DISPLAY_MACHINE;
  450.   NET_DISPLAY_MACHINE = _NET_DISPLAY_MACHINE;
  451.  
  452.   _NET_DISPLAY_GROUP = record
  453.     grpi3_name: LPWSTR;
  454.     grpi3_comment: LPWSTR;
  455.     grpi3_group_id: DWORD;
  456.     grpi3_attributes: DWORD;
  457.     grpi3_next_index: DWORD;
  458.   end;
  459.  
  460.   PNET_DISPLAY_GROUP = ^NET_DISPLAY_GROUP;
  461.   NET_DISPLAY_GROUP = _NET_DISPLAY_GROUP;
  462.  
  463.   _STAT_WORKSTATION_0 = record
  464.     stw0_start: DWORD;
  465.     stw0_numNCB_r: DWORD;
  466.     stw0_numNCB_s: DWORD;
  467.     stw0_numNCB_a: DWORD;
  468.     stw0_fiNCB_r: DWORD;
  469.     stw0_fiNCB_s: DWORD;
  470.     stw0_fiNCB_a: DWORD;
  471.     stw0_fcNCB_r: DWORD;
  472.     stw0_fcNCB_s: DWORD;
  473.     stw0_fcNCB_a: DWORD;
  474.     stw0_sesstart: DWORD;
  475.     stw0_sessfailcon: DWORD;
  476.     stw0_sessbroke: DWORD;
  477.     stw0_uses: DWORD;
  478.     stw0_usefail: DWORD;
  479.     stw0_autorec: DWORD;
  480.     stw0_bytessent_r_lo: DWORD;
  481.     stw0_bytessent_r_hi: DWORD;
  482.     stw0_bytesrcvd_r_lo: DWORD;
  483.     stw0_bytesrcvd_r_hi: DWORD;
  484.     stw0_bytessent_s_lo: DWORD;
  485.     stw0_bytessent_s_hi: DWORD;
  486.     stw0_bytesrcvd_s_lo: DWORD;
  487.     stw0_bytesrcvd_s_hi: DWORD;
  488.     stw0_bytessent_a_lo: DWORD;
  489.     stw0_bytessent_a_hi: DWORD;
  490.     stw0_bytesrcvd_a_lo: DWORD;
  491.     stw0_bytesrcvd_a_hi: DWORD;
  492.     stw0_reqbufneed: DWORD;
  493.     stw0_bigbufneed: DWORD;
  494.   end;
  495.  
  496.   PSTAT_WORKSTATION_0 = ^STAT_WORKSTATION_0;
  497.   STAT_WORKSTATION_0 = _STAT_WORKSTATION_0;
  498.  
  499.   _STAT_SERVER_0 = record
  500.     sts0_start: DWORD;
  501.     sts0_fopens: DWORD;
  502.     sts0_devopens: DWORD;
  503.     sts0_jobsqueued: DWORD;
  504.     sts0_sopens: DWORD;
  505.     sts0_stimedout: DWORD;
  506.     sts0_serrorout: DWORD;
  507.     sts0_pwerrors: DWORD;
  508.     sts0_permerrors: DWORD;
  509.     sts0_syserrors: DWORD;
  510.     sts0_bytessent_low: DWORD;
  511.     sts0_bytessent_high: DWORD;
  512.     sts0_bytesrcvd_low: DWORD;
  513.     sts0_bytesrcvd_high: DWORD;
  514.     sts0_avresponse: DWORD;
  515.     sts0_reqbufneed: DWORD;
  516.     sts0_bigbufneed: DWORD;
  517.   end;
  518.  
  519.   PSTAT_SERVER_0 = ^STAT_SERVER_0;
  520.   STAT_SERVER_0 = _STAT_SERVER_0;
  521.  
  522.   _SERVER_TRANSPORT_INFO_1 = record
  523.     svti1_numberofvcs: DWORD;
  524.     svti1_transportname: LPSTR;
  525.     svti1_transportaddress: PBYTE;
  526.     svti1_transportaddresslength: DWORD;
  527.     svti1_networkaddress: LPSTR;
  528.     svti1_domain: LPSTR;
  529.   end;
  530.  
  531.   PSERVER_TRANSPORT_INFO_1 = ^SERVER_TRANSPORT_INFO_1;
  532.   SERVER_TRANSPORT_INFO_1 = _SERVER_TRANSPORT_INFO_1;
  533.  
  534.   _WKSTA_TRANSPORT_INFO_0 = record
  535.     wkti0_quality_of_service: DWORD;
  536.     wkti0_number_of_vcs: DWORD;
  537.     wkti0_transport_name: LPWSTR;
  538.     wkti0_transport_address: LPWSTR;
  539.     wkti0_wan_ish: BOOL;
  540.   end;
  541.  
  542.   PWKSTA_TRANSPORT_INFO_0 = ^WKSTA_TRANSPORT_INFO_0;
  543.   WKSTA_TRANSPORT_INFO_0 = _WKSTA_TRANSPORT_INFO_0;
  544.  
  545.   _WKSTA_USER_INFO_0 = record
  546.       wkui0_username :LPWSTR;
  547.   end;
  548.  
  549.   PWKSTA_USER_INFO_0 = ^WKSTA_USER_INFO_0;
  550.   WKSTA_USER_INFO_0 = ^_WKSTA_USER_INFO_0;
  551.  
  552.   _WKSTA_USER_INFO_1 = record
  553.       wkui1_username :LPWSTR;
  554.       wkui1_logon_domain :LPWSTR;
  555.       wkui1_oth_domains :LPWSTR;
  556.       wkui1_logon_server :LPWSTR;
  557.   end;
  558.  
  559.   PWKSTA_USER_INFO_1 = ^WKSTA_USER_INFO_1;
  560.   WKSTA_USER_INFO_1 = ^_WKSTA_USER_INFO_1;
  561.  
  562.   _WKSTA_INFO_100 = record
  563.      wksi100_platform_id : DWORD;
  564.      wksi100_computername : LPWSTR;
  565.      wksi100_langroup : LPWSTR;
  566.      wksi100_ver_major : DWORD;
  567.      wksi100_ver_minor : DWORD;
  568.   end;
  569.  
  570.   PWKSTA_INFO_100 = ^WKSTA_INFO_100;
  571.   WKSTA_INFO_100 = _WKSTA_INFO_100;
  572.  
  573.  
  574.   _SERVER_INFO_100 = record
  575.      sv100_platform_id : DWORD;
  576.      sv100_name : LPWSTR;
  577.   end;
  578.  
  579.   PSERVER_INFO_100 = ^SERVER_INFO_100;
  580.   SERVER_INFO_100 = _SERVER_INFO_100;
  581.  
  582.   _SERVER_INFO_101 = record
  583.     sv101_platform_id :DWORD;
  584.     sv101_name :LPWSTR;
  585.     sv101_version_major :DWORD;
  586.     sv101_version_minor :DWORD;
  587.     sv101_type :DWORD;
  588.     sv101_comment :LPWSTR;
  589.   end;
  590.  
  591.   PSERVER_INFO_101 = ^SERVER_INFO_101;
  592.   SERVER_INFO_101 = ^_SERVER_INFO_101;
  593.  
  594.   _USER_INFO_11 = record
  595.     usri11_name: LPWSTR;
  596.     usri11_comment: LPWSTR;
  597.     usri11_usr_comment: LPWSTR;
  598.     usri11_full_name: LPWSTR;
  599.     usri11_priv: DWORD;
  600.     usri11_auth_flags: DWORD;
  601.     usri11_password_age: DWORD;
  602.     usri11_home_dir: LPWSTR;
  603.     usri11_parms: LPWSTR;
  604.     usri11_last_logon: DWORD;
  605.     usri11_last_logoff: DWORD;
  606.     usri11_bad_pw_count: DWORD;
  607.     usri11_num_logons: DWORD;
  608.     usri11_logon_server: LPWSTR;
  609.     usri11_country_code: DWORD;
  610.     usri11_workstations: LPWSTR;
  611.     usri11_max_storage: DWORD;
  612.     usri11_units_per_week: DWORD;
  613.     usri11_logon_hours: PBYTE;
  614.     usri11_code_page: DWORD;
  615.   end;
  616.  
  617.   PUSER_INFO_11 = ^USER_INFO_11;
  618.   USER_INFO_11 = _USER_INFO_11;
  619.  
  620.   _GROUP_USERS_INFO_0 = record
  621.      grui0_name: LPWSTR;
  622.    end;
  623.  
  624.    PGROUP_USERS_INFO_0 = ^GROUP_USERS_INFO_0;
  625.    GROUP_USERS_INFO_0 = _GROUP_USERS_INFO_0;
  626.  
  627.   _GROUP_INFO_2 = record
  628.     grpi2_name: LPWSTR;
  629.     grpi2_comment: LPWSTR;
  630.     grpi2_group_id: DWORD;
  631.     grpi2_attributes: DWORD;
  632.   end;
  633.  
  634.   PGROUP_INFO_2 = ^GROUP_INFO_2;
  635.   GROUP_INFO_2 = _GROUP_INFO_2;
  636.  
  637.   _LOCALGROUP_INFO_0 = record
  638.     lgrpi1_name: LPWSTR;
  639.   end;
  640.  
  641.   PLOCALGROUP_INFO_0 = ^LOCALGROUP_INFO_0;
  642.   LOCALGROUP_INFO_0 = _LOCALGROUP_INFO_0;
  643.  
  644.   _LOCALGROUP_INFO_1 = record
  645.     lgrpi1_name: LPWSTR;
  646.     lgrpi1_comment: LPWSTR;
  647.   end;
  648.  
  649.   PLOCALGROUP_INFO_1 = ^LOCALGROUP_INFO_1;
  650.   LOCALGROUP_INFO_1 = _LOCALGROUP_INFO_1;
  651.  
  652.   _LOCALGROUP_USERS_INFO_0 = record
  653.      lgrui0_name: LPWSTR;
  654.   end;
  655.  
  656.   PLOCALGROUP_USERS_INFO_0 = ^LOCALGROUP_USERS_INFO_0;
  657.   LOCALGROUP_USERS_INFO_0 = _LOCALGROUP_USERS_INFO_0;
  658.  
  659.   _LOCALGROUP_MEMBERS_INFO_3 = record
  660.     lgrmi3_domainandname: LPWSTR;
  661.   end;
  662.  
  663.   PLOCALGROUP_MEMBERS_INFO_3 = ^LOCALGROUP_MEMBERS_INFO_3;
  664.   LOCALGROUP_MEMBERS_INFO_3 = _LOCALGROUP_MEMBERS_INFO_3;
  665.  
  666.   _SHARE_INFO_502 = record
  667.     shi502_netname: LPWSTR;
  668.     shi502_type: DWORD;
  669.     shi502_remark: LPWSTR;
  670.     shi502_permissions: DWORD;
  671.     shi502_max_uses: DWORD;
  672.     shi502_current_uses: DWORD;
  673.     shi502_path: LPWSTR;
  674.     shi502_passwd: LPWSTR;
  675.     shi502_reserved: DWORD;
  676.     shi502_security_descriptor: PSECURITY_DESCRIPTOR;
  677.   end;
  678.  
  679.   PSHARE_INFO_502 = ^SHARE_INFO_502;
  680.   SHARE_INFO_502 = _SHARE_INFO_502;
  681.  
  682.  
  683.   _FILE_INFO_3 = record
  684.     fi3_id: DWORD;
  685.     fi3_permissions: DWORD;
  686.     fi3_num_locks: DWORD;
  687.     fi3_pathname: LPWSTR;
  688.     fi3_username: LPWSTR;
  689.   end;
  690.  
  691.   PFILE_INFO_3 = ^FILE_INFO_3;
  692.   FILE_INFO_3 = _FILE_INFO_3;
  693.  
  694.   _SESSION_INFO_502 = record
  695.     sesi502_cname: LPWSTR;
  696.     sesi502_username: LPWSTR;
  697.     sesi502_num_opens: DWORD;
  698.     sesi502_time: DWORD;
  699.     sesi502_idle_time: DWORD;
  700.     sesi502_user_flags: DWORD;
  701.     sesi502_cltype_name: LPWSTR;
  702.     sesi502_transport: LPWSTR;
  703.   end;
  704.  
  705.   PSESSION_INFO_502 = ^SESSION_INFO_502;
  706.   SESSION_INFO_502 = _SESSION_INFO_502;
  707.  
  708.   _CONNECTION_INFO_1 = record
  709.     coni1_id: DWORD;
  710.     coni1_type: DWORD;
  711.     coni1_num_opens: DWORD;
  712.     coni1_num_users: DWORD;
  713.     coni1_time: DWORD;
  714.     coni1_username: LPWSTR;
  715.     coni1_netname: LPWSTR;
  716.   end;
  717.  
  718.   PCONNECTION_INFO_1 = ^CONNECTION_INFO_1;
  719.   CONNECTION_INFO_1 = _CONNECTION_INFO_1;
  720.  
  721.   _AT_ENUM = record
  722.     JobId: DWORD;
  723.     JobTime: DWORD;
  724.     DaysOfMonth: DWORD;
  725.     DaysOfWeek: byte;
  726.     flags: byte;
  727.     Command: LPWSTR;
  728.   end;
  729.  
  730.   PAT_ENUM = ^AT_ENUM;
  731.   AT_ENUM = _AT_ENUM;
  732.  
  733.   _AT_INFO = record
  734.     JobTime: DWORD;
  735.     DaysOfMonth: DWORD;
  736.     DaysOfWeek: byte;
  737.     flags: byte;
  738.     Command: LPWSTR;
  739.   end;
  740.  
  741.   PAT_INFO = ^AT_INFO;
  742.   AT_INFO = _AT_INFO;
  743.  
  744. function InitNETAPI: Boolean;
  745. function FreeNETAPI: Boolean;
  746.  
  747. function NetQueryDisplayInformation(ServerName: LPCWSTR; Level: DWORD;
  748.                                     Index: DWORD; EntriesRequested: DWORD;
  749.                                     PrefMaxLen: DWORD;
  750.                                     var ReturnedEntryCount: DWORD;
  751.                                     var SortedBuffer: Pointer): NET_API_STATUS; stdcall;
  752.  
  753.  
  754. function NetStatisticsGet(ServerName: LPWSTR; Service: LPWSTR; Level: DWORD;
  755.                           Options: DWORD; var BufPtr: Pointer): NET_API_STATUS; stdcall;
  756.  
  757.  
  758. function NetWkstaGetInfo(ServerName: LPWSTR; Level: DWORD;
  759.                          var Bufptr: Pointer): NET_API_STATUS; stdcall;
  760.  
  761. function NetWkstaUserEnum(ServerName: LPWSTR; Level: DWORD;
  762.                           var BufPtr: Pointer; PrefMaxLen: DWORD;
  763.                           var EntriesRead: DWORD;
  764.                           var TotalEntries: DWORD;
  765.                           var ResumeHandle: DWORD): NET_API_STATUS; stdcall;
  766.  
  767. function NetWkstaUserGetInfo(Reserved: LPWSTR; Level: DWORD;
  768.                              var BufPtr: Pointer): NET_API_STATUS; stdcall;
  769.  
  770. function NetWkstaTransportEnum(ServerName: LPWSTR; Level: DWORD;
  771.                           var BufPtr: Pointer; PrefMaxLen: DWORD;
  772.                           var EntriesRead: DWORD;
  773.                           var TotalEntries: DWORD;
  774.                           var ResumeHandle: DWORD): NET_API_STATUS; stdcall;
  775.  
  776. function NetServerTransportEnum(ServerName: LPWSTR; Level: DWORD;
  777.                           var BufPtr: Pointer; PrefMaxLen: DWORD;
  778.                           var EntriesRead: DWORD;
  779.                           var TotalEntries: DWORD;
  780.                           var ResumeHandle: DWORD): NET_API_STATUS; stdcall;
  781.  
  782. function NetUserEnum(ServerName: LPWSTR; Level: DWORD; Filter: DWORD;
  783.                      var Bufptr: Pointer; PrefMaxLen: DWORD;
  784.                      var EntriesRead: DWORD;
  785.                      var TotalEntries: DWORD;
  786.                      var ResumeHandle: DWORD): NET_API_STATUS; stdcall;
  787.  
  788. function NetUserGetInfo(ServerName: LPWSTR; UserName: LPWSTR;  Level: DWORD;
  789.                         var Bufptr: Pointer): NET_API_STATUS; stdcall;
  790.  
  791. function NetUserGetLocalGroups(ServerName: LPWSTR; UserName: LPWSTR;
  792.                           Level: DWORD; Flags: DWORD;
  793.                           var BufPtr: Pointer; PrefMaxLen: DWORD;
  794.                           var EntriesRead: DWORD;
  795.                           var TotalEntries: DWORD): NET_API_STATUS; stdcall;
  796.  
  797. function NetUserGetGroups(ServerName: LPWSTR; UserName: LPWSTR; Level: DWORD;
  798.                           var BufPtr: Pointer; PrefMaxLen: DWORD;
  799.                           var EntriesRead: DWORD;
  800.                           var TotalEntries: DWORD): NET_API_STATUS; stdcall;
  801.  
  802.  
  803. function NetGroupEnum(ServerName: LPWSTR; Level: DWORD;
  804.                       var BufPtr: Pointer; PrefMaxLen: DWORD;
  805.                       var EntriesRead: DWORD;
  806.                       var TotalEntries: DWORD;
  807.                       var ResumeHandle: DWORD): NET_API_STATUS; stdcall;
  808.  
  809. function NetLocalGroupEnum(ServerName: LPWSTR; Level: DWORD;
  810.                       var BufPtr: Pointer; PrefMaxLen: DWORD;
  811.                       var EntriesRead: DWORD;
  812.                       var TotalEntries: DWORD;
  813.                       var ResumeHandle: DWORD): NET_API_STATUS; stdcall;
  814.  
  815. function NetGroupGetUsers(ServerName: LPWSTR; GroupName: LPWSTR; Level: DWORD;
  816.                           var BufPtr: Pointer; PrefMaxLen: DWORD;
  817.                           var EntriesRead: DWORD;
  818.                           var TotalEntries: DWORD;
  819.                           var ResumeHandle: DWORD): NET_API_STATUS; stdcall;
  820.  
  821. function NetLocalGroupGetMembers(ServerName: LPWSTR; GroupName: LPWSTR; Level: DWORD;
  822.                           var BufPtr: Pointer; PrefMaxLen: DWORD;
  823.                           var EntriesRead: DWORD;
  824.                           var TotalEntries: DWORD;
  825.                           var ResumeHandle: DWORD): NET_API_STATUS; stdcall;
  826.  
  827. function NetServerEnum(ServerName: LPWSTR; Level: DWORD;
  828.                        var Bufptr: Pointer; PrefMaxLen: DWORD;
  829.                        var EntriesRead: DWORD;
  830.                        var TotalEntries: DWORD;  ServerType: DWORD;  Domain: LPWSTR;
  831.                        var ResumeHandle: DWORD): NET_API_STATUS; stdcall;
  832.  
  833. function NetShareEnum(ServerName: LPWSTR; Level: DWORD;
  834.                       var BufPtr: Pointer; PrefMaxLength: DWORD;
  835.                       var EntriesRead: DWORD;
  836.                       var TotalEntries: DWORD;
  837.                       var ResumeHandle: DWORD): NET_API_STATUS; stdcall;
  838.  
  839. function NetShareDel(ServerName: LPWSTR; NetName: LPWSTR; Reserved: DWORD): NET_API_STATUS; stdcall;
  840.  
  841. function NetConnectionEnum(ServerName: LPWSTR; Qualifier: LPWSTR;
  842.                       Level: DWORD;
  843.                       var BufPtr: Pointer; PrefMaxLength: DWORD;
  844.                       var EntriesRead: DWORD;
  845.                       var TotalEntries: DWORD;
  846.                       var ResumeHandle: DWORD): NET_API_STATUS; stdcall;
  847.  
  848. function NetSessionEnum(ServerName: LPWSTR; UncClientName: LPWSTR; UserName: LPWSTR;
  849.                       Level: DWORD;
  850.                       var BufPtr: Pointer; PrefMaxLength: DWORD;
  851.                       var EntriesRead: DWORD;
  852.                       var TotalEntries: DWORD;
  853.                       var ResumeHandle: DWORD): NET_API_STATUS; stdcall;
  854.  
  855. function NetSessionDel(ServerName: LPWSTR; UncClientName: LPWSTR; Username: LPWSTR): NET_API_STATUS; stdcall;
  856.  
  857. function NetFileEnum(ServerName: LPWSTR; BasePath: LPWSTR; UserName: LPWSTR;
  858.                       Level: DWORD;
  859.                       var BufPtr: Pointer; PrefMaxLength: DWORD;
  860.                       var EntriesRead: DWORD;
  861.                       var TotalEntries: DWORD;
  862.                       var ResumeHandle: DWORD): NET_API_STATUS; stdcall;
  863.  
  864. function NetFileClose(ServerName: LPWSTR; FileID: DWORD): NET_API_STATUS; stdcall;
  865.  
  866. function NetScheduleJobAdd(ServerName : LPWSTR;
  867.                            Buffer : pointer;
  868.                            var JobID : DWORD) : NET_API_STATUS; stdcall;
  869. function NetScheduleJobDel (ServerName : LPWSTR;
  870.                            MinJobID,
  871.                            MaxJobID : DWORD) : NET_API_STATUS; stdcall;
  872. function NetScheduleJobEnum (ServerName : LPWSTR;
  873.                              var buffer : pointer;
  874.                              PrefMaximumLength : DWORD;
  875.                              var EntriesRead :DWord;
  876.                              var TotalEntries :DWord;
  877.                              var ResumeHandle : DWord) : NET_API_STATUS; stdcall;
  878. function NetScheduleJobGetInfo(ServerName : LPWSTR;
  879.                                JobId : DWORD;
  880.                                var buffer : pointer) : NET_API_STATUS; stdcall;
  881.  
  882. function NetApiBufferFree(buffer: Pointer): NET_API_STATUS; stdcall;
  883.  
  884. function NetApiBufferReallocate(OldBuffer : Pointer;
  885.                                 NewByteCount : DWORD;
  886.                                 var NewBuffer : Pointer) : NET_API_STATUS; stdcall;
  887. function NetApiBufferSize(buffer : Pointer;
  888.                           var byteCount : DWORD) : NET_API_STATUS; stdcall;
  889.  
  890. type
  891.   TNetQueryDisplayInformation = function(ServerName: LPCWSTR; Level: DWORD;
  892.                                     Index: DWORD; EntriesRequested: DWORD;
  893.                                     PrefMaxLen: DWORD;
  894.                                     var ReturnedEntryCount: DWORD;
  895.                                     var SortedBuffer: Pointer): NET_API_STATUS; stdcall;
  896.  
  897.   TNetStatisticsGet = function (ServerName: LPWSTR; Service: LPWSTR; Level: DWORD;
  898.                           Options: DWORD; var BufPtr: Pointer): NET_API_STATUS; stdcall;
  899.  
  900.   TNetWkstaGetInfo = function(ServerName: LPWSTR; Level: DWORD;
  901.                          var Bufptr: Pointer): NET_API_STATUS; stdcall;
  902.  
  903.   TNetWkstaUserEnum = function(ServerName: LPWSTR; Level: DWORD;
  904.                           var BufPtr: Pointer; PrefMaxLen: DWORD;
  905.                           var EntriesRead: DWORD;
  906.                           var TotalEntries: DWORD;
  907.                           var ResumeHandle: DWORD): NET_API_STATUS; stdcall;
  908.  
  909.   TNetWkstaUserGetInfo = function(Reserved: LPWSTR; Level: DWORD;
  910.                              var BufPtr: Pointer): NET_API_STATUS; stdcall;
  911.  
  912.   TNetWkstaTransportEnum = function(ServerName: LPWSTR; Level: DWORD;
  913.                           var BufPtr: Pointer; PrefMaxLen: DWORD;
  914.                           var EntriesRead: DWORD;
  915.                           var TotalEntries: DWORD;
  916.                           var ResumeHandle: DWORD): NET_API_STATUS; stdcall;
  917.  
  918.   TNetServerTransportEnum = function(ServerName: LPWSTR; Level: DWORD;
  919.                           var BufPtr: Pointer; PrefMaxLen: DWORD;
  920.                           var EntriesRead: DWORD;
  921.                           var TotalEntries: DWORD;
  922.                           var ResumeHandle: DWORD): NET_API_STATUS; stdcall;
  923.  
  924.   TNetUserEnum = function(ServerName: LPWSTR; Level: DWORD; Filter: DWORD;
  925.                      var Bufptr: Pointer; PrefMaxLen: DWORD;
  926.                      var EntriesRead: DWORD;
  927.                      var TotalEntries: DWORD;
  928.                      var ResumeHandle: DWORD): NET_API_STATUS; stdcall;
  929.  
  930.   TNetUserGetInfo = function (ServerName: LPWSTR; UserName: LPWSTR;  Level: DWORD;
  931.                         var Bufptr: Pointer): NET_API_STATUS; stdcall;
  932.  
  933.   TNetUserGetGroups = function(ServerName: LPWSTR; UserName: LPCWSTR; Level: DWORD;
  934.                           var BufPtr: Pointer; PrefMaxLen: DWORD;
  935.                           var EntriesRead: DWORD;
  936.                           var TotalEntries: DWORD): NET_API_STATUS; stdcall;
  937.  
  938.   TNetUserGetLocalGroups = function(ServerName: LPWSTR; UserName: LPCWSTR;
  939.                           Level: DWORD; Flags: DWORD;
  940.                           var BufPtr: Pointer; PrefMaxLen: DWORD;
  941.                           var EntriesRead: DWORD;
  942.                           var TotalEntries: DWORD): NET_API_STATUS; stdcall;
  943.  
  944.   TNetGroupEnum = function(ServerName: LPWSTR; Level: DWORD;
  945.                            var BufPtr: Pointer; PrefMaxLen: DWORD;
  946.                            var EntriesRead: DWORD;
  947.                            var TotalEntries: DWORD;
  948.                            var ResumeHandle: DWORD): NET_API_STATUS; stdcall;
  949.  
  950.   TNetLocalGroupEnum = function(ServerName: LPWSTR; Level: DWORD;
  951.                            var BufPtr: Pointer; PrefMaxLen: DWORD;
  952.                            var EntriesRead: DWORD;
  953.                            var TotalEntries: DWORD;
  954.                            var ResumeHandle: DWORD): NET_API_STATUS; stdcall;
  955.  
  956.   TNetGroupGetUsers = function(ServerName: LPWSTR; GroupName: LPCWSTR; Level: DWORD;
  957.                           var BufPtr: Pointer; PrefMaxLen: DWORD;
  958.                           var EntriesRead: DWORD;
  959.                           var TotalEntries: DWORD;
  960.                           var ResumeHandle: DWORD): NET_API_STATUS; stdcall;
  961.  
  962.   TNetLocalGroupGetMembers = function(ServerName: LPWSTR; GroupName: LPCWSTR; Level: DWORD;
  963.                           var BufPtr: Pointer; PrefMaxLen: DWORD;
  964.                           var EntriesRead: DWORD;
  965.                           var TotalEntries: DWORD;
  966.                           var ResumeHandle: DWORD): NET_API_STATUS; stdcall;
  967.  
  968.   TNetServerEnum = function (ServerName: LPWSTR; Level: DWORD;
  969.                        var Bufptr: Pointer; PrefMaxLen: DWORD;
  970.                        var EntriesRead: DWORD;
  971.                        var TotalEntries: DWORD;  ServerType: DWORD;  Domain: LPWSTR;
  972.                        var ResumeHandle: DWORD): NET_API_STATUS; stdcall;
  973.  
  974.   TNetShareEnum = function(ServerName: LPWSTR; Level: DWORD;
  975.                       var BufPtr: Pointer; PrefMaxLength: DWORD;
  976.                       var EntriesRead: DWORD;
  977.                       var TotalEntries: DWORD;
  978.                       var ResumeHandle: DWORD): NET_API_STATUS; stdcall;
  979.  
  980.   TNetShareDel = function(ServerName: LPWSTR; NetName: LPWSTR; Reserved: DWORD): NET_API_STATUS; stdcall;
  981.  
  982.   TNetSessionEnum = function(ServerName: LPWSTR; UncClientName: LPWSTR; UserName: LPWSTR;
  983.                       Level: DWORD;
  984.                       var BufPtr: Pointer; PrefMaxLength: DWORD;
  985.                       var EntriesRead: DWORD;
  986.                       var TotalEntries: DWORD;
  987.                       var ResumeHandle: DWORD): NET_API_STATUS; stdcall;
  988.  
  989.   TNetSessionDel = function(ServerName: LPWSTR; UncClientName: LPWSTR; Username: LPWSTR): NET_API_STATUS; stdcall;
  990.  
  991.   TNetConnectionEnum = function(ServerName: LPWSTR; Qualifier: LPWSTR;
  992.                       Level: DWORD;
  993.                       var BufPtr: Pointer; PrefMaxLength: DWORD;
  994.                       var EntriesRead: DWORD;
  995.                       var TotalEntries: DWORD;
  996.                       var ResumeHandle: DWORD): NET_API_STATUS; stdcall;
  997.  
  998.   TNetFileEnum = function(ServerName: LPWSTR; BasePath: LPWSTR; UserName: LPWSTR;
  999.                       Level: DWORD;
  1000.                       var BufPtr: Pointer; PrefMaxLength: DWORD;
  1001.                       var EntriesRead: DWORD;
  1002.                       var TotalEntries: DWORD;
  1003.                       var ResumeHandle: DWORD): NET_API_STATUS; stdcall;
  1004.  
  1005.   TNetFileClose = function(ServerName: LPWSTR; FileID: DWORD): NET_API_STATUS; stdcall;
  1006.  
  1007.   TNetScheduleJobAdd = function(ServerName : LPWSTR;
  1008.                            Buffer : pointer;
  1009.                            var JobID : DWORD) : NET_API_STATUS; stdcall;
  1010.   TNetScheduleJobDel = function(ServerName : LPWSTR;
  1011.                            MinJobID,
  1012.                            MaxJobID : DWORD) : NET_API_STATUS; stdcall;
  1013.   TNetScheduleJobEnum = function(ServerName : LPWSTR;
  1014.                              var buffer : pointer;
  1015.                              PrefMaximumLength : DWORD;
  1016.                              var EntriesRead :DWord;
  1017.                              var TotalEntries :DWord;
  1018.                              var ResumeHandle : DWord) : NET_API_STATUS; stdcall;
  1019.   TNetScheduleJobGetInfo = function(ServerName : LPWSTR;
  1020.                                JobId : DWORD;
  1021.                                var buffer : pointer) : NET_API_STATUS; stdcall;
  1022.  
  1023.   TNetApiBufferFree = function (buffer: Pointer): NET_API_STATUS; stdcall;
  1024.  
  1025.   TNetApiBufferReallocate = function(OldBuffer : Pointer;
  1026.                                 NewByteCount : DWORD;
  1027.                                 var NewBuffer : Pointer) : NET_API_STATUS; stdcall;
  1028.   TNetApiBufferSize = function(buffer : Pointer;
  1029.                           var byteCount : DWORD) : NET_API_STATUS; stdcall;
  1030.  
  1031.  
  1032. var
  1033.   NETAPILoaded: Boolean;
  1034.  
  1035. implementation
  1036.  
  1037.