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.

87 lines
2.2 KiB

  1. /*+-------------------------------------------------------------------------+
  2. | Copyright 1993-1994 (C) Microsoft Corporation - All rights reserved. |
  3. +-------------------------------------------------------------------------+*/
  4. #ifndef _HNETUTIL_
  5. #define _HNETUTIL_
  6. #ifdef __cplusplus
  7. extern "C"{
  8. #endif
  9. // made to match usri3 info structure for easy save/retrieval
  10. typedef struct _NT_USER_INFO {
  11. LPWSTR name;
  12. LPWSTR password;
  13. DWORD password_age;
  14. DWORD priv;
  15. LPWSTR home_dir;
  16. LPWSTR comment;
  17. DWORD flags;
  18. LPWSTR script_path;
  19. DWORD auth_flags;
  20. LPWSTR full_name;
  21. LPWSTR usr_comment;
  22. LPWSTR parms;
  23. LPWSTR workstations;
  24. DWORD last_logon;
  25. DWORD last_logoff;
  26. DWORD acct_expires;
  27. DWORD max_storage;
  28. DWORD units_per_week;
  29. PBYTE logon_hours;
  30. DWORD bad_pw_count;
  31. DWORD num_logons;
  32. LPWSTR logon_server;
  33. DWORD country_code;
  34. DWORD code_page;
  35. DWORD user_id;
  36. DWORD primary_group_id;
  37. LPWSTR profile;
  38. LPWSTR home_dir_drive;
  39. DWORD password_expired;
  40. } NT_USER_INFO, *PNT_USER_INFO, *LPNT_USER_INFO;
  41. typedef struct _FPNW_INFO {
  42. WORD MaxConnections;
  43. WORD PasswordInterval;
  44. BYTE GraceLoginAllowed;
  45. BYTE GraceLoginRemaining;
  46. LPWSTR LoginFrom;
  47. LPWSTR HomeDir;
  48. } FPNW_INFO, *PFPNW_INFO, *LPFPNW_INFO;
  49. // made to match USER_MODALS_INFO_0 info structure for easy save/retrieval
  50. typedef struct _NT_DEFAULTS {
  51. DWORD min_passwd_len;
  52. DWORD max_passwd_age;
  53. DWORD min_passwd_age;
  54. DWORD force_logoff;
  55. DWORD password_hist_len;
  56. } NT_DEFAULTS, *PNT_DEFAULTS, *LPNT_DEFAULTS;
  57. typedef struct _EnumRec {
  58. struct _EnumRec *next;
  59. DWORD cEntries;
  60. DWORD cbBuffer;
  61. LPNETRESOURCE lpnr;
  62. } ENUM_REC;
  63. void FixPathSlash(LPTSTR NewPath, LPTSTR Path);
  64. LPTSTR ShareNameParse(LPTSTR ShareName);
  65. void GetLocalName(LPTSTR *lpLocalName);
  66. BOOL SetProvider(LPTSTR Provider, NETRESOURCE *ResourceBuf);
  67. ENUM_REC *AllocEnumBuffer();
  68. DWORD FAR PASCAL EnumBufferBuild(ENUM_REC **BufHead, int *NumBufs, NETRESOURCE ResourceBuf);
  69. BOOL UseAddPswd(HWND hwnd, LPTSTR UserName, LPTSTR lpszServer, LPTSTR lpszShare, LPTSTR Provider);
  70. LPTSTR NicePath(int Len, LPTSTR Path);
  71. #ifdef __cplusplus
  72. }
  73. #endif
  74. #endif