import objsel.dll from wine-20050726
[reactos.git] / reactos / w32api / include / objsel.h
1 /*
2 * objsel.h
3 *
4 * Object Picker Dialog
5 *
6 * THIS SOFTWARE IS NOT COPYRIGHTED
7 *
8 * This source code is offered for use in the public domain. You may
9 * use, modify or distribute it freely.
10 *
11 * This code is distributed in the hope that it will be useful but
12 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
13 * DISCLAIMED. This includes but is not limited to warranties of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 *
16 */
17 #ifndef __OBJSEL_H
18 #define __OBJSEL_H
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24 #include <unknwn.h>
25
26 DEFINE_GUID(CLSID_DsObjectPicker, 0x17d6ccd8, 0x3b7b, 0x11d2, 0x00b9, 0xe0,0x00,0xc0,0x4f,0xd8,0xdb,0xf7);
27 DEFINE_GUID(IID_IDsObjectPicker, 0x0c87e64e, 0x3b7a, 0x11d2, 0x00b9, 0xe0,0x00,0xc0,0x4f,0xd8,0xdb,0xf7);
28
29 #define CFSTR_DSOP_DS_SELECTION_LIST TEXT("CFSTR_DSOP_DS_SELECTION_LIST")
30
31 /* up-level scope filters in the DSOP_UPLEVEL_FILTER_FLAGS structure */
32 #define DSOP_FILTER_INCLUDE_ADVANCED_VIEW (0x1)
33 #define DSOP_FILTER_USERS (0x2)
34 #define DSOP_FILTER_BUILTIN_GROUPS (0x4)
35 #define DSOP_FILTER_WELL_KNOWN_PRINCIPALS (0x8)
36 #define DSOP_FILTER_UNIVERSAL_GROUPS_DL (0x10)
37 #define DSOP_FILTER_UNIVERSAL_GROUPS_SE (0x20)
38 #define DSOP_FILTER_GLOBAL_GROUPS_DL (0x40)
39 #define DSOP_FILTER_GLOBAL_GROUPS_SE (0x80)
40 #define DSOP_FILTER_DOMAIN_LOCAL_GROUPS_DL (0x100)
41 #define DSOP_FILTER_DOMAIN_LOCAL_GROUPS_SE (0x200)
42 #define DSOP_FILTER_CONTACTS (0x400)
43 #define DSOP_FILTER_COMPUTERS (0x800)
44
45 typedef struct _DSOP_UPLEVEL_FILTER_FLAGS
46 {
47 ULONG flBothModes;
48 ULONG flMixedModeOnly;
49 ULONG flNativeModeOnly;
50 } DSOP_UPLEVEL_FILTER_FLAGS, *PDSOP_UPLEVEL_FILTER_FLAGS;
51
52 /* down-level scope filters in the DSOP_FILTER_FLAGS structure */
53 #define DSOP_DOWNLEVEL_FILTER_USERS (0x80000001)
54 #define DSOP_DOWNLEVEL_FILTER_LOCAL_GROUPS (0x80000002)
55 #define DSOP_DOWNLEVEL_FILTER_GLOBAL_GROUPS (0x80000004)
56 #define DSOP_DOWNLEVEL_FILTER_COMPUTERS (0x80000008)
57 #define DSOP_DOWNLEVEL_FILTER_WORLD (0x80000010)
58 #define DSOP_DOWNLEVEL_FILTER_AUTHENTICATED_USER (0x80000020)
59 #define DSOP_DOWNLEVEL_FILTER_ANONYMOUS (0x80000040)
60 #define DSOP_DOWNLEVEL_FILTER_BATCH (0x80000080)
61 #define DSOP_DOWNLEVEL_FILTER_CREATOR_OWNER (0x80000100)
62 #define DSOP_DOWNLEVEL_FILTER_CREATOR_GROUP (0x80000200)
63 #define DSOP_DOWNLEVEL_FILTER_DIALUP (0x80000400)
64 #define DSOP_DOWNLEVEL_FILTER_INTERACTIVE (0x80000800)
65 #define DSOP_DOWNLEVEL_FILTER_NETWORK (0x80001000)
66 #define DSOP_DOWNLEVEL_FILTER_SERVICE (0x80002000)
67 #define DSOP_DOWNLEVEL_FILTER_SYSTEM (0x80004000)
68 #define DSOP_DOWNLEVEL_FILTER_EXCLUDE_BUILTIN_GROUPS (0x80008000)
69 #define DSOP_DOWNLEVEL_FILTER_TERMINAL_SERVER (0x80010000)
70 #define DSOP_DOWNLEVEL_FILTER_ALL_WELLKNOWN_SIDS (0x80020000)
71 #define DSOP_DOWNLEVEL_FILTER_LOCAL_SERVICE (0x80040000)
72 #define DSOP_DOWNLEVEL_FILTER_NETWORK_SERVICE (0x80080000)
73 #define DSOP_DOWNLEVEL_FILTER_REMOTE_LOGON (0x80100000)
74
75 typedef struct _DSOP_FILTER_FLAGS
76 {
77 DSOP_UPLEVEL_FILTER_FLAGS Uplevel;
78 ULONG flDownlevel;
79 } DSOP_FILTER_FLAGS, *PDSOP_FILTER_FLAGS;
80
81 /* ADsPath format flags in the DSOP_SCOPE_INIT_INFO structure */
82 #define DSOP_SCOPE_FLAG_STARTING_SCOPE (0x1)
83 #define DSOP_SCOPE_FLAG_WANT_PROVIDER_WINNT (0x2)
84 #define DSOP_SCOPE_FLAG_WANT_PROVIDER_LDAP (0x4)
85 #define DSOP_SCOPE_FLAG_WANT_PROVIDER_GC (0x8)
86 #define DSOP_SCOPE_FLAG_WANT_SID_PATH (0x10)
87 #define DSOP_SCOPE_FLAG_WANT_DOWNLEVEL_BUILTIN_PATH (0x20)
88 #define DSOP_SCOPE_FLAG_DEFAULT_FILTER_USERS (0x40)
89 #define DSOP_SCOPE_FLAG_DEFAULT_FILTER_GROUPS (0x80)
90 #define DSOP_SCOPE_FLAG_DEFAULT_FILTER_COMPUTERS (0x100)
91 #define DSOP_SCOPE_FLAG_DEFAULT_FILTER_CONTACTS (0x200)
92
93 typedef struct _DSOP_SCOPE_INIT_INFO
94 {
95 ULONG cbSize;
96 ULONG flType;
97 ULONG flScope;
98 DSOP_FILTER_FLAGS FilterFlags;
99 PCWSTR pwzDcName;
100 PCWSTR pwzADsPath;
101 HRESULT hr;
102 } DSOP_SCOPE_INIT_INFO, *PDSOP_SCOPE_INIT_INFO;
103 typedef const DSOP_SCOPE_INIT_INFO *PCDSOP_SCOPE_INIT_INFO;
104
105 /* object picker options in the DSOP_INIT_INFO structure */
106 #define DSOP_FLAG_MULTISELECT (0x1)
107 #define DSOP_FLAG_SKIP_TARGET_COMPUTER_DC_CHECK (0x2)
108
109 typedef struct _DSOP_INIT_INFO
110 {
111 ULONG cbSize;
112 PCWSTR pwzTargetComputer;
113 ULONG cDsScopeInfos;
114 PDSOP_SCOPE_INIT_INFO aDsScopeInfos;
115 ULONG flOptions;
116 ULONG cAttributesToFetch;
117 PCWSTR *apwzAttributeNames;
118 } DSOP_INIT_INFO, *PDSOP_INIT_INFO;
119
120 typedef const DSOP_INIT_INFO *PCDSOP_INIT_INFO;
121
122 /* selection scope types in the DS_SELECTION structure */
123 #define DSOP_SCOPE_TYPE_TARGET_COMPUTER (0x1)
124 #define DSOP_SCOPE_TYPE_UPLEVEL_JOINED_DOMAIN (0x2)
125 #define DSOP_SCOPE_TYPE_DOWNLEVEL_JOINED_DOMAIN (0x4)
126 #define DSOP_SCOPE_TYPE_ENTERPRISE_DOMAIN (0x8)
127 #define DSOP_SCOPE_TYPE_GLOBAL_CATALOG (0x10)
128 #define DSOP_SCOPE_TYPE_EXTERNAL_UPLEVEL_DOMAIN (0x20)
129 #define DSOP_SCOPE_TYPE_EXTERNAL_DOWNLEVEL_DOMAIN (0x40)
130 #define DSOP_SCOPE_TYPE_WORKGROUP (0x80)
131 #define DSOP_SCOPE_TYPE_USER_ENTERED_UPLEVEL_SCOPE (0x100)
132 #define DSOP_SCOPE_TYPE_USER_ENTERED_DOWNLEVEL_SCOPE (0x200)
133
134 typedef struct _DS_SELECTION
135 {
136 PWSTR pwzName;
137 PWSTR pwzADsPath;
138 PWSTR pwzClass;
139 PWSTR pwzUPN;
140 VARIANT *pvarFetchedAttributes;
141 ULONG flScopeType;
142 } DS_SELECTION, *PDS_SELECTION;
143
144 typedef struct _DS_SELECTION_LIST
145 {
146 ULONG cItems;
147 ULONG cFetchedAttributes;
148 DS_SELECTION aDsSelection[ANYSIZE_ARRAY];
149 } DS_SELECTION_LIST, *PDS_SELECTION_LIST;
150
151 /*****************************************************************************
152 * IDsObjectPicker interface
153 */
154 #define INTERFACE IDsObjectPicker
155 DECLARE_INTERFACE_(IDsObjectPicker,IUnknown)
156 {
157 /*** IUnknown methods ***/
158 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
159 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
160 STDMETHOD_(ULONG,Release)(THIS) PURE;
161 /*** IDsObjectPicker methods ***/
162 STDMETHOD_(HRESULT,Initialize)(THIS_ PDSOP_INIT_INFO pInitInfo) PURE;
163 STDMETHOD_(HRESULT,InvokeDialog)(THIS_ HWND hwndParent, IDataObject** ppdoSelections) PURE;
164 };
165 #undef INTERFACE
166
167
168 #ifdef __cplusplus
169 }
170 #endif
171 #endif /* __OBJSEL_H */