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.

242 lines
6.8 KiB

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