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