home *** CD-ROM | disk | FTP | other *** search
/ CICA 1995 May / cica_0595_4.zip / cica_0595_4 / UTIL / DMNPASS2 / PASS_SRC.ZIP / PASSWORD.GBL < prev   
Text File  |  1994-06-22  |  46KB  |  1,169 lines

  1.  
  2. 'PASSWORD.GBL
  3. '============
  4. Global CurrentDomain$   ' indicates the currently selected domain
  5. Global LogonDomain$     ' indicates the initial logon domain
  6. Global CurrentServer$   ' indicates the server for CurrentDomain
  7. Global CurrentUser$     ' indicates the currently selected user
  8. Global WfWUser$         ' The currently logged on user
  9. Global winSysDir$       ' Windows System directory
  10. Global winDir$          ' Windows Directory
  11.  
  12. ' General Windows API declarations
  13.  
  14. Declare Function GetWindowsDirectory Lib "Kernel" (ByVal lpBuffer As String, ByVal nSize As Integer) As Integer
  15. Declare Function GetSystemDirectory Lib "Kernel" (ByVal lpBuffer As String, ByVal nSize As Integer) As Integer
  16. 'Declare Function BitBlt Lib "Gdi" (ByVal destHdc, ByVal X, ByVal Y, ByVal w, ByVal h, ByVal srcHdc, ByVal srcX, ByVal srcY, ByVal Rop As Long)
  17. 'Declare Function GetVersion Lib "Kernel" () As Long
  18.  
  19. ' Declaration used to access ini file
  20.  
  21. Declare Function GetPrivateProfileString Lib "Kernel" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Integer, ByVal lpfilename As String) As Integer
  22.  
  23. ' Windows for Workgroups Declarations
  24.  
  25. Declare Function WNetGetUser Lib "wfwnet.drv" (ByVal szUser As String, nBufferSize As Integer) As Integer
  26. Declare Function MNetNetworkEnum Lib "wfwnet.drv" (lphNetwork As Integer) As Integer
  27. Declare Function MNetSetNextTarget Lib "wfwnet.drv" (ByVal hNetwork As Integer) As Integer
  28.  
  29.  
  30. ' Windows API declarations
  31.  
  32. Declare Function WinHelp% Lib "User" (ByVal hWnd%, ByVal HELPFILE$, ByVal wCommand%, ByVal dwData&)
  33. Declare Function GetWindow% Lib "USER" (ByVal hWnd%, ByVal wCmd%)
  34. Declare Function GetNextWindow% Lib "USER" (ByVal hWnd%, ByVal wCmd%)
  35. Declare Function SendMessage& Lib "USER" (ByVal hWnd%, ByVal wMsg%, ByVal wParam%, lParam%)
  36. Declare Function GetSystemMenu% Lib "USER" (ByVal hWnd%, ByVal bRevert%)
  37. Declare Function RemoveMenu% Lib "USER" (ByVal hMenu%, ByVal nPosition%, ByVal wFlags%)
  38.  
  39. ' Windows constants
  40.  
  41. Global Const GW_CHILD = 5
  42. Global Const GW_HWNDNEXT = 2
  43. Global Const GWL_STYLE = -16
  44. Global Const LBS_USETABSTOPS = &H80
  45. Global Const LB_SETTABSTOPS = &H400 + 19
  46. Global Const EM_LIMITTEXT = &H400 + 21
  47.  
  48. ' The MF_BYCOMMAND and MF_BYPOSITION constants are used as
  49. ' flags in the Windows API function RemoveMenu.
  50.  
  51. Global Const MF_BYCOMMAND = &H0
  52. Global Const MF_BYPOSITION = &H400
  53.  
  54. ' Windows Help definitions
  55.  
  56. Global StartUpDir$                  ' to use when calling help file
  57. Global Const HELPFILE$ = "usermgr.hlp"
  58. Global Const HELP_CONTEXT = 1       ' Display topic in ulTopic
  59. Global Const HELP_QUIT = 2          ' Terminate help
  60. Global Const HELP_INDEX = 3         ' Display index
  61. Global Const HELP_HELPONHELP = 4    ' Display help on using help
  62. Global Const HELP_SETINDEX = 5      ' Set the current Index for multi index help
  63. Global Const HELP_KEY = &H101       ' Display topic for keyword in offabData
  64. Global Const HELP_MULTIKEY = &H201
  65. Global Const HELP_USER = 1000&          ' Help context ID for User form
  66. Global Const HELP_GROUPMEMBERS = 1001&  ' Help context ID for GroupMembers form
  67. Global Const HELP_GROUPS = 1002&        ' Help context ID for Groups form
  68.  
  69. ' Numeric Constants
  70.  
  71. Global Const MAX_SIGNED_LONG = &H7FFFFFFF
  72.  
  73. '*****************************************************************
  74. '**           Microsoft Visual Basic LAN Manager Toolkit        **
  75. '**            Copyright(c) Microsoft Corp., 1991               **
  76. '*****************************************************************
  77.  
  78. '********************************************************************
  79. '*                                                                  *
  80. '*  About this file ...  NETCONS.TXT                                *
  81. '*                                                                  *
  82. '*  This file contains constants used throughout the LAN Manager    *
  83. '*  API header files.  It should be included in the global module   *
  84. '*  of any Visual Basic program that is going to call a LAN Manager *
  85. '*  API.                                                            *
  86. '*                                                                  *
  87. '********************************************************************
  88.  
  89.  
  90. Global Const ASSUMEBLEN = 255             '* this constant is used for the
  91.                       '  record structure field with
  92.                       '  unknown size (mostly list of
  93.                       '  multiple information     *
  94.  
  95. Global Const ASSUMESLEN = 50             '* this constant is used for the
  96.                      '  record structure field with
  97.                      '  unknown size (mostly single infor-
  98.                      '  mation    *
  99. Global Const CNLEN = 15             '* Computer name length     *
  100. Global Const CNLEN8 = (CNLEN + 1) * 8 - 1 '* Maximum 8 computer names *
  101.                       '  length separated by comma *
  102.  
  103. Global Const UNCLEN = CNLEN + 2           '* UNC computer name length *
  104. Global Const NNLEN = 12             '* 8.3 Net name length      *
  105. Global Const RMLEN = UNCLEN + 1 + NNLEN '* Maximum remote name length *
  106.  
  107.  
  108. Global Const SNLEN = 15             '* Service name length      *
  109. Global Const STXTLEN = 63           '* Service text length      *
  110.  
  111. Global Const PATHLEN = 260
  112. Global Const VBLMPATHLEN = PATHLEN - 1 '* VB pathlen without terminating NULL
  113.     
  114.  
  115. Global Const PRINTERNAME_SIZE = 32  '* printer name
  116. Global Const PRINTERNAME_SIZE10 = (PRINTERNAME_SIZE + 1) * 10 - 1
  117.                     '* 10 printer names separated by commas
  118. Global Const DRIV_NAME_SIZE = 8  '* device driver name
  119. Global Const DRIV_NAME_SIZE10 = (DRIV_NAME_SIZE + 1) * 10 - 1
  120.                         '* 10 device driver name w/ commas
  121. Global Const DRIV_DEVICENAME_SIZE = 31 '* Device driver data string
  122.  
  123. Global Const DEVLEN = 8             '* Device name length       *
  124.  
  125. Global Const DNLEN = CNLEN          '* Maximum domain name length *
  126. Global Const DNLEN10 = (DNLEN + 1) * 10 - 1 '* Maximum 10 domain names  *
  127.                         '* length separated by space *
  128. Global Const CCHMAXPATHCOMP = 256  '* queue name
  129.  
  130. Global Const EVLEN = 16             '* event name length        *
  131. Global Const JOBSTLEN = 80          '* status length in print job *
  132. Global Const AFLEN = 64             '* Maximum length of alert  *
  133.                             '* names field              *
  134. Global Const UNLEN = 20             '* Maximum user name length *
  135. Global Const GNLEN = UNLEN          '* Group name               *
  136. Global Const PWLEN = 14             '* Maximum password length  *
  137. Global Const SHPWLEN = 8            '* Share password length    *
  138. Global Const CLTYPE_LEN = 12        '* Length of client type string *
  139.  
  140.  
  141. Global Const MAXCOMMENTSZ = 48      '* server & share comment length *
  142.  
  143. Global Const QNLEN = 12             '* Queue name maximum length     *
  144. Global Const PDLEN = 8              '* Print destination length      *
  145. Global Const PDLEN10 = (PDLEN + 1) * 10 - 1  '* max of 10 Print destination
  146.                          ' length  separated by space   *
  147. Global Const DTLEN = 9              '* Spool file data type          *
  148.                             '* e.g. IBMQSTD,IBMQESC,IBMQRAW  *
  149. Global Const ALERTSZ = 128          '* size of alert string in server *
  150.  
  151. Global Const INTSIZE = 2
  152. Global Const LONGSIZE = 4
  153. Global Const SINGLESIZE = 4
  154. Global Const DOUBLESIZE = 8
  155.  
  156. Global Const MAXDEVENTRIES = INTSIZE * 8 '* Max number of device entries   *
  157.                                  '* We use int bitmap to represent *
  158.  
  159. Global Const HOURS_IN_WEEK = 168         '* for struct user_info_2 in UAS *
  160. Global Const MAXWORKSTATIONS = 8            '* for struct user_info_2 in UAS *
  161.  
  162. Global Const NETBIOS_NAME_LEN = 16          '* NetBIOS net name *
  163.  
  164.  
  165.  
  166. '*
  167. '*      Constants used with encryption
  168. '*
  169.  
  170. Global Const CRYPT_KEY_LEN = 7
  171. Global Const CRYPT_TXT_LEN = 8
  172. Global Const ENCRYPTED_PWLEN = 16
  173. Global Const SESSION_PWLEN = 24
  174. Global Const SESSION_CRYPT_KLEN = 21
  175.  
  176. '*
  177. '*  Value to be used with SetInfo calls to allow setting of all
  178. '*  settable parameters (parmnum zero option)
  179. '*
  180.  
  181. '*
  182. '*      Message File Names
  183. '*
  184.  
  185. Global Const MESSAGE_FILE = "NETPROG\\NET.MSG"
  186. Global Const MESSAGE_FILENAME = "NET.MSG"
  187. Global Const OS2MSG_FILE = "NETPROG\\OSO001.MSG"
  188. Global Const OS2MSG_FILENAME = "OSO001.MSG"
  189. Global Const HELP_MSG_FILE = "NETPROG\\NETH.MSG"
  190. Global Const HELP_MSG_FILENAME = "NETH.MSG"
  191. Global Const NMP_MSG_FILE = "NETPROG\\NMP.MSG"
  192. Global Const NMP_MSG_FILENAME = "NMP.MSG"
  193.  
  194. Global Const MESSAGE_FILE_BASE = "NETPROG\\NET00000"
  195. Global Const MESSAGE_FILE_EXT = ".MSG"
  196.  
  197.  
  198.  
  199. Global Const NMP_LOW_END = 230
  200. Global Const NMP_HIGH_END = 240
  201.  
  202.  
  203. Global Const PUNAVAIL = 0&
  204.  
  205.  
  206. '********************************************************************
  207. '**                     Microsoft LAN Manager                      **
  208. '**               Copyright(c) Microsoft Corp., 1991               **
  209. '********************************************************************
  210.  
  211. '********************************************************************
  212. '*                                                                  *
  213. '*  About this file ...  NETERR.TXT                                 *
  214. '*                                                                  *
  215. '*  This file contains information about the Network error          *
  216. '*  definitions.                                                    *
  217. '*                                                                  *
  218. '********************************************************************
  219.  
  220.  
  221. Global Const NERR_Success = 0           '* Success *
  222. Global Const ERROR_OPEN_FAILED = 110    '* Open/create failed due to explicit fail command *
  223. Global Const ERROR_MORE_DATA = 234      '* Additional data is available. *
  224.  
  225. '***    NERR_BASE is the base of error codes from network utilities,
  226. '*      chosen to avoid conflict with OS/2 and redirector error codes.
  227. '*      2100 is a value that has been assigned to us by OS/2.
  228. '*
  229. Global Const NERR_BASE = 2100
  230.  
  231. Global Const NERR_UserNotFound = (NERR_BASE + 121)      '* The user name was not found. *
  232. Global Const NERR_ResourceNotFound = (NERR_BASE + 122)  '* The resource name cannot be found.  *
  233. Global Const NERR_ResourceExists = (NERR_BASE + 125)    '* The resource exists.  *
  234. Global Const NERR_ACFTooManyLists = (NERR_BASE + 130)   '* The limit of 64 entries per resource was exceeded. *
  235.  
  236.  
  237. '*****************************************************************
  238. '**           Microsoft Visual Basic LAN Manager Toolkit        **
  239. '**            Copyright(c) Microsoft Corp., 1991               **
  240. '*****************************************************************
  241.  
  242. '********************************************************************
  243. '*                                                                  *
  244. '*  About this file ...  USER.TXT                                   *
  245. '*                                                                  *
  246. '*  This file contains information about the NetUser APIs.          *
  247. '*                                                                  *
  248. '*      Function prototypes.                                        *
  249. '*                                                                  *
  250. '*      Data structure templates.                                   *
  251. '*                                                                  *
  252. '*      Definition of special values.                               *
  253. '*                                                                  *
  254. '*                                                                  *
  255. '*  NOTE:  You must include NETCONS.TXT before this file, since this*
  256. '*         file depends on values defined in NETCONS.TXT.           *
  257. '*                                                                  *
  258. '********************************************************************
  259.  
  260. '****************************************************************
  261. '*                                                              *
  262. '*              Function prototypes - USER                      *
  263. '*                                                              *
  264. '****************************************************************
  265.  
  266. 'Declare Function NetUserAdd% Lib "NETAPI.DLL" (ByVal pszServer$, ByVal sLevel%, ByVal pbBuffer&, ByVal cbBuffer%)
  267.  
  268. 'Declare Function NetUserDel% Lib "NETAPI.DLL" (ByVal pszServer$, ByVal pszUserName$)
  269.  
  270. Declare Function NetUserEnum% Lib "NETAPI.DLL" (ByVal pszServer$, ByVal sLevel%, ByVal pbBuffer&, ByVal cbBuffer%, pcEntriesRead%, pcTotalAvail%)
  271.  
  272. Declare Function NetUserGetInfo% Lib "NETAPI.DLL" (ByVal pszServer$, ByVal pszUserName$, ByVal sLevel%, ByVal pbBuffer&, ByVal cbBuffer%, pcbTotalAvail%)
  273.  
  274. Declare Function NetUserSetInfo% Lib "NETAPI.DLL" (ByVal pszServer$, ByVal pszUserName$, ByVal sLevel%, ByVal pbBuffer&, ByVal cbBuffer%, ByVal sParmNum%)
  275.  
  276. Declare Function NetUserPasswordSet% Lib "NETAPI.DLL" (ByVal pszServer$, ByVal pszUserName$, ByVal pszOldPassword$, ByVal pszNewPassword$)
  277.  
  278. 'Declare Function NetUserSetGroups% Lib "NETAPI.DLL" (ByVal pszServer$, ByVal pszUserName$, ByVal sLevel%, ByVal pbBuffer&, ByVal cbBuffer%, ByVal cEntries%)
  279.  
  280. Declare Function NetUserModalsGet% Lib "NETAPI.DLL" (ByVal pszServer$, ByVal sLevel%, ByVal pbBuffer&, ByVal cbBuffer%, pcbTotalAvail%)
  281.  
  282. 'Declare Function NetUserModalsSet% Lib "NETAPI.DLL" (ByVal pszServer$, ByVal sLevel%, ByVal pbBuffer&, ByVal cbBuffer%, ByVal sParmNum%)
  283.  
  284. ' NetUserValidate2 is not supported under MS-DOS.
  285.  
  286.  
  287.  
  288. '****************************************************************
  289. '*                                                              *
  290. '*              Data structure templates - USER                 *
  291. '*                                                              *
  292. '****************************************************************
  293.  
  294. Type user_info_0
  295.     usri0_name As String * UNLEN
  296. End Type        '* user_info_0 *
  297.  
  298. Global Const FMT_user_info_0 = "S20"
  299.  
  300. Type user_info_1
  301.     usri1_name As String * UNLEN
  302.     usri1_pad_1 As String * 1
  303.     usri1_password As String * ENCRYPTED_PWLEN     '* See note below *
  304.     usri1_password_age As Long
  305.     usri1_priv As Integer                          '* See values below *
  306.     usri1_home_dir As String
  307.     usri1_comment As String
  308.     usri1_flags As Integer                         '* See values below *
  309.     usri1_script_path As String
  310. End Type        '* user_info_1 *
  311.  
  312. Global Const FMT_user_info_1 = "S20B1B16LIP259P48IP259"
  313.  
  314. '*
  315. '*      NOTE:  The maximum length of a user password is PWLEN.  The
  316. '*      field usri1_password contains extra room for transporting
  317. '*      the encrypted form of the password over the network.  When
  318. '*      setting the user's password, check length vs. PWLEN, not
  319. '*      the size of this field.  PWLEN is defined in NETCONS.H.
  320. '*
  321.  
  322.  
  323.  
  324. Type user_info_2
  325.     usri2_name As String * UNLEN
  326.     usri2_pad_1 As String * 1
  327.     usri2_password As String * ENCRYPTED_PWLEN
  328.     usri2_password_age As Long
  329.     usri2_priv As Integer
  330.     usri2_home_dir As String
  331.     usri2_comment As String
  332.     usri2_flags As Integer
  333.     usri2_script_path As String
  334.     usri2_auth_flags As Long
  335.     usri2_full_name As String
  336.     usri2_usr_comment As String
  337.     usri2_parms As String
  338.  
  339.     'usri2_workstations may contain up to 8 workstation names and
  340.     'each name is separated by a comma.  Null string indicates that
  341.     'there is no restriction.
  342.  
  343.     usri2_workstations As String
  344.  
  345.     usri2_last_logon As Long
  346.     usri2_last_logoff As Long
  347.     usri2_acct_expires As Long
  348.     usri2_max_storage As Long
  349.     usri2_units_per_week As Integer
  350.  
  351.     'usri2_logon_hours has 21-byte (168 bits) bit string
  352.  
  353.     'This construct is not yet fully supported - it is treated
  354.     'as a NULL-terminated string with a maximum length of 21 bytes.
  355.     'Therefore, handling NULLs within the string causes it to be
  356.     'treated as an end-of-string.  Trailing characters may be
  357.     'uninitialized.
  358.  
  359.     usri2_logon_hours As String
  360.  
  361.     
  362.     usri2_bad_pw_count As Integer
  363.     usri2_num_logons As Integer
  364.     usri2_logon_server As String
  365.     usri2_country_code As Integer
  366.     usri2_code_page As Integer
  367. End Type        '* user_info_2 *
  368.  
  369. Global Const FMT_user_info_2 = "S20B1B16LIP259P48IP259LP48P48P48P127LLLLIP21IIP17II"
  370.  
  371.  
  372. Type user_info_10
  373.     usri10_name As String * UNLEN
  374.     usri10_pad_1 As String * 1
  375.     usri10_comment As String
  376.     usri10_usr_comment As String
  377.     usri10_full_name As String
  378. End Type        '* user_info_10 *
  379.  
  380. Global Const FMT_user_info_10 = "S20B1P48P48P48"
  381.  
  382. Type user_info_11
  383.     usri11_name As String * UNLEN
  384.     usri11_pad_1 As String * 1
  385.     usri11_comment As String
  386.     usri11_usr_comment As String
  387.     usri11_full_name As String
  388.     usri11_priv As Integer
  389.     usri11_auth_flags As Long
  390.     usri11_password_age As Long
  391.     usri11_home_dir As String
  392.     usri11_parms As String
  393.     usri11_last_logon As Long
  394.     usri11_last_logoff As Long
  395.     usri11_bad_pw_count As Integer
  396.     usri11_num_logons As Integer
  397.     usri11_logon_server As String
  398.     usri11_country_code As Integer
  399.  
  400.     'usri11_workstations may contain up to 8 workstation names and
  401.     'each name is separated by a comma.  Null string indicates that
  402.     'there is no restriction.
  403.  
  404.     usri11_workstations As String
  405.     usri11_max_storage As Long
  406.     usri11_units_per_week As Integer
  407.  
  408.     'usri11_logon_hours has 21-byte (168 bits) bit string
  409.  
  410.     'This construct is not yet fully supported - it is treated
  411.     'as a NULL-terminated string with a maximum length of 21 bytes.
  412.     'Therefore, handling NULLs within the string causes it to be
  413.     'treated as an end-of-string.  Trailing characters may be
  414.     'uninitialized.
  415.  
  416.     usri11_logon_hours As String
  417.     usri11_code_page As Integer
  418. End Type        '* user_info_11 *
  419.  
  420. Global Const FMT_user_info_11 = "S20B1P48P48P48ILLP259P48LLIIP17IP127LIP21I"
  421.  
  422.  
  423. '*
  424. '*      For User Modals
  425. '*
  426.  
  427. Type user_modals_info_0
  428.     usrmod0_min_passwd_len As Integer
  429.     usrmod0_max_passwd_age As Long
  430.     usrmod0_min_passwd_age As Long
  431.     usrmod0_force_logoff As Long
  432.     usrmod0_password_hist_len As Integer
  433.     usrmod0_reserved1 As Integer
  434. End Type        '* user_modals_info_0 *
  435.  
  436. Global Const FMT_user_modals_info_0 = "ILLLII"
  437.  
  438. Type user_modals_info_1
  439.     usrmod1_role As Integer
  440.     usrmod1_primary As String
  441. End Type        '* user_modals_info_1 *
  442.  
  443. Global Const FMT_user_modals_info_1 = "IP17"
  444.  
  445.  
  446. '*
  447. '*      For User Logon Validation
  448. '*
  449.  
  450. Type user_logon_req_1
  451.     usrreq1_name As String * UNLEN
  452.     usrreq1_pad_1 As String * 1
  453.     usrreq1_password As String * SESSION_PWLEN
  454.     usrreq1_workstation As String
  455. End Type        '* user_logon_req_1 *
  456.  
  457. Global Const FMT_user_logon_req_1 = "S20B1S24P15"
  458.     
  459.  
  460. Type user_logon_info_0
  461.     usrlog0_eff_name As String * UNLEN
  462.     usrlog0_pad_1 As String * 1
  463. End Type        '* user_logon_info_0 *
  464.  
  465. Global Const FMT_user_logon_info_0 = "S20B1"
  466.  
  467. Type user_logon_info_1
  468.     usrlog1_code As Integer
  469.     usrlog1_eff_name As String * UNLEN
  470.     usrlog1_pad_1 As String * 1
  471.     usrlog1_priv As Integer
  472.     usrlog1_auth_flags As Long
  473.     usrlog1_num_logons As Integer
  474.     usrlog1_bad_pw_count As Integer
  475.     usrlog1_last_logon As Long
  476.     usrlog1_last_logoff As Long
  477.     usrlog1_logoff_time As Long
  478.     usrlog1_kickoff_time As Long
  479.     usrlog1_password_age As Long
  480.     usrlog1_pw_can_change As Long
  481.     usrlog1_pw_must_change As Long
  482.     usrlog1_computer As String
  483.     usrlog1_domain As String
  484.     usrlog1_script_path As String
  485.     usrlog1_reserved1 As Long
  486. End Type        '* user_logon_info_1 *
  487.  
  488. Global Const FMT_user_logon_info_1 = "IS20B1ILIILLLLLLLP17P17P259L"
  489.  
  490. Type user_logon_info_2
  491.     usrlog2_eff_name As String * UNLEN
  492.     usrlog2_pad_1 As String * 1
  493.     usrlog2_computer As String
  494.     usrlog2_full_name As String
  495.     usrlog2_usrcomment As String
  496.     usrlog2_logon_time As Long
  497. End Type        '* user_logon_info_2 *
  498.  
  499. Global Const FMT_user_logon_info_2 = "S20B1P15P48P48L"
  500.  
  501.  
  502. Type user_logoff_req_1
  503.     usrlfreq1_name As String * UNLEN
  504.     usrlfreq1_pad_1 As String * 1
  505.     usrlfreq1_workstation As String * CNLEN
  506. End Type        '* user_logoff_req_1 *
  507.  
  508. Global Const FMT_user_logoff_req_1 = "S20B1S15"
  509.     
  510. Type user_logoff_info_1
  511.     usrlogf1_code As Integer
  512.     usrlogf1_duration As Long
  513.     usrlogf1_num_logons As Integer
  514. End Type        '* user_logoff_info_1 *
  515.  
  516. Global Const FMT_user_logoff_info_1 = "ILI"
  517.  
  518. '****************************************************************
  519. '*                                                              *
  520. '*              Special values and constants - USER             *
  521. '*                                                              *
  522. '****************************************************************
  523.  
  524.  
  525. '*
  526. '*      Bit masks for field usriX_flags of user_info_X (X = 0/1).
  527. '*
  528.  
  529. Global Const UF_SCRIPT = &H1
  530. Global Const UF_ACCOUNTDISABLE = &H2
  531. Global Const UF_DELETE_PROHIBITED = &H4
  532. Global Const UF_HOMEDIR_REQUIRED = &H8
  533. Global Const UF_PASSWD_NOTREQD = &H20
  534. Global Const UF_PASSWD_CANT_CHANGE = &H40
  535.  
  536. '*
  537. '*      Bit masks for field usri2_auth_flags of user_info_2.
  538. '*
  539.  
  540. Global Const AF_OP_PRINT = &H1
  541. Global Const AF_OP_COMM = &H2
  542. Global Const AF_OP_SERVER = &H4
  543. Global Const AF_OP_ACCOUNTS = &H8
  544.  
  545.  
  546. '*
  547. '*      UAS role manifests under NETLOGON
  548. '*
  549.  
  550. Global Const UAS_ROLE_STANDALONE = 0
  551. Global Const UAS_ROLE_MEMBER = 1
  552. Global Const UAS_ROLE_BACKUP = 2
  553. Global Const UAS_ROLE_PRIMARY = 3
  554.  
  555. '*
  556. '*      Values for parmnum for NetUserSetInfo.
  557. '*
  558.  
  559. '* LM1.0 style *
  560.  
  561. Global Const U1_ALL = 0
  562. Global Const U1_NAME = 1
  563. Global Const U1_PAD = 2
  564. Global Const U1_PASSWD = 3
  565. Global Const U1_PASSWDAGE = 4
  566. Global Const U1_PRIV = 5
  567. Global Const U1_DIR = 6
  568. Global Const U1_COMMENT = 7
  569. Global Const U1_USER_FLAGS = 8
  570. Global Const U1_SCRIPT_PATH = 9
  571.  
  572.  
  573. Global Const PARMNUM_ALL = 0
  574. Global Const PARMNUM_NAME = 1
  575. Global Const PARMNUM_PAD = 2
  576. Global Const PARMNUM_PASSWD = 3
  577. Global Const PARMNUM_PASSWDAGE = 4
  578. Global Const PARMNUM_PRIV = 5
  579. Global Const PARMNUM_DIR = 6
  580. Global Const PARMNUM_COMMENT = 7
  581. Global Const PARMNUM_USER_FLAGS = 8
  582. Global Const PARMNUM_SCRIPT_PATH = 9
  583. Global Const PARMNUM_AUTH_FLAGS = 10
  584. Global Const PARMNUM_FULL_NAME = 11
  585. Global Const PARMNUM_USR_COMMENT = 12
  586. Global Const PARMNUM_PARMS = 13
  587. Global Const PARMNUM_WORKSTATIONS = 14
  588. Global Const PARMNUM_LAST_LOGON = 15
  589. Global Const PARMNUM_LAST_LOGOFF = 16
  590. Global Const PARMNUM_ACCT_EXPIRES = 17
  591. Global Const PARMNUM_MAX_STORAGE = 18
  592. Global Const PARMNUM_UNITS_PER_WEEK = 19
  593. Global Const PARMNUM_LOGON_HOURS = 20
  594. Global Const PARMNUM_BADPW_COUNT = 21
  595. Global Const PARMNUM_NUM_LOGONS = 22
  596. Global Const PARMNUM_LOGON_SERVER = 23
  597. Global Const PARMNUM_COUNTRY_CODE = 24
  598. Global Const PARMNUM_CODE_PAGE = 25
  599.  
  600. '*
  601. '*      For SetInfo call (parmnum 0) when password change not required
  602. '*
  603.  
  604. Global Const NULL_USERSETINFO_PASSWD = "              "
  605.  
  606.  
  607. Global Const TIMEQ_FOREVER = -1&
  608. Global Const USER_MAXSTORAGE_UNLIMITED = -1&
  609. Global Const USER_NO_LOGOFF = -1&
  610. Global Const UNITS_PER_DAY = 24
  611. Global Const UNITS_PER_WEEK = UNITS_PER_DAY * 7
  612.  
  613.  
  614. '*
  615. '*      Privilege levels (user_info_X field usriX_priv (X = 0/1)).
  616. '*
  617.  
  618. Global Const USER_PRIV_MASK = &H3
  619. Global Const USER_PRIV_GUEST = 0
  620. Global Const USER_PRIV_USER = 1
  621. Global Const USER_PRIV_ADMIN = 2
  622.  
  623. '*
  624. '*      user modals related defaults
  625. '*
  626. Global Const MAX_PASSWD_LEN = PWLEN
  627. Global Const DEF_MIN_PWLEN = 6
  628. Global Const DEF_PWUNIQUENESS = 5
  629. Global Const DEF_MAX_PWHIST = 8
  630.  
  631. Global Const DEF_MAX_PWAGE = 90 * 24 * 3600&   '* 90 days *
  632.  
  633. Global Const DEF_MIN_PWAGE = 0&                    '* 0 days *
  634.  
  635. 'DEF_FORCE_LOGOFF was declared to be (unsigned long) &Hffffffff '* never *
  636. Global Const DEF_FORCE_LOGOFF = &HFFFFFFFF            '* never *
  637. Global Const DEF_MAX_BADPW = 0                        '* no limit*
  638. Global Const ONE_DAY = 1 * 24 * 3600&     '* 01 day  *
  639. '*
  640. '*      User Logon Validation (codes returned)
  641. '*
  642. Global Const VALIDATED_LOGON = 0
  643. Global Const PASSWORD_EXPIRED = 2
  644. Global Const NON_VALIDATED_LOGON = 3
  645.  
  646. Global Const VALID_LOGOFF = 1
  647.  
  648.  
  649. '*
  650. '*      parmnum manifests for user modals
  651. '*
  652.  
  653. Global Const MODAL0_PARMNUM_ALL = 0
  654. Global Const MODAL0_PARMNUM_MIN_LEN = 1
  655. Global Const MODAL0_PARMNUM_MAX_AGE = 2
  656. Global Const MODAL0_PARMNUM_MIN_AGE = 3
  657. Global Const MODAL0_PARMNUM_FORCEOFF = 4
  658. Global Const MODAL0_PARMNUM_HISTLEN = 5
  659. Global Const MODAL0_PARMNUM_RESERVED1 = 6
  660.  
  661. Global Const MODAL1_PARMNUM_ALL = 0
  662. Global Const MODAL1_PARMNUM_ROLE = 1
  663. Global Const MODAL1_PARMNUM_PRIMARY = 2
  664.  
  665.  
  666. '*****************************************************************
  667. '**           Microsoft Visual Basic LAN Manager Toolkit        **
  668. '**               Copyright(c) Microsoft Corp., 1991            **
  669. '*****************************************************************
  670.  
  671. '********************************************************************
  672. '*                                                                  *
  673. '*  About this file ...  VBLANMAN.TXT                               *
  674. '*                                                                  *
  675. '*  This file contains information about the VBLANMAN support DLL.  *
  676. '*                                                                  *
  677. '*      Function prototypes.                                        *
  678. '*                                                                  *
  679. '*      Definition of special values.                               *
  680. '*                                                                  *
  681. '********************************************************************
  682.  
  683. '****************************************************************
  684. '*                                                              *
  685. '*                  Function prototypes - VBLANMAN.DLL          *
  686. '*                                                              *
  687. '****************************************************************
  688.  
  689. Declare Function VBTypeToBuffer% Lib "vblanman.dll" (ByVal Dest&, ByVal DestLen%, Src As Any, ByVal SrcLen%, ByVal FormatString$)
  690.  
  691. Declare Function BufferToVBType% Lib "vblanman.dll" (Dest As Any, ByVal DestLen%, ByVal Src&, ByVal SrcLen%, ByVal FormatString$)
  692.  
  693. Declare Function EnumBufferToVBArray% Lib "vblanman.dll" (Dest As Any, ByVal DestLen%, ByVal Src&, ByVal SrcLen%, ByVal FormatString$, ByVal NumEnts%)
  694.  
  695. Declare Function CreateLMBuffer& Lib "vblanman.dll" (ByVal FormatString$, ByVal Entries%, BufferSize%)
  696.  
  697. Declare Function FreeLMBuffer% Lib "vblanman.dll" (ByVal BufferPointer&)
  698.  
  699. Declare Function CFormatSize% Lib "vblanman.dll" (ByVal FormatString$, ByVal Flag%)
  700.  
  701. Declare Function VBFormatSize% Lib "vblanman.dll" (ByVal FormatString$, ByVal Flag%)
  702.  
  703. Declare Function LMError$ Lib "vblanman.dll" Alias "LMError$" (ByVal ErrorCode%)
  704.  
  705.  
  706. '****************************************************************
  707. '*                                                              *
  708. '*              Special values and constants - VBLANMAN.DLL     *
  709. '*                                                              *
  710. '****************************************************************
  711.  
  712. '*
  713. '*      Flag definitions for CFormatSize and VBFormatSize
  714. '*
  715.  
  716. Global Const TOTAL_SIZE = 0     'Get total size (including var length strings)
  717. Global Const FIXED_LEN_SIZE = 1 'Get fixed length size (no var length strings)
  718.  
  719. '*
  720. '*      Format strings for basic data types
  721. '*
  722.  
  723. Global Const FMT_INTEGER = "I"
  724. Global Const FMT_LONG = "L"
  725. Global Const FMT_STRING = "S"
  726. Global Const FMT_POINTER = "P"
  727.  
  728.  
  729.  
  730.  
  731. '============================================================================'
  732. '                                                                            '
  733. ' Visual Basic global constant file.  This file can be loaded into the       '
  734. ' global module.                                                             '
  735. '                                                                            '
  736. ' Some constants are commented out because they have duplicates (for         '
  737. ' example, NONE appears in several places).                                  '
  738. '                                                                            '
  739. '============================================================================'
  740.  
  741. '========='
  742. '         '
  743. ' General '
  744. '         '
  745. '========='
  746.  
  747. '=================='
  748. '                  '
  749. ' Event parameters '
  750. '                  '
  751. '=================='
  752.  
  753. ' Button and Shift (KeyDown, KeyUp, MouseDown, MouseMove, MouseUp)
  754. Global Const SHIFT_MASK = 1
  755. Global Const CTRL_MASK = 2
  756. Global Const ALT_MASK = 4
  757. Global Const LEFT_BUTTON = 1
  758. Global Const RIGHT_BUTTON = 2
  759. Global Const MIDDLE_BUTTON = 4
  760.  
  761. ' ErrNum (LinkError)
  762. Global Const WRONG_FORMAT = 1
  763. Global Const REQUEST_WITHOUT_INIT = 2
  764. Global Const DDE_WITHOUT_INIT = 3
  765. Global Const ADVISE_WITHOUT_INIT = 4
  766. Global Const POKE_WITHOUT_INIT = 5
  767. Global Const DDE_SERVER_CLOSED = 6
  768. Global Const TOO_MANY_LINKS = 7
  769. Global Const STRING_TOO_LONG = 8
  770. Global Const INVALID_CONTROL_ARRAY_REFERENCE = 9
  771. Global Const UNEXPECTED_DDE = 10
  772. Global Const OUT_OF_MEMORY = 11
  773. Global Const SERVER_ATTEMPTED_CLIENT_OPERATION = 12
  774.  
  775. ' KeyCode (KeyDown, KeyUp)
  776. Global Const KEY_LBUTTON = &H1
  777. Global Const KEY_RBUTTON = &H2
  778. Global Const KEY_CANCEL = &H3
  779. Global Const KEY_MBUTTON = &H4         ' NOT contiguous with L & RBUTTON
  780. Global Const KEY_BACK = &H8
  781. Global Const KEY_TAB = &H9
  782. Global Const KEY_CLEAR = &HC
  783. Global Const KEY_RETURN = &HD
  784. Global Const KEY_SHIFT = &H10
  785. Global Const KEY_CONTROL = &H11
  786. Global Const KEY_MENU = &H12
  787. Global Const KEY_PAUSE = &H13
  788. Global Const KEY_CAPITAL = &H14
  789. Global Const KEY_ESCAPE = &H1B
  790. Global Const KEY_SPACE = &H20
  791. Global Const KEY_PRIOR = &H21
  792. Global Const KEY_NEXT = &H22
  793. Global Const KEY_END = &H23
  794. Global Const KEY_HOME = &H24
  795. Global Const KEY_LEFT = &H25
  796. Global Const KEY_UP = &H26
  797. Global Const KEY_RIGHT = &H27
  798. Global Const KEY_DOWN = &H28
  799. Global Const KEY_SELECT = &H29
  800. Global Const KEY_PRINT = &H2A
  801. Global Const KEY_EXECUTE = &H2B
  802. Global Const KEY_SNAPSHOT = &H2C
  803. Global Const KEY_INSERT = &H2D
  804. Global Const KEY_DELETE = &H2E
  805. Global Const KEY_HELP = &H2F
  806.  
  807. ' KEY_A thru KEY_Z are the same as their ASCII equivalents: 'A' thru 'Z'
  808. ' KEY_0 thru KEY_9 are the same as their ASCII equivalents: '0' thru '9'
  809.  
  810. Global Const KEY_NUMPAD0 = &H60
  811. Global Const KEY_NUMPAD1 = &H61
  812. Global Const KEY_NUMPAD2 = &H62
  813. Global Const KEY_NUMPAD3 = &H63
  814. Global Const KEY_NUMPAD4 = &H64
  815. Global Const KEY_NUMPAD5 = &H65
  816. Global Const KEY_NUMPAD6 = &H66
  817. Global Const KEY_NUMPAD7 = &H67
  818. Global Const KEY_NUMPAD8 = &H68
  819. Global Const KEY_NUMPAD9 = &H69
  820. Global Const KEY_MULTIPLY = &H6A
  821. Global Const KEY_ADD = &H6B
  822. Global Const KEY_SEPARATOR = &H6C
  823. Global Const KEY_SUBTRACT = &H6D
  824. Global Const KEY_DECIMAL = &H6E
  825. Global Const KEY_DIVIDE = &H6F
  826. Global Const KEY_F1 = &H70
  827. Global Const KEY_F2 = &H71
  828. Global Const KEY_F3 = &H72
  829. Global Const KEY_F4 = &H73
  830. Global Const KEY_F5 = &H74
  831. Global Const KEY_F6 = &H75
  832. Global Const KEY_F7 = &H76
  833. Global Const KEY_F8 = &H77
  834. Global Const KEY_F9 = &H78
  835. Global Const KEY_F10 = &H79
  836. Global Const KEY_F11 = &H7A
  837. Global Const KEY_F12 = &H7B
  838. Global Const KEY_F13 = &H7C
  839. Global Const KEY_F14 = &H7D
  840. Global Const KEY_F15 = &H7E
  841. Global Const KEY_F16 = &H7F
  842. Global Const KEY_NUMLOCK = &H90
  843.  
  844. ' State (DragOver)
  845. Global Const ENTER = 0
  846. Global Const LEAVE = 1
  847. Global Const OVER = 2
  848.  
  849. '====================='
  850. '                     '
  851. ' Function parameters '
  852. '                     '
  853. '====================='
  854.  
  855. ' MsgBox parameters
  856. Global Const MB_OK = 0                 ' OK button only
  857. Global Const MB_OKCANCEL = 1           ' OK and Cancel buttons
  858. Global Const MB_ABORTRETRYIGNORE = 2   ' Abort, Retry, and Ignore buttons
  859. Global Const MB_YESNOCANCEL = 3        ' Yes, No, and Cancel buttons
  860. Global Const MB_YESNO = 4              ' Yes and No buttons
  861. Global Const MB_RETRYCANCEL = 5        ' Retry and Cancel buttons
  862.  
  863. Global Const MB_ICONSTOP = 16          ' Critical message
  864. Global Const MB_ICONQUESTION = 32      ' Warning query
  865. Global Const MB_ICONEXCLAMATION = 48   ' Warning message
  866. Global Const MB_ICONINFORMATION = 64   ' Information message
  867.  
  868. Global Const MB_DEFBUTTON1 = 0         ' First button is default
  869. Global Const MB_DEFBUTTON2 = 256       ' Second button is default
  870. Global Const MB_DEFBUTTON3 = 512       ' Third button is default
  871.  
  872. ' MsgBox return values
  873. Global Const IDOK = 1                  ' OK button pressed
  874. Global Const IDCANCEL = 2              ' Cancel button pressed
  875. Global Const IDABORT = 3               ' Abort button pressed
  876. Global Const IDRETRY = 4               ' Retry button pressed
  877. Global Const IDIGNORE = 5              ' Ignore button pressed
  878. Global Const IDYES = 6                 ' Yes button pressed
  879. Global Const IDNO = 7                  ' No button pressed
  880.  
  881.  
  882. '==================='
  883. '                   '
  884. ' Method parameters '
  885. '                   '
  886. '==================='
  887.  
  888. ' Drag (controls)
  889. Global Const CANCEL = 0
  890. Global Const BEGIN_DRAG = 1
  891. Global Const END_DRAG = 2
  892.  
  893. ' GetData, GetFormat, SetData (Clipboard)
  894. Global Const CF_LINK = &HBF00
  895. Global Const CF_TEXT = 1
  896. Global Const CF_BITMAP = 2
  897. Global Const CF_METAFILE = 3
  898. Global Const CF_DIB = 8
  899.  
  900. ' Show (form)
  901. Global Const MODAL = 1
  902. Global Const MODELESS = 0
  903.  
  904. '================='
  905. '                 '
  906. ' Property values '
  907. '                 '
  908. '================='
  909.  
  910. ' Alignment (label)
  911. Global Const LEFT_JUSTIFY = 0          ' 0 - Left Justify
  912. Global Const RIGHT_JUSTIFY = 1         ' 1 - Right Justify
  913. Global Const CENTER = 2                ' 2 - Center
  914.  
  915. ' BackColor, ForeColor, FillColor (standard RGB colors: form, controls)
  916. Global Const BLACK = &H0&
  917. Global Const RED = &HFF&
  918. Global Const GREEN = &HFF00&
  919. Global Const YELLOW = &HFFFF&
  920. Global Const BLUE = &HFF0000
  921. Global Const MAGENTA = &HFF00FF
  922. Global Const CYAN = &HFFFF00
  923. Global Const WHITE = &HFFFFFF
  924.  
  925. ' BackColor, ForeColor, FillColor (system colors: form, controls)
  926. Global Const SCROLL_BARS = &H80000000           ' Scroll-bars gray area.
  927. Global Const DESKTOP = &H80000001               ' Desktop.
  928. Global Const ACTIVE_TITLE_BAR = &H80000002      ' Active window caption.
  929. Global Const INACTIVE_TITLE_BAR = &H80000003    ' Inactive window caption.
  930. Global Const MENU_BAR = &H80000004              ' Menu background.
  931. Global Const WINDOW_BACKGROUND = &H80000005     ' Window background.
  932. Global Const WINDOW_FRAME = &H80000006          ' Window frame.
  933. Global Const MENU_TEXT = &H80000007             ' Text in menus.
  934. Global Const WINDOW_TEXT = &H80000008           ' Text in windows.
  935. Global Const TITLE_BAR_TEXT = &H80000009        ' Text in caption, size box, scroll-bar arrow box..
  936. Global Const ACTIVE_BORDER = &H8000000A         ' Active window border.
  937. Global Const INACTIVE_BORDER = &H8000000B       ' Inactive window border.
  938. Global Const APPLICATION_WORKSPACE = &H8000000C ' Background color of multiple document interface (MDI) applications.
  939. Global Const HIGHLIGHT = &H8000000D             ' Items selected item in a control.
  940. Global Const HIGHLIGHT_TEXT = &H8000000E        ' Text of item selected in a control.
  941. Global Const BUTTON_FACE = &H8000000F           ' Face shading on command buttons.
  942. Global Const BUTTON_SHADOW = &H80000010         ' Edge shading on command buttons.
  943. Global Const GRAY_TEXT = &H80000011             ' Grayed (disabled) text.  This color is set to 0 if the current display driver does not support a solid gray color.
  944. Global Const BUTTON_TEXT = &H80000012           ' Text on push buttons.
  945.  
  946. ' BorderStyle (form, label, picture box, text box)
  947. Global Const NONE = 0                  ' 0 - None
  948. Global Const FIXED_SINGLE = 1          ' 1 - Fixed Single
  949. Global Const SIZABLE = 2               ' 2 - Sizable (Forms only)
  950. Global Const FIXED_DOUBLE = 3          ' 3 - Fixed Double (Forms only)
  951.  
  952. ' DragMode (controls)
  953. Global Const MANUAL = 0                ' 0 - Manual
  954. Global Const AUTOMATIC = 1             ' 1 - Automatic
  955.  
  956. ' DrawMode (form, picture box, Printer)
  957. Global Const BLACKNESS = 1             ' 1 - Blackness
  958. Global Const NOT_MERGE_PEN = 2         ' 2 - Not Merge Pen
  959. Global Const MASK_NOT_PEN = 3          ' 3 - Mask Not Pen
  960. Global Const NOT_COPY_PEN = 4          ' 4 - Not Copy Pen
  961. Global Const MASK_PEN_NOT = 5          ' 5 - Mask Pen Not
  962. Global Const INVERT = 6                ' 6 - Invert
  963. Global Const XOR_PEN = 7               ' 7 - Xor Pen
  964. Global Const NOT_MASK_PEN = 8          ' 8 - Not Mask Pen
  965. Global Const MASK_PEN = 9              ' 9 - Mask Pen
  966. Global Const NOT_XOR_PEN = 10          ' 10 - Not Xor Pen
  967. Global Const NOP = 11                  ' 11 - Nop
  968. Global Const MERGE_NOT_PEN = 12        ' 12 - Merge Not Pen
  969. Global Const COPY_PEN = 13             ' 13 - Copy Pen
  970. Global Const MERGE_PEN_NOT = 14        ' 14 - Merge Pen Not
  971. Global Const MERGE_PEN = 15            ' 15 - Merge Pen
  972. Global Const WHITENESS = 16            ' 16 - Whiteness
  973.  
  974. ' DrawStyle (form, picture box, Printer)
  975. Global Const SOLID = 0                 ' 0 - Solid
  976. Global Const DASH = 1                  ' 1 - Dash
  977. Global Const DOT = 2                   ' 2 - Dot
  978. Global Const DASH_DOT = 3              ' 3 - Dash-Dot
  979. Global Const DASH_DOT_DOT = 4          ' 4 - Dash-Dot-Dot
  980. Global Const INVISIBLE = 5             ' 5 - Invisible
  981. Global Const INSIDE_SOLID = 6          ' 6 - Inside Solid
  982.  
  983. ' FillStyle (form, picture box, Printer)
  984. ' Global Const SOLID = 0               ' 0 - Solid
  985. Global Const TRANSPARENT = 1           ' 1 - Transparent
  986. Global Const HORIZONTAL_LINE = 2       ' 2 - Horizontal Line
  987. Global Const VERTICAL_LINE = 3         ' 3 - Vertical Line
  988. Global Const UPWARD_DIAGONAL = 4       ' 4 - Upward Diagonal
  989. Global Const DOWNWARD_DIAGONAL = 5     ' 5 - Downward Diagonal
  990. Global Const CROSS = 6                 ' 6 - Cross
  991. Global Const DIAGONAL_CROSS = 7        ' 7 - Diagonal Cross
  992.  
  993. ' LinkMode (controls)
  994. ' Global Const NONE = 0                ' 0 - None
  995. Global Const HOT = 1                   ' 1 - Hot
  996. Global Const COLD = 2                  ' 2 - Cold
  997.  
  998. ' LinkMode (form)
  999. ' Global Const NONE = 0                ' 0 - None
  1000. Global Const Server = 1                ' 1 - Server
  1001.  
  1002. ' MousePointer (form, controls)
  1003. Global Const DEFAULT = 0               ' 0 - Default
  1004. Global Const ARROW = 1                 ' 1 - Arrow
  1005. Global Const CROSSHAIR = 2             ' 2 - Cross
  1006. Global Const IBEAM = 3                 ' 3 - I-Beam
  1007. Global Const ICON_POINTER = 4          ' 4 - Icon
  1008. Global Const SIZE_POINTER = 5          ' 5 - Size
  1009. Global Const SIZE_NE_SW = 6            ' 6 - Size NE SW
  1010. Global Const SIZE_N_S = 7              ' 7 - Size N S
  1011. Global Const SIZE_NW_SE = 8            ' 8 - Size NW SE
  1012. Global Const SIZE_W_E = 9              ' 9 - Size W E
  1013. Global Const UP_ARROW = 10             ' 10 - Up Arrow
  1014. Global Const HOURGLASS = 11            ' 11 - Hourglass
  1015. Global Const NO_DROP = 12              ' 12 - No drop
  1016.  
  1017. ' ScaleMode (form, picture box, Printer)
  1018. Global Const USER = 0                  ' 0 - User
  1019. Global Const TWIPS = 1                 ' 1 - Twip
  1020. Global Const POINTS = 2                ' 2 - Point
  1021. Global Const PIXELS = 3                ' 3 - Pixel
  1022. Global Const CHARACTERS = 4            ' 4 - Character
  1023. Global Const INCHES = 5                ' 5 - Inch
  1024. Global Const MILLIMETERS = 6           ' 6 - Millimeter
  1025. Global Const CENTIMETERS = 7           ' 7 - Centimeter
  1026.  
  1027. ' ScrollBar (text box)
  1028. ' Global Const NONE = 0                ' 0 - None
  1029. Global Const HORIZONTAL = 1            ' 1 - Horizontal
  1030. Global Const VERTICAL = 2              ' 2 - Vertical
  1031. Global Const BOTH = 3                  ' 3 - Both
  1032.  
  1033. ' Value (check box)
  1034. Global Const UNCHECKED = 0             ' 0 - Unchecked
  1035. Global Const CHECKED = 1               ' 1 - Checked
  1036. Global Const GRAYED = 2                ' 2 - Grayed
  1037.  
  1038. ' WindowState (form)
  1039. Global Const NORMAL = 0                ' 0 - Normal
  1040. Global Const MINIMIZED = 1             ' 1 - Minimized
  1041. Global Const MAXIMIZED = 2             ' 2 - Maximized
  1042.  
  1043.  
  1044.  
  1045. '*****************************************************************
  1046. '**           Microsoft Visual Basic LAN Manager Toolkit        **
  1047. '**            Copyright(c) Microsoft Corp., 1991               **
  1048. '*****************************************************************
  1049.  
  1050. '********************************************************************
  1051. '*                                                                  *
  1052. '*  About this file ...  DOMAIN.TXT                                 *
  1053. '*                                                                  *
  1054. '*  This file contains information about the Domain APIs.           *
  1055. '*                                                                  *
  1056. '*      Function prototypes.                                        *
  1057. '*                                                                  *
  1058. '*      Data structure templates.                                   *
  1059. '*                                                                  *
  1060. '*      Definition of special values.                               *
  1061. '*                                                                  *
  1062. '*                                                                  *
  1063. '*  NOTE:  You must include NETCONS.TXT before this file, since this*
  1064. '*         file depends on values defined in NETCONS.TXT.           *
  1065. '*                                                                  *
  1066. '********************************************************************
  1067.  
  1068. '****************************************************************
  1069. '*                                                              *
  1070. '*                  Function prototypes - DOMAIN                *
  1071. '*                                                              *
  1072. '****************************************************************
  1073.  
  1074. Declare Function NetGetDCName% Lib "NETAPI.DLL" (ByVal pszServer$, ByVal pszDomain$, ByVal pszBuffer$, ByVal cbBuffer%)
  1075.  
  1076. Declare Function NetLogonEnum% Lib "NETAPI.DLL" (ByVal pszServer$, ByVal sLevel%, ByVal pbBuffer$, ByVal cbBuffer%, pcEntriesRead%, pcTotalAvail%)
  1077.  
  1078.  
  1079. '****************************************************************
  1080. '*                                                              *
  1081. '*              Special values and constants - DOMAIN           *
  1082. '*                                                              *
  1083. '****************************************************************
  1084.  
  1085. Global Const LOGON_INFO_UNKNOWN = -1
  1086.  
  1087.  
  1088. '*****************************************************************
  1089. '**           Microsoft Visual Basic LAN Manager Toolkit        **
  1090. '**            Copyright(c) Microsoft Corp., 1991               **
  1091. '*****************************************************************
  1092.  
  1093. '********************************************************************
  1094. '*                                                                  *
  1095. '*  About this file ...  WKSTA.TXT                                  *
  1096. '*                                                                  *
  1097. '*  This file contains information about the NetWksta APIs.         *
  1098. '*                                                                  *
  1099. '*      Function prototypes.                                        *
  1100. '*                                                                  *
  1101. '*      Data structure templates.                                   *
  1102. '*                                                                  *
  1103. '*      Definition of special values.                               *
  1104. '*                                                                  *
  1105. '*                                                                  *
  1106. '*  NOTE:  You must include NETCONS.TXT before this file, since this*
  1107. '*         file depends on values defined in NETCONS.TXT.           *
  1108. '*                                                                  *
  1109. '********************************************************************
  1110.  
  1111.  
  1112. '****************************************************************
  1113. '*                                                              *
  1114. '*              Function prototypes                             *
  1115. '*                                                              *
  1116. '****************************************************************
  1117.  
  1118. Declare Function NetWkstaGetInfo% Lib "NETAPI.DLL" (ByVal pszServer$, ByVal sLevel%, ByVal pbBuffer&, ByVal cbBuffer%, pcbTotalAvail%)
  1119.  
  1120. '****************************************************************
  1121. '*                                                              *
  1122. '*              Data structure templates                        *
  1123. '*                                                              *
  1124. '****************************************************************
  1125.  
  1126. Type wksta_info_10
  1127.     wki10_computername As String
  1128.     wki10_username As String
  1129.     wki10_langroup As String
  1130.     wki10_ver_major As String * 1
  1131.     wki10_ver_minor As String * 1
  1132.     wki10_logon_domain As String
  1133.     wki10_oth_domains As String
  1134. End Type        '* wksta_info_10 *
  1135.  
  1136. Global Const FMT_wksta_info_10 = "P15P20P15B1B1P15P159"
  1137.  
  1138.  
  1139.  
  1140. '************** More User Manager Info *****************
  1141.  
  1142. ' User Manager Structures based upon LAN Manager types
  1143. ' defined above.
  1144.  
  1145. Global UserInfo As user_info_2      ' structure for user info
  1146. Global UserInfo1 As user_info_1     ' structure for adding user info at level 1
  1147. 'Global Servers1a() As server_info_1 ' structure for enum servers
  1148. 'Global Shares1a() As share_info_1   ' structure for enum shares
  1149. 'Global GroupList0() As group_info_0 ' structure for get user groups
  1150. 'Global GroupList1() As group_info_1 ' structure for enum groups
  1151. 'Global GroupInfo As group_info_1    ' structure for a group
  1152.  
  1153.  
  1154. ' The DEFAULT_USER_FLAGS constant defines the default settings
  1155. ' for the user flags.  This will be used when setting the
  1156. ' user flags for a new user.  The flags that can be set
  1157. ' within this application will be Or'ed onto the defaults.
  1158.  
  1159. Global Const DEFAULT_USER_FLAGS = UF_SCRIPT
  1160.  
  1161.  
  1162. ' The USER_FLAGS_MASK_OFF constant is used to mask out the
  1163. ' flags (set to 0) that the User Manager application can
  1164. ' set.  This is done to preserve retrieved flags that can
  1165. ' not be changed within the application.
  1166.  
  1167. Global Const USER_FLAGS_MASK_OFF = Not (UF_ACCOUNTDISABLE And UF_PASSWD_NOTREQD And UF_PASSWD_CANT_CHANGE)
  1168.  
  1169.