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.

142 lines
4.6 KiB

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