Hex Artifact Content

Not logged in

Artifact 67900f73320ed9a956dbefe4f0f1143a7e849ea6:


0000: 2f 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a  /***************
0010: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a  ****************
0020: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a  ****************
0030: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a  ****************
0040: 2a 2a 2a 2a 2a 2a 2a 2a 5c 0a 2a 20 20 20 20 20  ********\.*     
0050: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0060: 20 20 20 20 20 20 20 20 20 20 20 6c 6d 63 6f 6e             lmcon
0070: 73 2e 64 20 20 20 20 20 20 20 20 20 20 20 20 20  s.d             
0080: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0090: 20 20 2a 0a 2a 20 20 20 20 20 20 20 20 20 20 20    *.*           
00a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
00b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
00c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
00d0: 20 20 20 20 20 20 20 20 20 20 20 20 2a 0a 2a 20              *.* 
00e0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
00f0: 20 20 20 20 20 20 57 69 6e 64 6f 77 73 20 41 50        Windows AP
0100: 49 20 68 65 61 64 65 72 20 6d 6f 64 75 6c 65 20  I header module 
0110: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0120: 20 20 20 20 20 20 2a 0a 2a 20 20 20 20 20 20 20        *.*       
0130: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0140: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0150: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0160: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0170: 2a 0a 2a 20 20 20 20 20 20 20 20 20 20 20 20 20  *.*             
0180: 20 20 20 20 54 72 61 6e 73 6c 61 74 65 64 20 66      Translated f
0190: 72 6f 6d 20 4d 69 6e 47 57 20 57 69 6e 64 6f 77  rom MinGW Window
01a0: 73 20 68 65 61 64 65 72 73 20 20 20 20 20 20 20  s headers       
01b0: 20 20 20 20 20 20 20 20 20 20 2a 0a 2a 20 20 20            *.*   
01c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
01d0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
01e0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
01f0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0200: 20 20 20 20 2a 0a 2a 20 20 20 20 20 20 20 20 20      *.*         
0210: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 50 6c                Pl
0220: 61 63 65 64 20 69 6e 74 6f 20 70 75 62 6c 69 63  aced into public
0230: 20 64 6f 6d 61 69 6e 20 20 20 20 20 20 20 20 20   domain         
0240: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2a 0a                *.
0250: 5c 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a  \***************
0260: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a  ****************
0270: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a  ****************
0280: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a  ****************
0290: 2a 2a 2a 2a 2a 2a 2a 2a 2f 0a 6d 6f 64 75 6c 65  ********/.module
02a0: 20 77 69 6e 33 32 2e 6c 6d 63 6f 6e 73 3b 0a 0a   win32.lmcons;..
02b0: 70 72 69 76 61 74 65 20 69 6d 70 6f 72 74 20 77  private import w
02c0: 69 6e 33 32 2e 77 69 6e 64 65 66 3b 0a 70 72 69  in32.windef;.pri
02d0: 76 61 74 65 20 69 6d 70 6f 72 74 20 77 69 6e 33  vate import win3
02e0: 32 2e 6c 6d 65 72 72 3b 20 2f 2f 20 66 6f 72 20  2.lmerr; // for 
02f0: 4e 45 52 52 5f 42 41 53 45 0a 0a 63 6f 6e 73 74  NERR_BASE..const
0300: 20 54 43 48 41 52 5b 5d 0a 09 4d 45 53 53 41 47   TCHAR[]..MESSAG
0310: 45 5f 46 49 4c 45 4e 41 4d 45 20 3d 20 22 4e 45  E_FILENAME = "NE
0320: 54 4d 53 47 22 2c 0a 09 4f 53 32 4d 53 47 5f 46  TMSG",..OS2MSG_F
0330: 49 4c 45 4e 41 4d 45 20 3d 20 22 42 41 53 45 22  ILENAME = "BASE"
0340: 2c 0a 09 48 45 4c 50 5f 4d 53 47 5f 46 49 4c 45  ,..HELP_MSG_FILE
0350: 4e 41 4d 45 20 3d 20 22 4e 45 54 48 22 3b 0a 0a  NAME = "NETH";..
0360: 61 6c 69 61 73 20 44 57 4f 52 44 20 4e 45 54 5f  alias DWORD NET_
0370: 41 50 49 5f 53 54 41 54 55 53 2c 20 41 50 49 5f  API_STATUS, API_
0380: 52 45 54 5f 54 59 50 45 3b 0a 0a 63 6f 6e 73 74  RET_TYPE;..const
0390: 20 4d 49 4e 5f 4c 41 4e 4d 41 4e 5f 4d 45 53 53   MIN_LANMAN_MESS
03a0: 41 47 45 5f 49 44 20 3d 20 4e 45 52 52 5f 42 41  AGE_ID = NERR_BA
03b0: 53 45 3b 0a 63 6f 6e 73 74 20 4d 41 58 5f 4c 41  SE;.const MAX_LA
03c0: 4e 4d 41 4e 5f 4d 45 53 53 41 47 45 5f 49 44 20  NMAN_MESSAGE_ID 
03d0: 3d 20 35 37 39 39 3b 0a 0a 63 6f 6e 73 74 20 43  = 5799;..const C
03e0: 4e 4c 45 4e 20 20 20 20 20 20 20 20 3d 20 31 35  NLEN        = 15
03f0: 3b 20 2f 2a 20 61 6c 73 6f 20 69 6e 20 6e 64 64  ; /* also in ndd
0400: 65 61 70 69 2e 68 20 2a 2f 0a 63 6f 6e 73 74 20  eapi.h */.const 
0410: 55 4e 43 4c 45 4e 20 20 20 20 20 20 20 3d 20 43  UNCLEN       = C
0420: 4e 4c 45 4e 20 2b 20 32 3b 0a 0a 63 6f 6e 73 74  NLEN + 2;..const
0430: 20 44 4e 4c 45 4e 20 20 20 20 20 20 20 20 3d 20   DNLEN        = 
0440: 31 35 3b 0a 63 6f 6e 73 74 20 4c 4d 32 30 5f 43  15;.const LM20_C
0450: 4e 4c 45 4e 20 20 20 3d 20 31 35 3b 0a 63 6f 6e  NLEN   = 15;.con
0460: 73 74 20 4c 4d 32 30 5f 44 4e 4c 45 4e 20 20 20  st LM20_DNLEN   
0470: 3d 20 31 35 3b 0a 63 6f 6e 73 74 20 4c 4d 32 30  = 15;.const LM20
0480: 5f 53 4e 4c 45 4e 20 20 20 3d 20 31 35 3b 0a 63  _SNLEN   = 15;.c
0490: 6f 6e 73 74 20 4c 4d 32 30 5f 53 54 58 54 4c 45  onst LM20_STXTLE
04a0: 4e 20 3d 20 36 33 3b 0a 63 6f 6e 73 74 20 4c 4d  N = 63;.const LM
04b0: 32 30 5f 55 4e 43 4c 45 4e 20 20 3d 20 4c 4d 32  20_UNCLEN  = LM2
04c0: 30 5f 43 4e 4c 45 4e 20 2b 20 32 3b 0a 63 6f 6e  0_CNLEN + 2;.con
04d0: 73 74 20 4c 4d 32 30 5f 4e 4e 4c 45 4e 20 20 20  st LM20_NNLEN   
04e0: 3d 20 31 32 3b 0a 63 6f 6e 73 74 20 4c 4d 32 30  = 12;.const LM20
04f0: 5f 52 4d 4c 45 4e 20 20 20 3d 20 4c 4d 32 30 5f  _RMLEN   = LM20_
0500: 55 4e 43 4c 45 4e 20 2b 20 31 20 2b 20 4c 4d 32  UNCLEN + 1 + LM2
0510: 30 5f 4e 4e 4c 45 4e 3b 0a 63 6f 6e 73 74 20 4e  0_NNLEN;.const N
0520: 4e 4c 45 4e 20 20 20 20 20 20 20 20 3d 20 38 30  NLEN        = 80
0530: 3b 0a 63 6f 6e 73 74 20 52 4d 4c 45 4e 20 20 20  ;.const RMLEN   
0540: 20 20 20 20 20 3d 20 55 4e 43 4c 45 4e 20 2b 20       = UNCLEN + 
0550: 31 20 2b 20 4e 4e 4c 45 4e 3b 0a 63 6f 6e 73 74  1 + NNLEN;.const
0560: 20 53 4e 4c 45 4e 20 20 20 20 20 20 20 20 3d 20   SNLEN        = 
0570: 38 30 3b 0a 63 6f 6e 73 74 20 53 54 58 54 4c 45  80;.const STXTLE
0580: 4e 20 20 20 20 20 20 3d 20 32 35 36 3b 0a 63 6f  N      = 256;.co
0590: 6e 73 74 20 50 41 54 48 4c 45 4e 20 20 20 20 20  nst PATHLEN     
05a0: 20 3d 20 32 35 36 3b 0a 63 6f 6e 73 74 20 4c 4d   = 256;.const LM
05b0: 32 30 5f 50 41 54 48 4c 45 4e 20 3d 20 32 35 36  20_PATHLEN = 256
05c0: 3b 0a 63 6f 6e 73 74 20 44 45 56 4c 45 4e 20 20  ;.const DEVLEN  
05d0: 20 20 20 20 20 3d 20 38 30 3b 0a 63 6f 6e 73 74       = 80;.const
05e0: 20 4c 4d 32 30 5f 44 45 56 4c 45 4e 20 20 3d 20   LM20_DEVLEN  = 
05f0: 38 3b 0a 63 6f 6e 73 74 20 45 56 4c 45 4e 20 20  8;.const EVLEN  
0600: 20 20 20 20 20 20 3d 20 31 36 3b 0a 63 6f 6e 73        = 16;.cons
0610: 74 20 55 4e 4c 45 4e 20 20 20 20 20 20 20 20 3d  t UNLEN        =
0620: 20 32 35 36 3b 0a 63 6f 6e 73 74 20 4c 4d 32 30   256;.const LM20
0630: 5f 55 4e 4c 45 4e 20 20 20 3d 20 32 30 3b 0a 63  _UNLEN   = 20;.c
0640: 6f 6e 73 74 20 47 4e 4c 45 4e 20 20 20 20 20 20  onst GNLEN      
0650: 20 20 3d 20 55 4e 4c 45 4e 3b 0a 63 6f 6e 73 74    = UNLEN;.const
0660: 20 4c 4d 32 30 5f 47 4e 4c 45 4e 20 20 20 3d 20   LM20_GNLEN   = 
0670: 4c 4d 32 30 5f 55 4e 4c 45 4e 3b 0a 63 6f 6e 73  LM20_UNLEN;.cons
0680: 74 20 50 57 4c 45 4e 20 20 20 20 20 20 20 20 3d  t PWLEN        =
0690: 20 32 35 36 3b 0a 63 6f 6e 73 74 20 4c 4d 32 30   256;.const LM20
06a0: 5f 50 57 4c 45 4e 20 20 20 3d 20 31 34 3b 0a 63  _PWLEN   = 14;.c
06b0: 6f 6e 73 74 20 53 48 50 57 4c 45 4e 20 20 20 20  onst SHPWLEN    
06c0: 20 20 3d 20 38 3b 0a 63 6f 6e 73 74 20 43 4c 54    = 8;.const CLT
06d0: 59 50 45 5f 4c 45 4e 20 20 20 3d 20 31 32 3b 0a  YPE_LEN   = 12;.
06e0: 63 6f 6e 73 74 20 51 4e 4c 45 4e 20 20 20 20 20  const QNLEN     
06f0: 20 20 20 3d 20 4e 4e 4c 45 4e 3b 0a 63 6f 6e 73     = NNLEN;.cons
0700: 74 20 4c 4d 32 30 5f 51 4e 4c 45 4e 20 20 20 3d  t LM20_QNLEN   =
0710: 20 4c 4d 32 30 5f 4e 4e 4c 45 4e 3b 0a 0a 63 6f   LM20_NNLEN;..co
0720: 6e 73 74 20 4d 41 58 43 4f 4d 4d 45 4e 54 53 5a  nst MAXCOMMENTSZ
0730: 20 3d 20 32 35 36 3b 0a 63 6f 6e 73 74 20 4c 4d   = 256;.const LM
0740: 32 30 5f 4d 41 58 43 4f 4d 4d 45 4e 54 53 5a 20  20_MAXCOMMENTSZ 
0750: 3d 20 34 38 3b 0a 63 6f 6e 73 74 20 41 4c 45 52  = 48;.const ALER
0760: 54 53 5a 20 20 20 20 20 20 3d 20 31 32 38 3b 0a  TSZ      = 128;.
0770: 63 6f 6e 73 74 20 4d 41 58 44 45 56 45 4e 54 52  const MAXDEVENTR
0780: 49 45 53 20 3d 20 33 32 3b 2f 2f 20 28 73 69 7a  IES = 32;// (siz
0790: 65 6f 66 28 69 6e 74 29 2a 38 29 3b 0a 63 6f 6e  eof(int)*8);.con
07a0: 73 74 20 4e 45 54 42 49 4f 53 5f 4e 41 4d 45 5f  st NETBIOS_NAME_
07b0: 4c 45 4e 20 3d 20 31 36 3b 0a 63 6f 6e 73 74 20  LEN = 16;.const 
07c0: 44 57 4f 52 44 20 4d 41 58 5f 50 52 45 46 45 52  DWORD MAX_PREFER
07d0: 52 45 44 5f 4c 45 4e 47 54 48 20 3d 20 2d 31 3b  RED_LENGTH = -1;
07e0: 0a 63 6f 6e 73 74 20 43 52 59 50 54 5f 4b 45 59  .const CRYPT_KEY
07f0: 5f 4c 45 4e 20 3d 20 37 3b 0a 63 6f 6e 73 74 20  _LEN = 7;.const 
0800: 43 52 59 50 54 5f 54 58 54 5f 4c 45 4e 20 3d 20  CRYPT_TXT_LEN = 
0810: 38 3b 0a 63 6f 6e 73 74 20 45 4e 43 52 59 50 54  8;.const ENCRYPT
0820: 45 44 5f 50 57 4c 45 4e 20 3d 20 31 36 3b 0a 63  ED_PWLEN = 16;.c
0830: 6f 6e 73 74 20 53 45 53 53 49 4f 4e 5f 50 57 4c  onst SESSION_PWL
0840: 45 4e 20 3d 20 32 34 3b 0a 63 6f 6e 73 74 20 53  EN = 24;.const S
0850: 45 53 53 49 4f 4e 5f 43 52 59 50 54 5f 4b 4c 45  ESSION_CRYPT_KLE
0860: 4e 20 3d 20 32 31 3b 0a 0a 63 6f 6e 73 74 20 50  N = 21;..const P
0870: 41 52 4d 4e 55 4d 5f 41 4c 4c 20 3d 20 30 3b 0a  ARMNUM_ALL = 0;.
0880: 63 6f 6e 73 74 20 44 57 4f 52 44 20 50 41 52 4d  const DWORD PARM
0890: 5f 45 52 52 4f 52 5f 55 4e 4b 4e 4f 57 4e 20 3d  _ERROR_UNKNOWN =
08a0: 20 2d 31 3b 0a 63 6f 6e 73 74 20 50 41 52 4d 5f   -1;.const PARM_
08b0: 45 52 52 4f 52 5f 4e 4f 4e 45 20 3d 20 30 3b 0a  ERROR_NONE = 0;.
08c0: 63 6f 6e 73 74 20 50 41 52 4d 4e 55 4d 5f 42 41  const PARMNUM_BA
08d0: 53 45 5f 49 4e 46 4f 4c 45 56 45 4c 20 3d 20 31  SE_INFOLEVEL = 1
08e0: 30 30 30 3b 0a 0a 63 6f 6e 73 74 20 50 4c 41 54  000;..const PLAT
08f0: 46 4f 52 4d 5f 49 44 5f 44 4f 53 20 3d 20 33 30  FORM_ID_DOS = 30
0900: 30 3b 0a 63 6f 6e 73 74 20 50 4c 41 54 46 4f 52  0;.const PLATFOR
0910: 4d 5f 49 44 5f 4f 53 32 20 3d 20 34 30 30 3b 0a  M_ID_OS2 = 400;.
0920: 63 6f 6e 73 74 20 50 4c 41 54 46 4f 52 4d 5f 49  const PLATFORM_I
0930: 44 5f 4e 54 20 20 3d 20 35 30 30 3b 0a 63 6f 6e  D_NT  = 500;.con
0940: 73 74 20 50 4c 41 54 46 4f 52 4d 5f 49 44 5f 4f  st PLATFORM_ID_O
0950: 53 46 20 3d 20 36 30 30 3b 0a 63 6f 6e 73 74 20  SF = 600;.const 
0960: 50 4c 41 54 46 4f 52 4d 5f 49 44 5f 56 4d 53 20  PLATFORM_ID_VMS 
0970: 3d 20 37 30 30 3b 0a 0a 2f 2f 20 74 68 69 73 20  = 700;..// this 
0980: 69 73 20 61 20 6e 65 77 20 74 79 70 65 64 65 66  is a new typedef
0990: 20 69 6e 20 57 32 4b 2c 20 62 75 74 20 69 74 20   in W2K, but it 
09a0: 73 68 6f 75 6c 64 20 62 65 20 68 61 72 6d 6c 65  should be harmle
09b0: 73 73 20 66 6f 72 20 65 61 72 6c 69 65 72 20 57  ss for earlier W
09c0: 69 6e 64 6f 77 73 20 76 65 72 73 69 6f 6e 73 2e  indows versions.
09d0: 0a 76 65 72 73 69 6f 6e 20 28 55 6e 69 63 6f 64  .version (Unicod
09e0: 65 29 20 7b 0a 09 61 6c 69 61 73 20 4c 50 57 53  e) {..alias LPWS
09f0: 54 52 20 4c 4d 53 54 52 3b 0a 09 61 6c 69 61 73  TR LMSTR;..alias
0a00: 20 4c 50 43 57 53 54 52 20 4c 4d 43 53 54 52 3b   LPCWSTR LMCSTR;
0a10: 0a 7d 20 65 6c 73 65 20 7b 0a 09 61 6c 69 61 73  .} else {..alias
0a20: 20 4c 50 53 54 52 20 4c 4d 53 54 52 3b 0a 09 61   LPSTR LMSTR;..a
0a30: 6c 69 61 73 20 4c 50 43 53 54 52 20 4c 4d 43 53  lias LPCSTR LMCS
0a40: 54 52 3b 0a 7d 0a                                TR;.}.