Leaked source code of windows server 2003
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.7 KiB

  1. #ifndef __RSOP_QUERY_H__
  2. #define __RSOP_QUERY_H__
  3. //+--------------------------------------------------------------------------
  4. //
  5. // Microsoft Windows
  6. // Copyright (C) Microsoft Corporation, 1994 - 1997.
  7. //
  8. // File: RSOPQuery.h
  9. //
  10. // Contents: Definitions for the RSOP query API
  11. //
  12. // Functions:
  13. // CreateRSOPQuery
  14. // RunRSOPQuery
  15. // FreeRSOPQuery
  16. // FreeRSOPQueryResults
  17. //
  18. // History: 07-30-2001 rhynierm Created
  19. //
  20. //---------------------------------------------------------------------------
  21. #if _MSC_VER > 1000
  22. #pragma once
  23. #endif
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. // Defines what kind of user interaction we want.
  28. typedef enum tagRSOP_UI_MODE
  29. {
  30. RSOP_UI_NONE,
  31. RSOP_UI_REFRESH,
  32. RSOP_UI_WIZARD,
  33. RSOP_UI_CHOOSE
  34. } RSOP_UI_MODE;
  35. // Defines what kind of query we want to run.
  36. typedef enum tagRSOP_QUERY_TYPE
  37. {
  38. RSOP_UNKNOWN_MODE,
  39. RSOP_PLANNING_MODE,
  40. RSOP_LOGGING_MODE
  41. } RSOP_QUERY_TYPE;
  42. // Defines the planning mode loopback mode
  43. typedef enum tagRSOP_LOOPBACK_MODE
  44. {
  45. RSOP_LOOPBACK_NONE,
  46. RSOP_LOOPBACK_REPLACE,
  47. RSOP_LOOPBACK_MERGE
  48. } RSOP_LOOPBACK_MODE;
  49. // Flags that can be set in RSOPQuery
  50. #define RSOP_NO_USER_POLICY 0x1 // Don't run query for user policy
  51. #define RSOP_NO_COMPUTER_POLICY 0x2 // Don't run query for computer policy
  52. #define RSOP_FIX_USER 0x4 // User is prespecified and cannot be changed
  53. #define RSOP_FIX_COMPUTER 0x8 // Computer is prespecified and cannot be changed
  54. #define RSOP_FIX_DC 0x10 // DC is prespecified and cannot be changed
  55. #define RSOP_FIX_SITENAME 0x20 // Site name is prespecified and cannot be changed
  56. #define RSOP_FIX_QUERYTYPE 0x40 // Fix the query type - this hides the choice page
  57. #define RSOP_NO_WELCOME 0x100 // Do not display a welcome message
  58. // Information identifying the target in the RSOP query.
  59. typedef struct tagRSOP_QUERY_TARGET
  60. {
  61. LPTSTR szName;
  62. LPTSTR szSOM;
  63. DWORD dwSecurityGroupCount;
  64. LPTSTR* aszSecurityGroups; // See dwSecurityGroupCount for # of items
  65. DWORD* adwSecurityGroupsAttr; // See dwSecurityGroupCount for # of items
  66. BOOL bAssumeWQLFiltersTrue;
  67. DWORD dwWQLFilterCount;
  68. LPTSTR* aszWQLFilters; // See dwWQLFilterCount for # of items
  69. LPTSTR* aszWQLFilterNames; // See dwWQLFilterCount for # of items
  70. } RSOP_QUERY_TARGET, *LPRSOP_QUERY_TARGET;
  71. // Results returned from calling RSOPRunQuery
  72. typedef struct tagRSOP_QUERY_RESULTS
  73. {
  74. LPTSTR szWMINameSpace;
  75. BOOL bUserDeniedAccess;
  76. BOOL bNoUserPolicyData;
  77. BOOL bComputerDeniedAccess;
  78. BOOL bNoComputerPolicyData;
  79. ULONG ulErrorInfo;
  80. } RSOP_QUERY_RESULTS, *LPRSOP_QUERY_RESULTS;
  81. // Structure containing all the information used by the RSOP query API.
  82. typedef struct tagRSOP_QUERY
  83. {
  84. RSOP_QUERY_TYPE QueryType; // Type of query to run
  85. RSOP_UI_MODE UIMode; // TRUE if wizard must show
  86. DWORD dwFlags;
  87. union
  88. {
  89. struct // QueryType == RSOP_PLANNING_MODE
  90. {
  91. LPRSOP_QUERY_TARGET pUser; // Target user (SAM style name)
  92. LPRSOP_QUERY_TARGET pComputer; // Target computer (SAM style name)
  93. BOOL bSlowNetworkConnection;
  94. RSOP_LOOPBACK_MODE LoopbackMode; // Loopback processing
  95. LPTSTR szSite;
  96. LPTSTR szDomainController;
  97. };
  98. struct // QueryType == (any other option)
  99. {
  100. LPTSTR szUserName; // SAM style user object name (Ignored in query - just used for display purposes)
  101. LPTSTR szUserSid; // User's SID (is actually used for logging mode query)
  102. LPTSTR szComputerName; // SAM style computer object name
  103. };
  104. };
  105. } RSOP_QUERY, *LPRSOP_QUERY;
  106. // RSOP Query API
  107. BOOL WINAPI CreateRSOPQuery( LPRSOP_QUERY* ppQuery, RSOP_QUERY_TYPE QueryType );
  108. HRESULT WINAPI RunRSOPQuery( HWND hParent, LPRSOP_QUERY pQuery, LPRSOP_QUERY_RESULTS* ppResults );
  109. BOOL WINAPI FreeRSOPQuery( LPRSOP_QUERY pQuery );
  110. BOOL WINAPI FreeRSOPQueryResults( LPRSOP_QUERY pQuery, LPRSOP_QUERY_RESULTS pResults );
  111. BOOL WINAPI CopyRSOPQuery( LPRSOP_QUERY pQuery, LPRSOP_QUERY* ppNewQuery );
  112. BOOL WINAPI ChangeRSOPQueryType( LPRSOP_QUERY pQuery, RSOP_QUERY_TYPE NewQueryType );
  113. #ifdef __cplusplus
  114. }
  115. #endif
  116. #endif