source: trunk/include/helpers/lan.h

Last change on this file was 257, checked in by umoeller, 22 years ago

Fixes that have piled up in the last three months.

  • Property svn:eol-style set to CRLF
  • Property svn:keywords set to Author Date Id Revision
File size: 35.4 KB
Line 
1
2/*
3 *@@sourcefile lan.h:
4 * header file for lan.c. See notes there.
5 *
6 * Since the LAN headers are so confusing and maybe not
7 * everyone has them, we duplicate all definitions that
8 * we need here.
9 *
10 * Note: Version numbering in this file relates to XWorkplace version
11 * numbering.
12 *
13 *@@include #include <os2.h>
14 *@@include #include <netcons.h>
15 *@@include #include "helpers\lan.h"
16 */
17
18/*
19 * Copyright (C) 2001 Ulrich M”ller.
20 * This file is part of the "XWorkplace helpers" source package.
21 * This is free software; you can redistribute it and/or modify
22 * it under the terms of the GNU General Public License as published
23 * by the Free Software Foundation, in version 2 as it comes in the
24 * "COPYING" file of the XWorkplace main distribution.
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 * GNU General Public License for more details.
29 */
30
31#if __cplusplus
32extern "C" {
33#endif
34
35#ifndef LANH_HEADER_INCLUDED
36 #define LANH_HEADER_INCLUDED
37
38 #ifndef NERR_NetNotStarted
39 #define NERR_BASE 2100
40
41 #define NERR_NetNotStarted (NERR_BASE+2) /* The workstation driver (NETWKSTA.SYS on OS/2 workstations, NETWKSTA.EXE on DOS workstations) isn't installed. */
42 #define NERR_UnknownServer (NERR_BASE+3) /* The server cannot be located. */
43 #define NERR_ShareMem (NERR_BASE+4) /* An internal error occurred. The network cannot access a shared memory segment. */
44 #define NERR_NoNetworkResource (NERR_BASE+5) /* A network resource shortage occurred . */
45 #define NERR_RemoteOnly (NERR_BASE+6) /* This operation is not supported on workstations. */
46 #define NERR_DevNotRedirected (NERR_BASE+7) /* The device is not connected. */
47 #define Dhcpwaitmsg (NERR_BASE+8) /* Waiting for response from DHCP server */
48 #define DhcpCompletemsg (NERR_BASE+9) /* Successful response received from DHCP server */
49 #define NERR_ServerNotStarted (NERR_BASE+14) /* The Server service isn't started. */
50 #define NERR_ItemNotFound (NERR_BASE+15) /* The queue is empty. */
51 #define NERR_UnknownDevDir (NERR_BASE+16) /* The device or directory does not exist. */
52 #define NERR_RedirectedPath (NERR_BASE+17) /* The operation is invalid on a redirected resource. */
53 #define NERR_DuplicateShare (NERR_BASE+18) /* The name has already been shared. */
54 #define NERR_NoRoom (NERR_BASE+19) /* The server is currently out of the requested resource. */
55 #define NERR_TooManyItems (NERR_BASE+21) /* Requested add of item exceeds maximum allowed. */
56 #define NERR_InvalidMaxUsers (NERR_BASE+22) /* The Peer service supports only two simultaneous users. */
57 #define NERR_BufTooSmall (NERR_BASE+23) /* The API return buffer is too small. */
58 #define NERR_RemoteErr (NERR_BASE+27) /* A remote API error occurred. */
59 #define NERR_LanmanIniError (NERR_BASE+31) /* An error occurred when opening or reading IBMLAN.INI. */
60 #define NERR_OS2IoctlError (NERR_BASE+34) /* An internal error occurred when calling the workstation driver. */
61 #define NERR_NetworkError (NERR_BASE+36) /* A general network error occurred. */
62 #define NERR_WkstaNotStarted (NERR_BASE+38) /* The Requester service has not been started. */
63 #define NERR_InternalError (NERR_BASE+40) /* An internal LAN Manager error occurred.*/
64 #define NERR_BadTransactConfig (NERR_BASE+41) /* The server is not configured for transactions. */
65 #define NERR_InvalidAPI (NERR_BASE+42) /* The requested API isn't supported on the remote server. */
66 #define NERR_BadEventName (NERR_BASE+43) /* The event name is invalid. */
67
68 #define NERR_CfgCompNotFound (NERR_BASE+46) /* Could not find the specified component in IBMLAN.INI. */
69 #define NERR_CfgParamNotFound (NERR_BASE+47) /* Could not find the specified parameter in IBMLAN.INI. */
70 #define NERR_LineTooLong (NERR_BASE+49) /* A line in IBMLAN.INI is too long. */
71
72 #define NERR_QNotFound (NERR_BASE+50) /* The printer queue does not exist. */
73 #define NERR_JobNotFound (NERR_BASE+51) /* The print job does not exist. */
74 #define NERR_DestNotFound (NERR_BASE+52) /* The printer destination cannot be found. */
75 #define NERR_DestExists (NERR_BASE+53) /* The printer destination already exists. */
76 #define NERR_QExists (NERR_BASE+54) /* The printer queue already exists. */
77 #define NERR_QNoRoom (NERR_BASE+55) /* No more printer queues can be added. */
78 #define NERR_JobNoRoom (NERR_BASE+56) /* No more print jobs can be added. */
79 #define NERR_DestNoRoom (NERR_BASE+57) /* No more printer destinations can be added. */
80 #define NERR_DestIdle (NERR_BASE+58) /* This printer destination is idle and cannot accept control operations. */
81 #define NERR_DestInvalidOp (NERR_BASE+59) /* This printer destination request contains an invalid control function. */
82 #define NERR_ProcNoRespond (NERR_BASE+60) /* The printer processor is not responding. */
83 #define NERR_SpoolerNotLoaded (NERR_BASE+61) /* The spooler is not running. */
84 #define NERR_DestInvalidState (NERR_BASE+62) /* This operation cannot be performed on the print destination in its current state. */
85 #define NERR_QInvalidState (NERR_BASE+63) /* This operation cannot be performed on the printer queue in its current state. */
86 #define NERR_JobInvalidState (NERR_BASE+64) /* This operation cannot be performed on the print job in its current state. */
87 #define NERR_SpoolNoMemory (NERR_BASE+65) /* A spooler memory allocation failure occurred. */
88 #define NERR_DriverNotFound (NERR_BASE+66) /* The device driver does not exist. */
89 #define NERR_DataTypeInvalid (NERR_BASE+67) /* The datatype is not supported by the processor. */
90 #define NERR_ProcNotFound (NERR_BASE+68) /* The print processor is not installed. */
91
92 #define NERR_ServiceTableLocked (NERR_BASE+80) /* The service does not respond to control actions. */
93 #define NERR_ServiceTableFull (NERR_BASE+81) /* The service table is full. */
94 #define NERR_ServiceInstalled (NERR_BASE+82) /* The requested service has already been started. */
95 #define NERR_ServiceEntryLocked (NERR_BASE+83) /* The service does not respond to control actions. */
96 #define NERR_ServiceNotInstalled (NERR_BASE+84) /* The service has not been started. */
97 #define NERR_BadServiceName (NERR_BASE+85) /* The service name is invalid. */
98 #define NERR_ServiceCtlTimeout (NERR_BASE+86) /* The service is not responding to the control function. */
99 #define NERR_ServiceCtlBusy (NERR_BASE+87) /* The service control is busy. */
100 #define NERR_BadServiceProgName (NERR_BASE+88) /* IBMLAN.INI contains an invalid service program name. */
101 #define NERR_ServiceNotCtrl (NERR_BASE+89) /* The service cannot be controlled in its present state. */
102 #define NERR_ServiceKillProc (NERR_BASE+90) /* The service ended abnormally. */
103 #define NERR_ServiceCtlNotValid (NERR_BASE+91) /* The requested pause or stop is not valid for this service. */
104
105 #define NERR_AlreadyLoggedOn (NERR_BASE+100) /* This workstation is already logged on to the local-area network. */
106 #define NERR_NotLoggedOn (NERR_BASE+101) /* The workstation isn't logged on to the local-area network. */
107 #define NERR_BadUsername (NERR_BASE+102) /* The username or groupname parameter is invalid. */
108 #define NERR_BadPassword (NERR_BASE+103) /* The password parameter is invalid. */
109 #define NERR_UnableToAddName_W (NERR_BASE+104) /* @W The logon processor did not add the message alias. */
110 #define NERR_UnableToAddName_F (NERR_BASE+105) /* The logon processor did not add the message alias. */
111 #define NERR_UnableToDelName_W (NERR_BASE+106) /* @W The logoff processor did not delete the message alias. */
112 #define NERR_UnableToDelName_F (NERR_BASE+107) /* The logoff processor did not delete the message alias. */
113 #define NERR_LogonsPaused (NERR_BASE+109) /* Network logons are paused. */
114 #define NERR_LogonServerConflict (NERR_BASE+110)/* A centralized logon-server conflict occurred. */
115 #define NERR_LogonScriptError (NERR_BASE+112) /* An error occurred while loading or running the logon script. */
116 #define NERR_StandaloneLogon (NERR_BASE+114) /* The logon server was not specified. Your computer will be logged on as STANDALONE. */
117 #define NERR_LogonServerNotFound (NERR_BASE+115) /* The logon server cannot be found. */
118 #define NERR_NonValidatedLogon (NERR_BASE+117) /* The logon server could not validate the logon. */
119
120 #define NERR_AccountUndeletable (NERR_BASE+118) /* The user account is marked undeletable. */
121 #define NERR_ACFNotFound (NERR_BASE+119) /* The accounts file NET.ACC cannot be found. */
122 #define NERR_GroupNotFound (NERR_BASE+120) /* The groupname cannot be found. */
123 #define NERR_UserNotFound (NERR_BASE+121) /* The username cannot be found. */
124 #define NERR_ResourceNotFound (NERR_BASE+122) /* The resource name cannot be found. */
125 #define NERR_GroupExists (NERR_BASE+123) /* The group already exists. */
126 #define NERR_UserExists (NERR_BASE+124) /* The user account already exists. */
127 #define NERR_ResourceExists (NERR_BASE+125) /* The resource permission list already exists. */
128 #define NERR_NotPrimary (NERR_BASE+126) /* The UAS database is replicant and will not allow updates. */
129 #define NERR_ACFNotLoaded (NERR_BASE+127) /* The user account system has not been started. */
130 #define NERR_ACFNoRoom (NERR_BASE+128) /* There are too many names in the user account system. */
131 #define NERR_ACFFileIOFail (NERR_BASE+129) /* A disk I/O failure occurred.*/
132 #define NERR_ACFTooManyLists (NERR_BASE+130) /* The limit of 64 entries per resource was exceeded. */
133 #define NERR_UserLogon (NERR_BASE+131) /* Deleting a user with a session is not allowed. */
134 #define NERR_ACFNoParent (NERR_BASE+132) /* The parent directory cannot be located. */
135 #define NERR_CanNotGrowSegment (NERR_BASE+133) /* Unable to grow UAS session cache segment. */
136 #define NERR_SpeGroupOp (NERR_BASE+134) /* This operation is not allowed on this special group. */
137 #define NERR_NotInCache (NERR_BASE+135) /* This user is not cached in UAS session cache. */
138 #define NERR_UserInGroup (NERR_BASE+136) /* The user already belongs to this group. */
139 #define NERR_UserNotInGroup (NERR_BASE+137) /* The user does not belong to this group. */
140 #define NERR_AccountUndefined (NERR_BASE+138) /* This user account is undefined. */
141 #define NERR_AccountExpired (NERR_BASE+139) /* This user account has expired. */
142 #define NERR_InvalidRequester (NERR_BASE+140) /* The user is not allowed to log on from this workstation. */
143 #define NERR_InvalidLogonHours (NERR_BASE+141) /* The user is not allowed to log on at this time. */
144 #define NERR_PasswordExpired (NERR_BASE+142) /* The password of this user has expired. */
145 #define NERR_PasswordCantChange (NERR_BASE+143) /* The password of this user cannot change. */
146 #define NERR_PasswordHistConflict (NERR_BASE+144) /* This password cannot be used now. */
147 #define NERR_PasswordTooShort (NERR_BASE+145) /* The password is shorter than required. */
148 #define NERR_PasswordTooRecent (NERR_BASE+146) /* The password of this user is too recent to change. */
149 #define NERR_InvalidDatabase (NERR_BASE+147) /* The UAS database file is corrupted. */
150 #define NERR_DatabaseUpToDate (NERR_BASE+148) /* No updates are necessary to this replicant UAS database. */
151 #define NERR_SyncRequired (NERR_BASE+149) /* This replicant database is outdated; synchronization is required. */
152
153 /*
154 * Use API related
155 * Error codes from BASE+150 to BASE+169
156 */
157
158 #define NERR_UseNotFound (NERR_BASE+150) /* The connection cannot be found. */
159 #define NERR_BadAsgType (NERR_BASE+151) /* This asg_type is invalid. */
160 #define NERR_DeviceIsShared (NERR_BASE+152) /* This device is currently being shared. */
161
162 /*
163 * Message Server related
164 * Error codes BASE+170 to BASE+209
165 */
166
167 #define NERR_NoComputerName (NERR_BASE+170) /* A computername has not been configured. */
168 #define NERR_MsgAlreadyStarted (NERR_BASE+171) /* The Messenger service is already started. */
169 #define NERR_MsgInitFailed (NERR_BASE+172) /* The Messenger service failed to start. */
170 #define NERR_NameNotFound (NERR_BASE+173) /* The message alias cannot be found on the local-area network. */
171 #define NERR_AlreadyForwarded (NERR_BASE+174) /* This message alias has already been forwarded. */
172 #define NERR_AlreadyExists (NERR_BASE+176) /* This message alias already exists locally. */
173 #define NERR_TooManyNames (NERR_BASE+177) /* The maximum number of added message aliases has been exceeded. */
174 #define NERR_DelComputerName (NERR_BASE+178) /* The computername cannot be deleted.*/
175 #define NERR_LocalForward (NERR_BASE+179) /* Messages cannot be forwarded back to the same workstation. */
176 #define NERR_GrpMsgProcessor (NERR_BASE+180) /* Error in domain message processor */
177 #define NERR_PausedRemote (NERR_BASE+181) /* The message was sent, but the recipient has paused the Messenger service. */
178 #define NERR_BadReceive (NERR_BASE+182) /* The message was sent but not received. */
179 #define NERR_NameInUse (NERR_BASE+183) /* The message alias is currently in use. Try again later. */
180 #define NERR_MsgNotStarted (NERR_BASE+184) /* The Messenger service has not been started. */
181 #define NERR_NotLocalName (NERR_BASE+185) /* The name is not on the local computer. */
182 #define NERR_NoForwardName (NERR_BASE+186) /* The forwarded message alias cannot be found on the network. */
183 #define NERR_RemoteFull (NERR_BASE+187) /* The message alias table on the remote station is full. */
184 #define NERR_NameNotForwarded (NERR_BASE+188) /* Messages for this alias are not currently being forwarded. */
185 #define NERR_TruncatedBroadcast (NERR_BASE+189) /* The broadcast message was truncated. */
186 #define NERR_InvalidDevice (NERR_BASE+194) /* This is an invalid devicename. */
187 #define NERR_WriteFault (NERR_BASE+195) /* A write fault occurred. */
188 #define NERR_DuplicateName (NERR_BASE+197) /* A duplicate message alias exists on the local-area network. */
189 #define NERR_DeleteLater (NERR_BASE+198) /* @W This message alias will be deleted later. */
190 #define NERR_IncompleteDel (NERR_BASE+199) /* The message alias was not successfully deleted from all networks. */
191 #define NERR_MultipleNets (NERR_BASE+200) /* This operation is not supported on machines with multiple networks. */
192
193 #define NERR_DASDNotInstalled (NERR_BASE+201)
194 #define NERR_DASDAlreadyInstalled (NERR_BASE+202)
195 #define NERR_NotHPFSVolume (NERR_BASE+203)
196 #define NERR_DASDMaxValidationFailed (NERR_BASE+204)
197 #define NERR_DASDInstallVolumeLocked (NERR_BASE+205)
198 #define NERR_LimitNotFound (NERR_BASE+206)
199 #define NERR_LimitExists (NERR_BASE+207)
200 #define NERR_DASDNotRunning (NERR_BASE+208)
201 #define NERR_DASDNotOperational (NERR_BASE+209)
202
203 #define NERR_NetNameNotFound (NERR_BASE+210) /* This shared resource does not exist.*/
204 #define NERR_DeviceNotShared (NERR_BASE+211) /* This device is not shared. */
205 #define NERR_ClientNameNotFound (NERR_BASE+212) /* A session does not exist with that computername. */
206 #define NERR_FileIdNotFound (NERR_BASE+214) /* There isn't an open file with that ID number. */
207 #define NERR_ExecFailure (NERR_BASE+215) /* A failure occurred when executing a remote administration command. */
208 #define NERR_TmpFile (NERR_BASE+216) /* A failure occurred when opening a remote temporary file. */
209 #define NERR_TooMuchData (NERR_BASE+217) /* The data returned from a remote administration command has been truncated to 64K. */
210 #define NERR_DeviceShareConflict (NERR_BASE+218) /* This device cannot be shared as both a spooled and a non-spooled resource. */
211 #define NERR_BrowserTableIncomplete (NERR_BASE+219) /* The information in the list of servers may be incorrect. */
212 #define NERR_NotLocalDomain (NERR_BASE+220) /* The computer isn't active on this domain. */
213
214 #define NERR_RedirectionsNotFound (NERR_BASE+221)
215 #define NERR_LocalPathWarning (NERR_BASE+222)
216 #define NERR_AssignmentNotMade (NERR_BASE+223)
217 #define NERR_ItemNotAssigned (NERR_BASE+224)
218 #define NERR_CantAddAssignments (NERR_BASE+225)
219 #define NERR_CantSetAssignments (NERR_BASE+226)
220 #define NERR_DomainSpecificInfo (NERR_BASE+227)
221 #define NERR_TooManyLogonAsn (NERR_BASE+228)
222 #define NERR_DASDNoAPARs (NERR_BASE+229)
223
224 #define NERR_DevInvalidOpCode (NERR_BASE+231) /* The operation is invalid for this device. */
225 #define NERR_DevNotFound (NERR_BASE+232) /* This device cannot be shared. */
226 #define NERR_DevNotOpen (NERR_BASE+233) /* This device was not open. */
227 #define NERR_BadQueueDevString (NERR_BASE+234) /* This devicename list is invalid. */
228 #define NERR_BadQueuePriority (NERR_BASE+235) /* The queue priority is invalid. */
229 #define NERR_NoCommDevs (NERR_BASE+237) /* There are no shared communication devices. */
230 #define NERR_QueueNotFound (NERR_BASE+238) /* The queue you specified doesn't exist. */
231 #define NERR_BadDevString (NERR_BASE+240) /* This list of devices is invalid. */
232 #define NERR_BadDev (NERR_BASE+241) /* The requested device is invalid. */
233 #define NERR_InUseBySpooler (NERR_BASE+242) /* This device is already in use by the spooler. */
234 #define NERR_CommDevInUse (NERR_BASE+243) /* This device is already in use as a communication device. */
235
236 #define NERR_InvalidComputer (NERR_BASE+251) /* This computername is invalid. */
237 #define NERR_MaxLenExceeded (NERR_BASE+254) /* The string and prefix specified are too long. */
238 #define NERR_BadComponent (NERR_BASE+256) /* This path component is invalid. */
239 #define NERR_CantType (NERR_BASE+257) /* Cannot determine type of input. */
240 #define NERR_TooManyEntries (NERR_BASE+262) /* The buffer for types is not big enough. */
241
242 #define NERR_LogOverflow (NERR_BASE+277) /* This log file exceeds the maximum defined size. */
243 #define NERR_LogFileChanged (NERR_BASE+278) /* This log file has changed between reads. */
244 #define NERR_LogFileCorrupt (NERR_BASE+279) /* This log file is corrupt. */
245
246 #define NERR_SourceIsDir (NERR_BASE+280) /* The source path cannot be a directory. */
247 #define NERR_BadSource (NERR_BASE+281) /* The source path is illegal. */
248 #define NERR_BadDest (NERR_BASE+282) /* The destination path is illegal. */
249 #define NERR_DifferentServers (NERR_BASE+283) /* The source and destination paths are on different servers. */
250 #define NERR_RunSrvPaused (NERR_BASE+285) /* The Run server you requested is paused. */
251 #define NERR_ErrCommRunSrv (NERR_BASE+289) /* An error occurred when communicating with a Run server. */
252 #define NERR_ErrorExecingGhost (NERR_BASE+291) /* An error occurred when starting a background process. */
253 #define NERR_ShareNotFound (NERR_BASE+292) /* The shared resource you are connected to could not be found.*/
254
255 #define NERR_InvalidLana (NERR_BASE+300) /* The LAN adapter number is invalid. */
256 #define NERR_OpenFiles (NERR_BASE+301) /* There are open files on the connection. */
257 #define NERR_ActiveConns (NERR_BASE+302) /* Active connections still exist. */
258 #define NERR_BadPasswordCore (NERR_BASE+303) /* This netname or password is invalid. */
259 #define NERR_DevInUse (NERR_BASE+304) /* The device is being accessed by an active process. */
260 #define NERR_LocalDrive (NERR_BASE+305) /* The drive letter is in use locally. */
261 #define NERR_PausedConns (NERR_BASE+306) /* Paused devices cannot be deleted */
262 #define NERR_PipeBufTooSmall (NERR_BASE+307) /* Write to a network named pipe buffer that is too small */
263
264 #define NERR_AlertExists (NERR_BASE+330) /* The specified client is already registered for the specified event. */
265 #define NERR_TooManyAlerts (NERR_BASE+331) /* The alert table is full. */
266 #define NERR_NoSuchAlert (NERR_BASE+332) /* An invalid or nonexistent alertname was raised. */
267 #define NERR_BadRecipient (NERR_BASE+333) /* The alert recipient is invalid.*/
268 #define NERR_AcctLimitExceeded (NERR_BASE+334) /* A user's session with this server has been deleted
269 * because his logon hours are no longer valid */
270 #define NERR_InvalidLogSeek (NERR_BASE+340) /* The log file does not contain the requested record number. */
271
272 #define NERR_ParmsMoved (NERR_BASE+345) /* The parameters in the %1 section have been moved to the %2 section in the %3 file. */
273
274 #define NERR_BadUasConfig (NERR_BASE+350) /* The user account system database is not configured correctly. */
275 #define NERR_InvalidUASOp (NERR_BASE+351) /* This operation is not permitted when the Netlogon service is running. */
276 #define NERR_LastAdmin (NERR_BASE+352) /* This operation is not allowed on the last admin account. */
277 #define NERR_DCNotFound (NERR_BASE+353) /* Unable to find domain controller for this domain. */
278 #define NERR_LogonTrackingError (NERR_BASE+354) /* Unable to set logon information for this user. */
279 #define NERR_NetlogonNotStarted (NERR_BASE+355) /* The Netlogon service has not been started. */
280 #define NERR_CanNotGrowUASFile (NERR_BASE+356) /* Unable to grow the user account system database. */
281 #define NERR_PasswordMismatch (NERR_BASE+358) /* A password mismatch has been detected. */
282
283 #define NERR_MaxBadPasswordExceeded (NERR_BASE+359) /* The number of bad password has exceeded the max allowed */
284
285 #define NERR_NoSuchServer (NERR_BASE+360) /* The server ID does not specify a valid server. */
286 #define NERR_NoSuchSession (NERR_BASE+361) /* The session ID does not specify a valid session. */
287 #define NERR_NoSuchConnection (NERR_BASE+362) /* The connection ID does not specify a valid connection. */
288 #define NERR_TooManyServers (NERR_BASE+363) /* There is no space for another entry in the table of available servers. */
289 #define NERR_TooManySessions (NERR_BASE+364) /* The server has reached the maximum number of sessions it supports. */
290 #define NERR_TooManyConnections (NERR_BASE+365) /* The server has reached the maximum number of connections it supports. */
291 #define NERR_TooManyFiles (NERR_BASE+366) /* The server cannot open more files because it has reached its maximum number. */
292 #define NERR_NoAlternateServers (NERR_BASE+367) /* There are no alternate servers registered on this server. */
293 #define NERR_TooManySrvNames (NERR_BASE+368) /* The maximum number of server names has been reached. */
294 #define NERR_DelPrimaryName (NERR_BASE+369) /* The deletion of the server's primary name is not allowed. */
295
296 #define NERR_BadDosRetCode (NERR_BASE+400) /* The program below returned an MS-DOS error code:*/
297 #define NERR_ProgNeedsExtraMem (NERR_BASE+401) /* The program below needs more memory:*/
298 #define NERR_BadDosFunction (NERR_BASE+402) /* The program below called an unsupported MS-DOS function:*/
299 #define NERR_RemoteBootFailed (NERR_BASE+403) /* The workstation failed to boot.*/
300 #define NERR_BadFileCheckSum (NERR_BASE+404) /* The file below is corrupt.*/
301 #define NERR_NoRplBootSystem (NERR_BASE+405) /* No loader is specified in the boot-block definition file.*/
302 #define NERR_RplLoadrNetBiosErr (NERR_BASE+406) /* NetBIOS returned an error: The NCB and SMB are dumped above.*/
303 #define NERR_RplLoadrDiskErr (NERR_BASE+407) /* A disk I/O error occurred.*/
304 #define NERR_ImageParamErr (NERR_BASE+408) /* Image parameter substitution failed.*/
305 #define NERR_TooManyImageParams (NERR_BASE+409) /* Too many image parameters cross disk sector boundaries.*/
306 #define NERR_NonDosFloppyUsed (NERR_BASE+410) /* The image was not generated from an MS-DOS diskette formatted with /S.*/
307 #define NERR_RplBootRestart (NERR_BASE+411) /* Remote boot will be restarted later.*/
308 #define NERR_RplSrvrCallFailed (NERR_BASE+412) /* The call to the Remoteboot server failed.*/
309 #define NERR_CantConnectRplSrvr (NERR_BASE+413) /* Cannot connect to the Remoteboot server.*/
310 #define NERR_CantOpenImageFile (NERR_BASE+414) /* Cannot open image file on the Remoteboot server.*/
311 #define NERR_CallingRplSrvr (NERR_BASE+415) /* Connecting to the Remoteboot server...*/
312 #define NERR_StartingRplBoot (NERR_BASE+416) /* Connecting to the Remoteboot server...*/
313 #define NERR_RplBootServiceTerm (NERR_BASE+417) /* Remote boot service was stopped; check the error log for the cause of the problem.*/
314 #define NERR_RplBootStartFailed (NERR_BASE+418) /* Remote boot startup failed; check the error log for the cause of the problem.*/
315 #define NERR_RPL_CONNECTED (NERR_BASE+419) /* A second connection to a Remoteboot resource is not allowed.*/
316 #define NERR_RplBootErrDetected (NERR_BASE+420) /* The REMOTEBOOT service detected a configuration error but is continuing. Check the error log at the remote IPL server for details. */
317 #define NERR_RPL_COPYRIGHT1 (NERR_BASE+421) /* Remote IPL Initialization Program Version 2.0. */
318 #define NERR_RPL_COPYRIGHT2 (NERR_BASE+422) /* (C) Copyright International Business Machines Corporation 1989, 1991. */
319 #define NERR_RPL_COPYRIGHT3 (NERR_BASE+423) /* (C) Copyright Microsoft Corporation 1989, 1991. */
320
321 #define NERR_FTNotInstalled (NERR_BASE+425) /* DISKFT.SYS is not installed. */
322 #define NERR_FTMONITNotRunning (NERR_BASE+426) /* FTMONIT is not running */
323 #define NERR_FTDiskNotLocked (NERR_BASE+427) /* FTADMIN has not locked the disk. */
324 #define NERR_FTDiskNotAvailable (NERR_BASE+428) /* Some other process has locked the disk. */
325 #define NERR_FTUnableToStart (NERR_BASE+429) /* The verifier/correcter cannot be started. */
326 #define NERR_FTNotInProgress (NERR_BASE+430) /* The verifier/correcter can't be aborted because it isn't started. */
327 #define NERR_FTUnableToAbort (NERR_BASE+431) /* The verifier/correcter can't be aborted. */
328 #define NERR_FTUnabletoChange (NERR_BASE+432) /* The disk could not be locked/unlocked. */
329 #define NERR_FTInvalidErrHandle (NERR_BASE+433) /* The error handle was not recognized. */
330 #define NERR_FTDriveNotMirrored (NERR_BASE+434) /* The drive is not mirrored. */
331
332 #if !defined(NERR_AppParmNotFound)
333 #define NERR_AppParmNotFound (NERR_BASE+435)
334 #endif
335 #if !defined(NERR_AppParmExists)
336 #define NERR_AppParmExists (NERR_BASE+436)
337 #endif
338 #if !defined(NERR_UserCannotOverride)
339 #define NERR_UserCannotOverride (NERR_BASE+437)
340 #endif
341 #if !defined(NERR_EnvDataMustBeString)
342 #define NERR_EnvDataMustBeString (NERR_BASE+438)
343 #endif
344 #if !defined(NERR_IniFileError)
345 #define NERR_IniFileError (NERR_BASE+439)
346 #endif
347 #if !defined(NERR_IniFileOnlyOnPrimary)
348 #define NERR_IniFileOnlyOnPrimary (NERR_BASE+440)
349 #endif
350 #if !defined(NERR_IniMissingOrDamaged)
351 #define NERR_IniMissingOrDamaged (NERR_BASE+441)
352 #endif
353 #if !defined(NERR_IncorrectApptype)
354 #define NERR_IncorrectApptype (NERR_BASE+442)
355 #endif
356
357 #define NERR_NoAccessDrive (NERR_BASE+681)
358 #if !defined(NERR_AliasExists)
359 #define NERR_AliasExists (NERR_BASE+682)
360 #endif
361 #if !defined(NERR_AliasNotFound)
362 #define NERR_AliasNotFound (NERR_BASE+683)
363 #endif
364 #define NERR_InvAliasDev (NERR_BASE+685)
365 #if !defined(NERR_DCDBError)
366 #define NERR_DCDBError (NERR_BASE+686)
367 #endif
368 #if !defined(NERR_NetnameExists)
369 #define NERR_NetnameExists (NERR_BASE+687)
370 #endif
371 #if !defined(NERR_DupAliasRes)
372 #define NERR_DupAliasRes (NERR_BASE+688)
373 #endif
374
375 #if !defined(NERR_AppExists)
376 #define NERR_AppExists (NERR_BASE+692)
377 #endif
378 #if !defined(NERR_AppNotFound)
379 #define NERR_AppNotFound (NERR_BASE+693)
380 #endif
381 #if !defined(NERR_DCDBCreateError)
382 #define NERR_DCDBCreateError (NERR_BASE+694)
383 #endif
384 #if !defined(NERR_NotPrimaryDCDB)
385 #define NERR_NotPrimaryDCDB (NERR_BASE+695)
386 #endif
387 #define NERR_BadAppRemark (NERR_BASE+696)
388 #define NERR_CannotMigrate (NERR_BASE+697)
389
390 #define NERR_ApplyNotPermitted (NERR_BASE+700)
391 #define NERR_IncompleteApply (NERR_BASE+701)
392 #define NERR_ApplyFailed (NERR_BASE+702)
393
394 #endif
395
396 #ifndef SNLEN
397 #define CNLEN 15 /* Computer name length */
398 #define UNCLEN (CNLEN+2) /* UNC computer name length */
399 #define NNLEN 12 /* 8.3 Net name length */
400 #define RMLEN (UNCLEN+1+NNLEN) /* Maximum remote name length */
401
402 #define SNLEN 15 /* Service name length */
403 #define STXTLEN 63 /* Service text length */
404 #endif
405
406 #pragma pack(1)
407
408 /*
409 *@@ SERVER:
410 *
411 */
412
413 typedef struct _SERVER
414 {
415 UCHAR achServerName[CNLEN + 1];
416 // server name (without leading \\)
417 UCHAR cVersionMajor; // major version # of net
418 UCHAR cVersionMinor; // minor version # of net
419 ULONG ulServerType; // server type
420 PSZ pszComment; // server comment
421 } SERVER, *PSERVER;
422
423 /*
424 *@@ SERVICEBUF1:
425 *
426 */
427
428 typedef struct _SERVICEBUF1 // service_info_1
429 {
430 unsigned char svci1_name[SNLEN+1];
431 unsigned short svci1_status;
432 unsigned long svci1_code;
433 unsigned short svci1_pid;
434 } SERVICEBUF1, *PSERVICEBUF1;
435
436 /*
437 *@@ SERVICEBUF2:
438 *
439 */
440
441 typedef struct _SERVICEBUF2 // service_info_2
442 {
443 unsigned char svci2_name[SNLEN+1]; /* service name */
444 unsigned short svci2_status; /* See status values below */
445 unsigned long svci2_code; /* install code of service */
446 unsigned short svci2_pid; /* pid of service program */
447 unsigned char svci2_text[STXTLEN+1]; /* text area for use by services */
448 } SERVICEBUF2, *PSERVICEBUF2;
449
450 #pragma pack()
451
452 #ifndef SV_TYPE_ALL
453 #define SV_TYPE_ALL 0xFFFFFFFF /* handy for NetServerEnum2 */
454 #endif
455
456 #ifndef SERVICE_INSTALL_STATE
457 #define SERVICE_INSTALL_STATE 0x03
458 #define SERVICE_UNINSTALLED 0x00
459 // service stopped (not running)
460 #define SERVICE_INSTALL_PENDING 0x01
461 // service start pending
462 #define SERVICE_UNINSTALL_PENDING 0x02
463 // service stop pending
464 #define SERVICE_INSTALLED 0x03
465 // service started
466
467 #define SERVICE_PAUSE_STATE 0x0C
468 #define SERVICE_ACTIVE 0x00
469 // service active (not paused)
470 #define SERVICE_CONTINUE_PENDING 0x04
471 // service continue pending
472 #define SERVICE_PAUSE_PENDING 0x08
473 // service pause pending
474 #define SERVICE_PAUSED 0x0C
475 // service paused
476
477 #define SERVICE_NOT_UNINSTALLABLE 0x00
478 // service cannot be stopped
479 #define SERVICE_UNINSTALLABLE 0x10
480 // service can be stopped
481
482 #define SERVICE_NOT_PAUSABLE 0x00
483 // service cannot be paused
484 #define SERVICE_PAUSABLE 0x20
485 // service can be paused
486
487 /* Requester service only:
488 * Bits 8,9,10 -- redirection paused/active */
489
490 #define SERVICE_REDIR_PAUSED 0x700
491 #define SERVICE_REDIR_DISK_PAUSED 0x100
492 // redirector for disks paused
493 #define SERVICE_REDIR_PRINT_PAUSED 0x200
494 // redirector for spooled devices paused
495 #define SERVICE_REDIR_COMM_PAUSED 0x400
496 // redirector for serial devices paused
497
498 #define SERVICE_CTRL_INTERROGATE 0
499 #define SERVICE_CTRL_PAUSE 1
500 #define SERVICE_CTRL_CONTINUE 2
501 #define SERVICE_CTRL_UNINSTALL 3
502 #endif
503
504 APIRET lanInit(VOID);
505
506 APIRET lanQueryServers(PSERVER *paServers,
507 ULONG *pcServers);
508
509 APIRET lanServiceGetInfo(PCSZ pcszServiceName,
510 PSERVICEBUF2 pBuf);
511
512 APIRET lanServiceInstall(PCSZ pcszServiceName,
513 PSERVICEBUF2 pBuf2);
514
515 APIRET lanServiceControl(PCSZ pcszServiceName,
516 ULONG opcode,
517 PSERVICEBUF2 pBuf2);
518#endif
519
520#if __cplusplus
521}
522#endif
523
Note: See TracBrowser for help on using the repository browser.