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.

129 lines
4.4 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows NT **/
  3. /** Copyright(c) Microsoft Corporation, 1992 - 1997 -1997 **/
  4. /**********************************************************************/
  5. /*
  6. GetUser.h
  7. This file contains the definitions for the User Browser "C" API
  8. FILE HISTORY:
  9. AndyHe 11-Oct-1992 Created
  10. */
  11. #ifndef _GETUSER_H_
  12. #define _GETUSER_H_
  13. //#include <ntseapi.h>
  14. typedef HANDLE HUSERBROW; // handle type returned by OpenUserBrowser
  15. //
  16. // Parameter structure passed to OpenUserBrowser
  17. //
  18. typedef struct tagUSLT { // uslt
  19. ULONG ulStructSize;
  20. BOOL fUserCancelled; // Set if user cancelled
  21. BOOL fExpandNames; // TRUE if full names should be returned
  22. HWND hwndOwner; // Window handle to use for dialog
  23. WCHAR * pszTitle; // Dialog title (or NULL)
  24. WCHAR * pszInitialDomain; // NULL for local machine or prefix
  25. // with "\\" for server
  26. DWORD Flags; // Defined below
  27. ULONG ulHelpContext; // Help context for the main dialog
  28. WCHAR * pszHelpFileName; // Help file name
  29. } USERBROWSER, *LPUSERBROWSER, * PUSERBROWSER;
  30. //
  31. // Bit values for Flags field
  32. //
  33. //
  34. // Indicates the user accounts should be shown as if the user pressed
  35. // the "Show Users" button. The button will be hidden if this flag is
  36. // set. The USRBROWS_SHOW_USERS flag must also be set.
  37. #define USRBROWS_EXPAND_USERS (0x00000008)
  38. //
  39. // Passing this will prevent the computer name from showing up in the
  40. // combo box.
  41. //
  42. #define USRBROWS_DONT_SHOW_COMPUTER (0x00000100)
  43. //
  44. // Allow the user to only select a single item from the listbox (not all
  45. // SHOW_* combinations are supported with this option).
  46. //
  47. #define USRBROWS_SINGLE_SELECT (0x00001000)
  48. //
  49. // These manifests determine which well known Sids are included in the list.
  50. //
  51. #define USRBROWS_INCL_REMOTE_USERS (0x00000010)
  52. #define USRBROWS_INCL_INTERACTIVE (0x00000020)
  53. #define USRBROWS_INCL_EVERYONE (0x00000040)
  54. #define USRBROWS_INCL_CREATOR (0x00000080)
  55. #define USRBROWS_INCL_SYSTEM (0x00010000)
  56. #define USRBROWS_INCL_ALL (USRBROWS_INCL_REMOTE_USERS |\
  57. USRBROWS_INCL_INTERACTIVE |\
  58. USRBROWS_INCL_EVERYONE |\
  59. USRBROWS_INCL_CREATOR |\
  60. USRBROWS_INCL_SYSTEM)
  61. //
  62. // These manifests determine which type of accounts to display
  63. //
  64. // Note: currently, if you display groups, you must display users
  65. // if you display aliases (local groups), you must display
  66. // groups and users
  67. //
  68. #define USRBROWS_SHOW_ALIASES (0x00000001)
  69. #define USRBROWS_SHOW_GROUPS (0x00000002)
  70. #define USRBROWS_SHOW_USERS (0x00000004)
  71. #define USRBROWS_SHOW_ALL (USRBROWS_SHOW_ALIASES |\
  72. USRBROWS_SHOW_GROUPS |\
  73. USRBROWS_SHOW_USERS)
  74. //
  75. // The caller should provide the name of a help file containing four
  76. // help contexts. The first help context is for the main User Browser
  77. // dialog, the next three are for the Local Group Membership, Global Group
  78. // Membership, and Find Account subdialogs, respectively.
  79. //
  80. #define USRBROWS_HELP_OFFSET_LOCALGROUP 1
  81. #define USRBROWS_HELP_OFFSET_GLOBALGROUP 2
  82. #define USRBROWS_HELP_OFFSET_FINDUSER 3
  83. //
  84. // User Details structure returned by user browser enumeration
  85. //
  86. typedef struct tagUSDT { // usdt
  87. enum _SID_NAME_USE UserType;
  88. PSID psidUser;
  89. PSID psidDomain;
  90. WCHAR * pszFullName;
  91. WCHAR * pszAccountName;
  92. WCHAR * pszDisplayName;
  93. WCHAR * pszDomainName;
  94. WCHAR * pszComment;
  95. ULONG ulFlags; // User account flags
  96. } USERDETAILS, * LPUSERDETAILS, * PUSERDETAILS;
  97. // Function definitions for the GetUser API...
  98. HUSERBROW WINAPI OpenUserBrowser( LPUSERBROWSER lpUserParms );
  99. BOOL WINAPI EnumUserBrowserSelection( HUSERBROW hHandle,
  100. LPUSERDETAILS lpUser,
  101. DWORD *plBufferSize );
  102. BOOL WINAPI CloseUserBrowser( HUSERBROW hHandle );
  103. #endif //_GETUSER_H_