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