Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

270 lines
7.8 KiB

  1. /*++ BUILD Version: 0003 // Increment this if a change has global effects
  2. Copyright (c) 1990-1993 Microsoft Corporation
  3. Module Name:
  4. LMCONS.H (was NETCONS.H in LM 2.x)
  5. Abstract:
  6. This file contains constants used throughout the LAN Manager
  7. API header files. It should be included in any source file
  8. that is going to include other LAN Manager API header files or
  9. call a LAN Manager API.
  10. NOTE: Lengths of strings are given as the maximum lengths of the
  11. string in characters (not bytes). This does not include space for the
  12. terminating 0-characters. When allocating space for such an item,
  13. use the form:
  14. TCHAR username[UNLEN+1];
  15. Definitions of the form LN20_* define those values in effect for
  16. LanMan 2.0.
  17. Author:
  18. unknown
  19. Revision History:
  20. 25-Jan-1991 Danl
  21. Added NET_API_STATUS and NET_API_FUNCTION
  22. 04-Feb-1991 JohnRo
  23. Avoid conflicts with <windef.h> (defines IN, OUT, but not OPTIONAL).
  24. 26-Feb-1991 JohnRo
  25. Added PARM_ERROR_UNKNOWN and PARM_ERROR_NONE.
  26. 09-May-1991 JohnRo
  27. Make PARM_ERROR_UNKNOWN a legal DWORD. Got rid of tabs, to keep ChuckL
  28. happy. Change NULL to ((void *)0) for portability. Make sure all
  29. includes and defines start in column 1, to avoid MIPS problems.
  30. Changed to use slash-slash comments.
  31. 20-May-1991 CliffV
  32. Removed several unused definitions. Changed limits to be windows
  33. and NT compatible. Added LM20_* definitions.
  34. 18-Jul-1991 RFirth
  35. Added PARMNUM_BASE_INFOLEVEL
  36. 30-Jul-1991 DanHi
  37. Changed definitions of *_FILENAME to NT values and deleted *_FILE
  38. 04-Apr-1992 JohnRo
  39. Added MAX_PREFERRED_LENGTH.
  40. --*/
  41. /*NOINC*/
  42. #ifndef NETCONS_INCLUDED
  43. #define NETCONS_INCLUDED
  44. /*INC*/
  45. #ifndef PASCAL
  46. #define PASCAL // pascal on OS/2
  47. #endif
  48. #ifndef FAR
  49. #define FAR // far on OS/2
  50. #endif
  51. //
  52. // String Lengths for various LanMan names
  53. //
  54. #define CNLEN 15 // Computer name length
  55. #define LM20_CNLEN 15 // LM 2.0 Computer name length
  56. #define DNLEN CNLEN // Maximum domain name length
  57. #define LM20_DNLEN LM20_CNLEN // LM 2.0 Maximum domain name length
  58. #if (CNLEN != DNLEN)
  59. #error CNLEN and DNLEN are not equal
  60. #endif
  61. #define UNCLEN (CNLEN+2) // UNC computer name length
  62. #define LM20_UNCLEN (LM20_CNLEN+2) // LM 2.0 UNC computer name length
  63. #define NNLEN 80 // Net name length (share name)
  64. #define LM20_NNLEN 12 // LM 2.0 Net name length
  65. #define RMLEN (UNCLEN+1+NNLEN) // Max remote name length
  66. #define LM20_RMLEN (LM20_UNCLEN+1+LM20_NNLEN) // LM 2.0 Max remote name length
  67. #define SNLEN 80 // Service name length
  68. #define LM20_SNLEN 15 // LM 2.0 Service name length
  69. #define STXTLEN 256 // Service text length
  70. #define LM20_STXTLEN 63 // LM 2.0 Service text length
  71. #define PATHLEN 256 // Max. path (not including drive name)
  72. #define LM20_PATHLEN 256 // LM 2.0 Max. path
  73. #define DEVLEN 80 // Device name length
  74. #define LM20_DEVLEN 8 // LM 2.0 Device name length
  75. #define EVLEN 16 // Event name length
  76. //
  77. // User, Group and Password lengths
  78. //
  79. #define UNLEN 256 // Maximum user name length
  80. #define LM20_UNLEN 20 // LM 2.0 Maximum user name length
  81. #define GNLEN UNLEN // Group name
  82. #define LM20_GNLEN LM20_UNLEN // LM 2.0 Group name
  83. #define PWLEN 256 // Maximum password length
  84. #define LM20_PWLEN 14 // LM 2.0 Maximum password length
  85. #define SHPWLEN 8 // Share password length (bytes)
  86. #define CLTYPE_LEN 12 // Length of client type string
  87. #define MAXCOMMENTSZ 256 // Multipurpose comment length
  88. #define LM20_MAXCOMMENTSZ 48 // LM 2.0 Multipurpose comment length
  89. #define QNLEN NNLEN // Queue name maximum length
  90. #define LM20_QNLEN LM20_NNLEN // LM 2.0 Queue name maximum length
  91. #if (QNLEN != NNLEN)
  92. # error QNLEN and NNLEN are not equal
  93. #endif
  94. //
  95. // The ALERTSZ and MAXDEVENTRIES defines have not yet been NT'ized.
  96. // Whoever ports these components should change these values appropriately.
  97. //
  98. #define ALERTSZ 128 // size of alert string in server
  99. #define MAXDEVENTRIES (sizeof (int)*8) // Max number of device entries
  100. //
  101. // We use int bitmap to represent
  102. //
  103. #define NETBIOS_NAME_LEN 16 // NetBIOS net name (bytes)
  104. //
  105. // Value to be used with APIs which have a "preferred maximum length"
  106. // parameter. This value indicates that the API should just allocate
  107. // "as much as it takes."
  108. //
  109. #define MAX_PREFERRED_LENGTH ((DWORD) -1)
  110. //
  111. // Constants used with encryption
  112. //
  113. #define CRYPT_KEY_LEN 7
  114. #define CRYPT_TXT_LEN 8
  115. #define ENCRYPTED_PWLEN 16
  116. #define SESSION_PWLEN 24
  117. #define SESSION_CRYPT_KLEN 21
  118. //
  119. // Value to be used with SetInfo calls to allow setting of all
  120. // settable parameters (parmnum zero option)
  121. //
  122. #ifndef PARMNUM_ALL
  123. #define PARMNUM_ALL 0
  124. #endif
  125. #define PARM_ERROR_UNKNOWN ( (DWORD) (-1) )
  126. #define PARM_ERROR_NONE 0
  127. #define PARMNUM_BASE_INFOLEVEL 1000
  128. //
  129. // Message File Names
  130. //
  131. #define MESSAGE_FILENAME TEXT("NETMSG")
  132. #define OS2MSG_FILENAME TEXT("BASE")
  133. #define HELP_MSG_FILENAME TEXT("NETH")
  134. /**INTERNAL_ONLY**/
  135. // The backup message file named here is a duplicate of net.msg. It
  136. // is not shipped with the product, but is used at buildtime to
  137. // msgbind certain messages to netapi.dll and some of the services.
  138. // This allows for OEMs to modify the message text in net.msg and
  139. // have those changes show up. Only in case there is an error in
  140. // retrieving the messages from net.msg do we then get the bound
  141. // messages out of bak.msg (really out of the message segment).
  142. #define BACKUP_MSG_FILENAME TEXT("BAK.MSG")
  143. /**END_INTERNAL**/
  144. #ifndef NULL
  145. #ifdef __cplusplus
  146. #define NULL 0
  147. #else
  148. #define NULL ((void *)0)
  149. #endif
  150. #endif
  151. //
  152. // Keywords used in Function Prototypes
  153. //
  154. #define NET_API_STATUS DWORD
  155. #define API_RET_TYPE NET_API_STATUS // Old value: do not use
  156. #if (_MSC_VER >= 800)
  157. #define NET_API_FUNCTION __stdcall
  158. #else
  159. #define NET_API_FUNCTION
  160. #endif
  161. // Define pseudo-keywords.
  162. #ifndef IN
  163. #define IN
  164. #endif
  165. #ifndef OPTIONAL
  166. #define OPTIONAL
  167. #endif
  168. #ifndef OUT
  169. #define OUT
  170. #endif
  171. /*INC*/
  172. //
  173. // The platform ID indicates the levels to use for platform-specific
  174. // information.
  175. //
  176. #define PLATFORM_ID_DOS 300
  177. #define PLATFORM_ID_OS2 400
  178. #define PLATFORM_ID_NT 500
  179. #define PLATFORM_ID_OSF 600
  180. #define PLATFORM_ID_VMS 700
  181. //
  182. // There message numbers assigned to different LANMAN components
  183. // are as defined below.
  184. //
  185. // lmerr.h: 2100 - 2999 NERR_BASE
  186. // alertmsg.h: 3000 - 3049 ALERT_BASE
  187. // lmsvc.h: 3050 - 3099 SERVICE_BASE
  188. // lmerrlog.h: 3100 - 3299 ERRLOG_BASE
  189. // msgtext.h: 3300 - 3499 MTXT_BASE
  190. // apperr.h: 3500 - 3999 APPERR_BASE
  191. // apperrfs.h: 4000 - 4299 APPERRFS_BASE
  192. // apperr2.h: 4300 - 5299 APPERR2_BASE
  193. // ncberr.h: 5300 - 5499 NRCERR_BASE
  194. // alertmsg.h: 5500 - 5599 ALERT2_BASE
  195. // lmsvc.h: 5600 - 5699 SERVICE2_BASE
  196. // lmerrlog.h 5700 - 5799 ERRLOG2_BASE
  197. //
  198. #define MIN_LANMAN_MESSAGE_ID NERR_BASE
  199. #define MAX_LANMAN_MESSAGE_ID 5799
  200. /*NOINC*/
  201. #endif // NETCONS_INCLUDED
  202. /*INC*/
  203.