[PSDK] -Add some definitions needed by the previous commit.
[reactos.git] / reactos / sdk / include / psdk / shlobj.h
1 /*
2 * Copyright (C) the Wine project
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19 #ifndef __WINE_SHLOBJ_H
20 #define __WINE_SHLOBJ_H
21
22 #include <ole2.h>
23 #include <commctrl.h>
24 #include <prsht.h>
25
26 #ifndef INITGUID
27 #include <shlguid.h>
28 #endif
29
30 #ifdef WINE_NO_UNICODE_MACROS
31 #undef GetObject
32 #endif
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif /* defined(__cplusplus) */
37
38 /* Except for specific structs, this header is byte packed */
39 #include <pshpack1.h>
40
41 #include <shtypes.h>
42 #include <shobjidl.h>
43
44 typedef struct
45 {
46 DWORD dwSize;
47 DWORD dwMask;
48 SHELLVIEWID* pvid;
49 LPSTR pszWebViewTemplate;
50 DWORD cchWebViewTemplate;
51 LPSTR pszWebViewTemplateVersion;
52 LPSTR pszInfoTip;
53 DWORD cchInfoTip;
54 CLSID* pclsid;
55 DWORD dwFlags;
56 LPSTR pszIconFile;
57 DWORD cchIconFile;
58 int iIconIndex;
59 LPSTR pszLogo;
60 DWORD cchLogo;
61 } SHFOLDERCUSTOMSETTINGSA, *LPSHFOLDERCUSTOMSETTINGSA;
62
63 typedef struct
64 {
65 DWORD dwSize;
66 DWORD dwMask;
67 SHELLVIEWID* pvid;
68 LPWSTR pszWebViewTemplate;
69 DWORD cchWebViewTemplate;
70 LPWSTR pszWebViewTemplateVersion;
71 LPWSTR pszInfoTip;
72 DWORD cchInfoTip;
73 CLSID* pclsid;
74 DWORD dwFlags;
75 LPWSTR pszIconFile;
76 DWORD cchIconFile;
77 int iIconIndex;
78 LPWSTR pszLogo;
79 DWORD cchLogo;
80 } SHFOLDERCUSTOMSETTINGSW, *LPSHFOLDERCUSTOMSETTINGSW;
81
82 #ifndef HPSXA_DEFINED
83 #define HPSXA_DEFINED
84 DECLARE_HANDLE(HPSXA);
85 #endif
86
87 UINT
88 WINAPI
89 SHAddFromPropSheetExtArray(
90 _In_ HPSXA,
91 _In_ LPFNADDPROPSHEETPAGE,
92 LPARAM);
93
94 LPVOID WINAPI SHAlloc(SIZE_T) __WINE_ALLOC_SIZE(1);
95
96 HRESULT
97 WINAPI
98 SHCoCreateInstance(
99 _In_opt_ LPCWSTR,
100 _In_opt_ const CLSID*,
101 _In_opt_ IUnknown*,
102 _In_ REFIID,
103 _Outptr_ LPVOID*);
104
105 HPSXA WINAPI SHCreatePropSheetExtArray(_In_ HKEY, _In_opt_ LPCWSTR, UINT);
106 HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY,LPCWSTR,UINT,IDataObject*);
107 HRESULT WINAPI SHCreateQueryCancelAutoPlayMoniker(IMoniker**);
108
109 HRESULT
110 WINAPI
111 SHCreateShellItem(
112 _In_opt_ LPCITEMIDLIST,
113 _In_opt_ IShellFolder*,
114 _In_ LPCITEMIDLIST,
115 _Outptr_ IShellItem**);
116
117 DWORD WINAPI SHCLSIDFromStringA(_In_ LPCSTR, _Out_ CLSID*);
118 DWORD WINAPI SHCLSIDFromStringW(_In_ LPCWSTR, _Out_ CLSID*);
119 #define SHCLSIDFromString WINELIB_NAME_AW(SHCLSIDFromString)
120
121 HRESULT
122 WINAPI
123 SHCreateStdEnumFmtEtc(
124 _In_ UINT cfmt,
125 _In_reads_(cfmt) const FORMATETC *,
126 _Outptr_ IEnumFORMATETC**);
127
128 void WINAPI SHDestroyPropSheetExtArray(_In_ HPSXA);
129 BOOL WINAPI SHFindFiles(_In_opt_ LPCITEMIDLIST, _In_opt_ LPCITEMIDLIST);
130 DWORD WINAPI SHFormatDrive(_In_ HWND, UINT, UINT, UINT);
131 void WINAPI SHFree(_In_opt_ LPVOID);
132
133 BOOL
134 WINAPI
135 GetFileNameFromBrowse(
136 _In_opt_ HWND,
137 _Inout_updates_(cchFilePath) LPWSTR,
138 UINT cchFilePath,
139 _In_opt_ LPCWSTR,
140 _In_ LPCWSTR,
141 _In_opt_ LPCWSTR,
142 _In_opt_ LPCWSTR);
143
144 _Check_return_ HRESULT WINAPI SHGetInstanceExplorer(_Outptr_ IUnknown**);
145
146 VOID WINAPI SHSetInstanceExplorer(_In_opt_ IUnknown*);
147
148 HRESULT
149 WINAPI
150 SHGetFolderPathAndSubDirA(
151 _Reserved_ HWND,
152 _In_ int,
153 _In_opt_ HANDLE,
154 _In_ DWORD,
155 _In_opt_ LPCSTR, _Out_writes_(MAX_PATH) LPSTR);
156
157 HRESULT
158 WINAPI
159 SHGetFolderPathAndSubDirW(
160 _Reserved_ HWND,
161 _In_ int,
162 _In_opt_ HANDLE,
163 _In_ DWORD,
164 _In_opt_ LPCWSTR,
165 _Out_writes_(MAX_PATH) LPWSTR);
166
167 #define SHGetFolderPathAndSubDir WINELIB_NAME_AW(SHGetFolderPathAndSubDir);
168
169 _Success_(return != 0)
170 BOOL
171 WINAPI
172 SHGetPathFromIDListA(
173 _In_ LPCITEMIDLIST,
174 _Out_writes_(MAX_PATH) LPSTR);
175
176 _Success_(return != 0)
177 BOOL
178 WINAPI
179 SHGetPathFromIDListW(
180 _In_ LPCITEMIDLIST,
181 _Out_writes_(MAX_PATH) LPWSTR);
182
183 #define SHGetPathFromIDList WINELIB_NAME_AW(SHGetPathFromIDList)
184
185 INT WINAPI SHHandleUpdateImage(_In_ LPCITEMIDLIST);
186
187 HRESULT
188 WINAPI
189 SHILCreateFromPath(
190 _In_ LPCWSTR,
191 _Outptr_ LPITEMIDLIST*,
192 _Inout_opt_ DWORD*);
193
194 HRESULT WINAPI SHLoadOLE(LPARAM);
195
196 HRESULT
197 WINAPI
198 SHParseDisplayName(
199 _In_ LPCWSTR,
200 _In_opt_ IBindCtx*,
201 _Outptr_ LPITEMIDLIST*,
202 _In_ SFGAOF,
203 _Out_opt_ SFGAOF*);
204
205 HRESULT
206 WINAPI
207 SHPathPrepareForWriteA(
208 _In_opt_ HWND,
209 _In_opt_ IUnknown*,
210 _In_ LPCSTR, DWORD);
211
212 HRESULT
213 WINAPI
214 SHPathPrepareForWriteW(
215 _In_opt_ HWND,
216 _In_opt_ IUnknown*,
217 _In_ LPCWSTR, DWORD);
218
219 #define SHPathPrepareForWrite WINELIB_NAME_AW(SHPathPrepareForWrite);
220
221 UINT
222 WINAPI
223 SHReplaceFromPropSheetExtArray(
224 _In_ HPSXA,
225 UINT,
226 _In_ LPFNADDPROPSHEETPAGE,
227 LPARAM);
228
229 LPITEMIDLIST WINAPI SHSimpleIDListFromPath(LPCWSTR);
230
231 int
232 WINAPI
233 SHMapPIDLToSystemImageListIndex(
234 _In_ IShellFolder*,
235 _In_ LPCITEMIDLIST,
236 _Out_opt_ int*);
237
238 HRESULT WINAPI SHStartNetConnectionDialog(HWND,LPCSTR,DWORD);
239 VOID WINAPI SHUpdateImageA(_In_ LPCSTR, INT, UINT, INT);
240 VOID WINAPI SHUpdateImageW(_In_ LPCWSTR, INT, UINT, INT);
241
242 INT
243 WINAPI
244 PickIconDlg(
245 _In_opt_ HWND,
246 _Inout_updates_(cchIconPath) LPWSTR,
247 UINT cchIconPath,
248 _Inout_opt_ int *);
249
250 #define SHUpdateImage WINELIB_NAME_AW(SHUpdateImage)
251 int WINAPI RestartDialog(_In_opt_ HWND, _In_opt_ LPCWSTR, DWORD);
252 int WINAPI RestartDialogEx(_In_opt_ HWND, _In_opt_ LPCWSTR, DWORD, DWORD);
253 BOOL WINAPI IsUserAnAdmin(void);
254
255 #define KF_FLAG_DEFAULT_PATH 0x00000400
256
257 #define SHFMT_ERROR 0xFFFFFFFFL /* Error on last format, drive may be formattable */
258 #define SHFMT_CANCEL 0xFFFFFFFEL /* Last format was cancelled */
259 #define SHFMT_NOFORMAT 0xFFFFFFFDL /* Drive is not formattable */
260
261 /* SHFormatDrive flags */
262 #define SHFMT_ID_DEFAULT 0xFFFF
263 #define SHFMT_OPT_FULL 1
264 #define SHFMT_OPT_SYSONLY 2
265
266 /* SHPathPrepareForWrite flags */
267 #define SHPPFW_NONE 0x00000000
268 #define SHPPFW_DIRCREATE 0x00000001
269 #define SHPPFW_DEFAULT SHPPFW_DIRCREATE
270 #define SHPPFW_ASKDIRCREATE 0x00000002
271 #define SHPPFW_IGNOREFILENAME 0x00000004
272 #define SHPPFW_NOWRITECHECK 0x00000008
273 #define SHPPFW_MEDIACHECKONLY 0x00000010
274
275 /* SHObjectProperties flags */
276 #define SHOP_PRINTERNAME 0x01
277 #define SHOP_FILEPATH 0x02
278 #define SHOP_VOLUMEGUID 0x04
279
280 BOOL
281 WINAPI
282 SHObjectProperties(
283 _In_opt_ HWND,
284 _In_ DWORD,
285 _In_ LPCWSTR,
286 _In_opt_ LPCWSTR);
287
288 #define PCS_FATAL 0x80000000
289 #define PCS_REPLACEDCHAR 0x00000001
290 #define PCS_REMOVEDCHAR 0x00000002
291 #define PCS_TRUNCATED 0x00000004
292 #define PCS_PATHTOOLONG 0x00000008
293
294 int WINAPI PathCleanupSpec(_In_opt_ LPCWSTR, _Inout_ LPWSTR);
295
296 /*****************************************************************************
297 * IContextMenu interface
298 */
299
300
301 /* DATAOBJECT_InitShellIDList*/
302 #define CFSTR_SHELLIDLISTA "Shell IDList Array" /* CF_IDLIST */
303 #define CFSTR_SHELLIDLISTOFFSETA "Shell Object Offsets" /* CF_OBJECTPOSITIONS */
304 #define CFSTR_NETRESOURCESA "Net Resource" /* CF_NETRESOURCE */
305 /* DATAOBJECT_InitFileGroupDesc */
306 #define CFSTR_FILEDESCRIPTORA "FileGroupDescriptor" /* CF_FILEGROUPDESCRIPTORA */
307 /* DATAOBJECT_InitFileContents*/
308 #define CFSTR_FILECONTENTSA "FileContents" /* CF_FILECONTENTS */
309 #define CFSTR_FILENAMEA "FileName" /* CF_FILENAMEA */
310 #define CFSTR_FILENAMEMAPA "FileNameMap" /* CF_FILENAMEMAPA */
311 #define CFSTR_PRINTERGROUPA "PrinterFriendlyName" /* CF_PRINTERS */
312 #define CFSTR_SHELLURLA "UniformResourceLocator"
313 #define CFSTR_INETURLA CFSTR_SHELLURLA
314 #define CFSTR_PREFERREDDROPEFFECTA "Preferred DropEffect"
315 #define CFSTR_PERFORMEDDROPEFFECTA "Performed DropEffect"
316 #define CFSTR_PASTESUCCEEDEDA "Paste Succeeded"
317 #define CFSTR_INDRAGLOOPA "InShellDragLoop"
318 #define CFSTR_DRAGCONTEXTA "DragContext"
319 #define CFSTR_MOUNTEDVOLUMEA "MountedVolume"
320 #define CFSTR_PERSISTEDDATAOBJECTA "PersistedDataObject"
321 #define CFSTR_TARGETCLSIDA "TargetCLSID"
322 #define CFSTR_AUTOPLAY_SHELLIDLISTSA "Autoplay Enumerated IDList Array"
323 #define CFSTR_LOGICALPERFORMEDDROPEFFECTA "Logical Performed DropEffect"
324
325 #if defined(__GNUC__)
326 # define CFSTR_SHELLIDLISTW \
327 (const WCHAR []){ 'S','h','e','l','l',' ','I','D','L','i','s','t',' ','A','r','r','a','y',0 }
328 # define CFSTR_SHELLIDLISTOFFSETW \
329 (const WCHAR []){ 'S','h','e','l','l',' ','O','b','j','e','c','t',' ','O','f','f','s','e','t','s',0 }
330 # define CFSTR_NETRESOURCESW \
331 (const WCHAR []){ 'N','e','t',' ','R','e','s','o','u','r','c','e',0 }
332 # define CFSTR_FILEDESCRIPTORW \
333 (const WCHAR []){ 'F','i','l','e','G','r','o','u','p','D','e','s','c','r','i','p','t','o','r','W',0 }
334 # define CFSTR_FILECONTENTSW \
335 (const WCHAR []){ 'F','i','l','e','C','o','n','t','e','n','t','s',0 }
336 # define CFSTR_FILENAMEW \
337 (const WCHAR []){ 'F','i','l','e','N','a','m','e','W',0 }
338 # define CFSTR_FILENAMEMAPW \
339 (const WCHAR []){ 'F','i','l','e','N','a','m','e','M','a','p','W',0 }
340 # define CFSTR_PRINTERGROUPW \
341 (const WCHAR []){ 'P','r','i','n','t','e','r','F','r','i','e','n','d','l','y','N','a','m','e',0 }
342 # define CFSTR_SHELLURLW \
343 (const WCHAR []){ 'U','n','i','f','o','r','m','R','e','s','o','u','r','c','e','L','o','c','a','t','o','r',0 }
344 # define CFSTR_INETURLW \
345 (const WCHAR []){ 'U','n','i','f','o','r','m','R','e','s','o','u','r','c','e','L','o','c','a','t','o','r','W',0 }
346 # define CFSTR_PREFERREDDROPEFFECTW \
347 (const WCHAR []){ 'P','r','e','f','e','r','r','e','d',' ','D','r','o','p','E','f','f','e','c','t',0 }
348 # define CFSTR_PERFORMEDDROPEFFECTW \
349 (const WCHAR []){ 'P','e','r','f','o','r','m','e','d',' ','D','r','o','p','E','f','f','e','c','t',0 }
350 # define CFSTR_PASTESUCCEEDEDW \
351 (const WCHAR []){ 'P','a','s','t','e',' ','S','u','c','c','e','e','d','e','d',0 }
352 # define CFSTR_INDRAGLOOPW \
353 (const WCHAR []){ 'I','n','S','h','e','l','l','D','r','a','g','L','o','o','p',0 }
354 # define CFSTR_DRAGCONTEXTW \
355 (const WCHAR []){ 'D','r','a','g','C','o','n','t','e','x','t',0 }
356 # define CFSTR_MOUNTEDVOLUMEW \
357 (const WCHAR []){ 'M','o','u','n','t','e','d','V','o','l','u','m','e',0 }
358 # define CFSTR_PERSISTEDDATAOBJECTW \
359 (const WCHAR []){ 'P','e','r','s','i','s','t','e','d','D','a','t','a','O','b','j','e','c','t',0 }
360 # define CFSTR_TARGETCLSIDW \
361 (const WCHAR []){ 'T','a','r','g','e','t','C','L','S','I','D',0 }
362 # define CFSTR_AUTOPLAY_SHELLIDLISTSW \
363 (const WCHAR []){ 'A','u','t','o','p','l','a','y',' ','E','n','u','m','e','r','a','t','e','d',\
364 ' ','I','D','L','i','s','t',' ','A','r','r','a','y',0 }
365 # define CFSTR_LOGICALPERFORMEDDROPEFFECTW \
366 (const WCHAR []){ 'L','o','g','i','c','a','l',' ','P','e','r','f','o','r','m','e','d',\
367 ' ','D','r','o','p','E','f','f','e','c','t',0 }
368 #elif defined(_MSC_VER)
369 # define CFSTR_SHELLIDLISTW L"Shell IDList Array"
370 # define CFSTR_SHELLIDLISTOFFSETW L"Shell Object Offsets"
371 # define CFSTR_NETRESOURCESW L"Net Resource"
372 # define CFSTR_FILEDESCRIPTORW L"FileGroupDescriptorW"
373 # define CFSTR_FILECONTENTSW L"FileContents"
374 # define CFSTR_FILENAMEW L"FileNameW"
375 # define CFSTR_FILENAMEMAPW L"FileNameMapW"
376 # define CFSTR_PRINTERGROUPW L"PrinterFriendlyName"
377 # define CFSTR_SHELLURLW L"UniformResourceLocator"
378 # define CFSTR_INETURLW L"UniformResourceLocatorW"
379 # define CFSTR_PREFERREDDROPEFFECTW L"Preferred DropEffect"
380 # define CFSTR_PERFORMEDDROPEFFECTW L"Performed DropEffect"
381 # define CFSTR_PASTESUCCEEDEDW L"Paste Succeeded"
382 # define CFSTR_INDRAGLOOPW L"InShellDragLoop"
383 # define CFSTR_DRAGCONTEXTW L"DragContext"
384 # define CFSTR_MOUNTEDVOLUMEW L"MountedVolume"
385 # define CFSTR_PERSISTEDDATAOBJECTW L"PersistedDataObject"
386 # define CFSTR_TARGETCLSIDW L"TargetCLSID"
387 # define CFSTR_AUTOPLAY_SHELLIDLISTSW L"Autoplay Enumerated IDList Array"
388 # define CFSTR_LOGICALPERFORMEDDROPEFFECTW L"Logical Performed DropEffect"
389 #else
390 static const WCHAR CFSTR_SHELLIDLISTW[] =
391 { 'S','h','e','l','l',' ','I','D','L','i','s','t',' ','A','r','r','a','y',0 };
392 static const WCHAR CFSTR_SHELLIDLISTOFFSETW[] =
393 { 'S','h','e','l','l',' ','O','b','j','e','c','t',' ','O','f','f','s','e','t','s',0 };
394 static const WCHAR CFSTR_NETRESOURCESW[] =
395 { 'N','e','t',' ','R','e','s','o','u','r','c','e',0 };
396 static const WCHAR CFSTR_FILEDESCRIPTORW[] =
397 { 'F','i','l','e','G','r','o','u','p','D','e','s','c','r','i','p','t','o','r','W',0 };
398 static const WCHAR CFSTR_FILECONTENTSW[] =
399 { 'F','i','l','e','C','o','n','t','e','n','t','s',0 };
400 static const WCHAR CFSTR_FILENAMEW[] =
401 { 'F','i','l','e','N','a','m','e','W',0 };
402 static const WCHAR CFSTR_FILENAMEMAPW[] =
403 { 'F','i','l','e','N','a','m','e','M','a','p','W',0 };
404 static const WCHAR CFSTR_PRINTERGROUPW[] =
405 { 'P','r','i','n','t','e','r','F','r','i','e','n','d','l','y','N','a','m','e',0 };
406 static const WCHAR CFSTR_SHELLURLW[] =
407 { 'U','n','i','f','o','r','m','R','e','s','o','u','r','c','e','L','o','c','a','t','o','r',0 };
408 static const WCHAR CFSTR_INETURLW[] =
409 { 'U','n','i','f','o','r','m','R','e','s','o','u','r','c','e','L','o','c','a','t','o','r','W',0 };
410 static const WCHAR CFSTR_PREFERREDDROPEFFECTW[] =
411 { 'P','r','e','f','e','r','r','e','d',' ','D','r','o','p','E','f','f','e','c','t',0 };
412 static const WCHAR CFSTR_PERFORMEDDROPEFFECTW[] =
413 { 'P','e','r','f','o','r','m','e','d',' ','D','r','o','p','E','f','f','e','c','t',0 };
414 static const WCHAR CFSTR_PASTESUCCEEDEDW[] =
415 { 'P','a','s','t','e',' ','S','u','c','c','e','e','d','e','d',0 };
416 static const WCHAR CFSTR_INDRAGLOOPW[] =
417 { 'I','n','S','h','e','l','l','D','r','a','g','L','o','o','p',0 };
418 static const WCHAR CFSTR_DRAGCONTEXTW[] =
419 { 'D','r','a','g','C','o','n','t','e','x','t',0 };
420 static const WCHAR CFSTR_MOUNTEDVOLUMEW[] =
421 { 'M','o','u','n','t','e','d','V','o','l','u','m','e',0 };
422 static const WCHAR CFSTR_PERSISTEDDATAOBJECTW[] =
423 { 'P','e','r','s','i','s','t','e','d','D','a','t','a','O','b','j','e','c','t',0 };
424 static const WCHAR CFSTR_TARGETCLSIDW[] =
425 { 'T','a','r','g','e','t','C','L','S','I','D',0 };
426 static const WCHAR CFSTR_AUTOPLAY_SHELLIDLISTSW[] =
427 { 'A','u','t','o','p','l','a','y',' ','E','n','u','m','e','r','a','t','e','d',
428 ' ','I','D','L','i','s','t',' ','A','r','r','a','y',0 };
429 static const WCHAR CFSTR_LOGICALPERFORMEDDROPEFFECTW[] =
430 { 'L','o','g','i','c','a','l',' ','P','e','r','f','o','r','m','e','d',
431 ' ','D','r','o','p','E','f','f','e','c','t',0 };
432 #endif
433
434 #define CFSTR_SHELLIDLIST WINELIB_NAME_AW(CFSTR_SHELLIDLIST)
435 #define CFSTR_SHELLIDLISTOFFSET WINELIB_NAME_AW(CFSTR_SHELLIDLISTOFFSET)
436 #define CFSTR_NETRESOURCES WINELIB_NAME_AW(CFSTR_NETRESOURCES)
437 #define CFSTR_FILEDESCRIPTOR WINELIB_NAME_AW(CFSTR_FILEDESCRIPTOR)
438 #define CFSTR_FILECONTENTS WINELIB_NAME_AW(CFSTR_FILECONTENTS)
439 #define CFSTR_FILENAME WINELIB_NAME_AW(CFSTR_FILENAME)
440 #define CFSTR_FILENAMEMAP WINELIB_NAME_AW(CFSTR_FILENAMEMAP)
441 #define CFSTR_PRINTERGROUP WINELIB_NAME_AW(CFSTR_PRINTERGROUP)
442 #define CFSTR_SHELLURL WINELIB_NAME_AW(CFSTR_SHELLURL)
443 #define CFSTR_INETURL WINELIB_NAME_AW(CFSTR_INETURL)
444 #define CFSTR_PREFERREDDROPEFFECT WINELIB_NAME_AW(CFSTR_PREFERREDDROPEFFECT)
445 #define CFSTR_PERFORMEDDROPEFFECT WINELIB_NAME_AW(CFSTR_PERFORMEDDROPEFFECT)
446 #define CFSTR_PASTESUCCEEDED WINELIB_NAME_AW(CFSTR_PASTESUCCEEDED)
447 #define CFSTR_INDRAGLOOP WINELIB_NAME_AW(CFSTR_INDRAGLOOP)
448 #define CFSTR_DRAGCONTEXT WINELIB_NAME_AW(CFSTR_DRAGCONTEXT)
449 #define CFSTR_MOUNTEDVOLUME WINELIB_NAME_AW(CFSTR_MOUNTEDVOLUME)
450 #define CFSTR_PERSISTEDDATAOBJECT WINELIB_NAME_AW(CFSTR_PERSISTEDDATAOBJECT)
451 #define CFSTR_TARGETCLSID WINELIB_NAME_AW(CFSTR_TARGETCLSID)
452 #define CFSTR_AUTOPLAY_SHELLIDLISTS WINELIB_NAME_AW(CFSTR_AUTOPLAY_SHELLIDLISTS)
453 #define CFSTR_LOGICALPERFORMEDDROPEFFECT WINELIB_NAME_AW(CFSTR_LOGICALPERFORMEDDROPEFFECT)
454
455 typedef struct
456 { UINT cidl;
457 UINT aoffset[1];
458 } CIDA, *LPIDA;
459
460 /************************************************************************
461 * IShellView interface
462 */
463
464 #define FCIDM_SHVIEWFIRST 0x0000
465 /* undocumented */
466 #define FCIDM_SHVIEW_ARRANGE 0x7001
467 #define FCIDM_SHVIEW_DELETE 0x7011
468 #define FCIDM_SHVIEW_PROPERTIES 0x7013
469 #define FCIDM_SHVIEW_CUT 0x7018
470 #define FCIDM_SHVIEW_COPY 0x7019
471 #define FCIDM_SHVIEW_INSERT 0x701A
472 #define FCIDM_SHVIEW_UNDO 0x701B
473 #define FCIDM_SHVIEW_INSERTLINK 0x701C
474 #define FCIDM_SHVIEW_COPYTO 0x701E
475 #define FCIDM_SHVIEW_MOVETO 0x701F
476 #define FCIDM_SHVIEW_SELECTALL 0x7021
477 #define FCIDM_SHVIEW_INVERTSELECTION 0x7022
478
479 #define FCIDM_SHVIEW_BIGICON 0x7029
480 #define FCIDM_SHVIEW_SMALLICON 0x702A
481 #define FCIDM_SHVIEW_LISTVIEW 0x702B
482 #define FCIDM_SHVIEW_REPORTVIEW 0x702C
483 /* 0x7030-0x703f are used by the shellbrowser */
484 #define FCIDM_SHVIEW_AUTOARRANGE 0x7031
485 #define FCIDM_SHVIEW_SNAPTOGRID 0x7032
486
487 #define FCIDM_SHVIEW_HELP 0x7041
488 #define FCIDM_SHVIEW_RENAME 0x7050
489 #define FCIDM_SHVIEW_CREATELINK 0x7051
490 #define FCIDM_SHVIEW_NEWLINK 0x7052
491 #define FCIDM_SHVIEW_NEWFOLDER 0x7053
492
493 #define FCIDM_SHVIEW_REFRESH 0x7100 /* FIXME */
494 #define FCIDM_SHVIEW_EXPLORE 0x7101 /* FIXME */
495 #define FCIDM_SHVIEW_OPEN 0x7102 /* FIXME */
496
497 #define FCIDM_SHVIEWLAST 0x7fff
498 #define FCIDM_BROWSERFIRST 0xA000
499 /* undocumented toolbar items from stddlg's*/
500 #define FCIDM_TB_UPFOLDER 0xA001
501 #define FCIDM_TB_NEWFOLDER 0xA002
502 #define FCIDM_TB_SMALLICON 0xA003
503 #define FCIDM_TB_REPORTVIEW 0xA004
504 #define FCIDM_TB_DESKTOP 0xA005 /* FIXME */
505
506 #define FCIDM_BROWSERLAST 0xbf00
507 #define FCIDM_GLOBALFIRST 0x8000
508 #define FCIDM_GLOBALLAST 0x9fff
509
510 /*
511 * Global submenu IDs and separator IDs
512 */
513 #define FCIDM_MENU_FILE (FCIDM_GLOBALFIRST+0x0000)
514 #define FCIDM_MENU_EDIT (FCIDM_GLOBALFIRST+0x0040)
515 #define FCIDM_MENU_VIEW (FCIDM_GLOBALFIRST+0x0080)
516 #define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081)
517 #define FCIDM_MENU_TOOLS (FCIDM_GLOBALFIRST+0x00c0)
518 #define FCIDM_MENU_TOOLS_SEP_GOTO (FCIDM_GLOBALFIRST+0x00c1)
519 #define FCIDM_MENU_HELP (FCIDM_GLOBALFIRST+0x0100)
520 #define FCIDM_MENU_FIND (FCIDM_GLOBALFIRST+0x0140)
521 #define FCIDM_MENU_EXPLORE (FCIDM_GLOBALFIRST+0x0150)
522 #define FCIDM_MENU_FAVORITES (FCIDM_GLOBALFIRST+0x0170)
523
524 /* control IDs known to the view */
525 #define FCIDM_TOOLBAR (FCIDM_BROWSERFIRST + 0)
526 #define FCIDM_STATUS (FCIDM_BROWSERFIRST + 1)
527
528 #define INTERFACE IShellDetails
529 DECLARE_INTERFACE_(IShellDetails, IUnknown)
530 {
531 /*** IUnknown methods ***/
532 STDMETHOD_(HRESULT,QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
533 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
534 STDMETHOD_(ULONG,Release) (THIS) PURE;
535 /*** IShellDetails methods ***/
536 STDMETHOD(GetDetailsOf)(THIS_ _In_opt_ PCUITEMID_CHILD pidl, UINT iColumn, _Out_ SHELLDETAILS *pDetails) PURE;
537 STDMETHOD(ColumnClick)(THIS_ UINT iColumn) PURE;
538 };
539 #undef INTERFACE
540
541 #if !defined(__cplusplus) || defined(CINTERFACE)
542 /*** IUnknown methods ***/
543 #define IShellDetails_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
544 #define IShellDetails_AddRef(p) (p)->lpVtbl->AddRef(p)
545 #define IShellDetails_Release(p) (p)->lpVtbl->Release(p)
546 /*** IShellDetails methods ***/
547 #define IShellDetails_GetDetailsOf(p,a,b,c) (p)->lpVtbl->GetDetailsOf(p,a,b,c)
548 #define IShellDetails_ColumnClick(p,a) (p)->lpVtbl->ColumnClick(p,a)
549 #endif
550
551 /* IQueryInfo interface */
552 #define INTERFACE IQueryInfo
553 DECLARE_INTERFACE_(IQueryInfo,IUnknown)
554 {
555 /*** IUnknown methods ***/
556 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
557 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
558 STDMETHOD_(ULONG,Release)(THIS) PURE;
559 /*** IQueryInfo methods ***/
560 STDMETHOD(GetInfoTip)(THIS_ DWORD dwFlags, _Outptr_ WCHAR** lppTips) PURE;
561 STDMETHOD(GetInfoFlags)(THIS_ _Out_ DWORD* lpFlags) PURE;
562 };
563 #undef INTERFACE
564
565 #if !defined(__cplusplus) || defined(CINTERFACE)
566 /*** IUnknown methods ***/
567 #define IQueryInfo_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
568 #define IQueryInfo_AddRef(p) (p)->lpVtbl->AddRef(p)
569 #define IQueryInfo_Release(p) (p)->lpVtbl->Release(p)
570 /*** IQueryInfo methods ***/
571 #define IQueryInfo_GetInfoTip(p,a,b) (p)->lpVtbl->GetInfoTip(p,a,b)
572 #define IQueryInfo_GetInfoFlags(p,a) (p)->lpVtbl->GetInfoFlags(p,a)
573 #endif
574
575 /* IInputObject interface */
576 #define INTERFACE IInputObject
577 DECLARE_INTERFACE_(IInputObject,IUnknown)
578 {
579 /*** IUnknown methods ***/
580 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
581 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
582 STDMETHOD_(ULONG,Release)(THIS) PURE;
583 /*** IInputObject methods ***/
584 STDMETHOD(UIActivateIO)(THIS_ BOOL bActivating, LPMSG lpMsg) PURE;
585 STDMETHOD(HasFocusIO)(THIS) PURE;
586 STDMETHOD(TranslateAcceleratorIO)(THIS_ LPMSG lpMsg) PURE;
587 };
588 #undef INTERFACE
589
590 #if !defined(__cplusplus) || defined(CINTERFACE)
591 /*** IUnknown methods ***/
592 #define IInputObject_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
593 #define IInputObject_AddRef(p) (p)->lpVtbl->AddRef(p)
594 #define IInputObject_Release(p) (p)->lpVtbl->Release(p)
595 /*** IInputObject methods ***/
596 #define IInputObject_UIActivateIO(p,a,b) (p)->lpVtbl->UIActivateIO(p,a,b)
597 #define IInputObject_HasFocusIO(p) (p)->lpVtbl->HasFocusIO(p)
598 #define IInputObject_TranslateAcceleratorIO(p,a) (p)->lpVtbl->TranslateAcceleratorIO(p,a)
599 #endif
600
601 /* IInputObjectSite interface */
602 #define INTERFACE IInputObjectSite
603 DECLARE_INTERFACE_(IInputObjectSite,IUnknown)
604 {
605 /*** IUnknown methods ***/
606 STDMETHOD_(HRESULT,QueryInterface) (THIS_ REFIID riid, void** ppvObject) PURE;
607 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
608 STDMETHOD_(ULONG,Release) (THIS) PURE;
609 /*** IInputObjectSite methods ***/
610 STDMETHOD(OnFocusChangeIS)(THIS_ LPUNKNOWN lpUnknown, BOOL bFocus) PURE;
611 };
612 #undef INTERFACE
613
614 #if !defined(__cplusplus) || defined(CINTERFACE)
615 /*** IUnknown methods ***/
616 #define IInputObjectSite_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
617 #define IInputObjectSite_AddRef(p) (p)->lpVtbl->AddRef(p)
618 #define IInputObjectSite_Release(p) (p)->lpVtbl->Release(p)
619 /*** IInputObject methods ***/
620 #define IInputObjectSite_OnFocusChangeIS(p,a,b) (p)->lpVtbl->OnFocusChangeIS(p,a,b)
621 #endif
622
623 /* IObjMgr interface */
624 #define INTERFACE IObjMgr
625 DECLARE_INTERFACE_(IObjMgr,IUnknown)
626 {
627 /*** IUnknown methods ***/
628 STDMETHOD_(HRESULT,QueryInterface) (THIS_ REFIID riid, void** ppvObject) PURE;
629 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
630 STDMETHOD_(ULONG,Release) (THIS) PURE;
631 /*** IObjMgr methods ***/
632 STDMETHOD(Append)(THIS_ _In_ LPUNKNOWN punk) PURE;
633 STDMETHOD(Remove)(THIS_ _In_ LPUNKNOWN punk) PURE;
634 };
635 #undef INTERFACE
636
637 #if !defined(__cplusplus) || defined(CINTERFACE)
638 /*** IUnknown methods ***/
639 #define IObjMgr_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
640 #define IObjMgr_AddRef(p) (p)->lpVtbl->AddRef(p)
641 #define IObjMgr_Release(p) (p)->lpVtbl->Release(p)
642 /*** IObjMgr methods ***/
643 #define IObjMgr_Append(p,a) (p)->lpVtbl->Append(p,a)
644 #define IObjMgr_Remove(p,a) (p)->lpVtbl->Remove(p,a)
645 #endif
646
647 /* ICurrentWorkingDirectory interface */
648 #define INTERFACE ICurrentWorkingDirectory
649 DECLARE_INTERFACE_(ICurrentWorkingDirectory,IUnknown)
650 {
651 /*** IUnknown methods ***/
652 STDMETHOD_(HRESULT,QueryInterface) (THIS_ REFIID riid, void** ppvObject) PURE;
653 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
654 STDMETHOD_(ULONG,Release) (THIS) PURE;
655 /*** ICurrentWorkingDirectory methods ***/
656 STDMETHOD(GetDirectory)(THIS_ _Out_writes_(cchSize) PWSTR pwzPath, DWORD cchSize) PURE;
657 STDMETHOD(SetDirectory)(THIS_ _In_ PCWSTR pwzPath) PURE;
658 };
659 #undef INTERFACE
660
661 #if !defined(__cplusplus) || defined(CINTERFACE)
662 /*** IUnknown methods ***/
663 #define ICurrentWorkingDirectory_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
664 #define ICurrentWorkingDirectory_AddRef(p) (p)->lpVtbl->AddRef(p)
665 #define ICurrentWorkingDirectory_Release(p) (p)->lpVtbl->Release(p)
666 /*** ICurrentWorkingDirectory methods ***/
667 #define ICurrentWorkingDirectory_GetDirectory(p,a,b) (p)->lpVtbl->GetDirectory(p,a,b)
668 #define ICurrentWorkingDirectory_SetDirectory(p,a) (p)->lpVtbl->SetDirectory(p,a)
669 #endif
670
671 /* IACList interface */
672 #define INTERFACE IACList
673 DECLARE_INTERFACE_(IACList,IUnknown)
674 {
675 /*** IUnknown methods ***/
676 STDMETHOD_(HRESULT,QueryInterface) (THIS_ REFIID riid, void** ppvObject) PURE;
677 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
678 STDMETHOD_(ULONG,Release) (THIS) PURE;
679 /*** IACList methods ***/
680 STDMETHOD(Expand)(THIS_ _In_ LPCOLESTR str) PURE;
681 };
682 #undef INTERFACE
683
684 #if !defined(__cplusplus) || defined(CINTERFACE)
685 /*** IUnknown methods ***/
686 #define IACList_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
687 #define IACList_AddRef(p) (p)->lpVtbl->AddRef(p)
688 #define IACList_Release(p) (p)->lpVtbl->Release(p)
689 /*** IACList methods ***/
690 #define IACList_Expand(p,a) (p)->lpVtbl->Expand(p,a)
691 #endif
692
693 /* IACList2 interface */
694
695 #define ACLO_NONE 0x00000000
696 #define ACLO_CURRENTDIR 0x00000001
697 #define ACLO_MYCOMPUTER 0x00000002
698 #define ACLO_DESKTOP 0x00000004
699 #define ACLO_FAVORITES 0x00000008
700 #define ACLO_FILESYSONLY 0x00000010
701 #define ACLO_FILESYSDIRS 0x00000020
702
703 #define INTERFACE IACList2
704 DECLARE_INTERFACE_(IACList2,IACList)
705 {
706 /*** IUnknown methods ***/
707 STDMETHOD_(HRESULT,QueryInterface) (THIS_ REFIID riid, void** ppvObject) PURE;
708 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
709 STDMETHOD_(ULONG,Release) (THIS) PURE;
710 /*** IACList methods ***/
711 STDMETHOD(Expand)(THIS_ LPCOLESTR str) PURE;
712 /*** IACList2 methods ***/
713 STDMETHOD(SetOptions)(THIS_ DWORD dwFlag) PURE;
714 STDMETHOD(GetOptions)(THIS_ _Out_ DWORD* pdwFlag) PURE;
715 };
716 #undef INTERFACE
717
718 #if !defined(__cplusplus) || defined(CINTERFACE)
719 /*** IUnknown methods ***/
720 #define IACList2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
721 #define IACList2_AddRef(p) (p)->lpVtbl->AddRef(p)
722 #define IACList2_Release(p) (p)->lpVtbl->Release(p)
723 /*** IACList2 methods ***/
724 #define IACList2_GetOptions(p,a) (p)->lpVtbl->GetOptions(p,a)
725 #define IACList2_SetOptions(p,a) (p)->lpVtbl->SetOptions(p,a)
726 #endif
727
728 /****************************************************************************
729 * IShellFolderViewCB interface
730 */
731
732 #define INTERFACE IShellFolderViewCB
733 DECLARE_INTERFACE_(IShellFolderViewCB,IUnknown)
734 {
735 /*** IUnknown methods ***/
736 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
737 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
738 STDMETHOD_(ULONG,Release)(THIS) PURE;
739 /*** IShellFolderViewCB methods ***/
740 STDMETHOD(MessageSFVCB)(THIS_ UINT uMsg, WPARAM wParam, LPARAM lParam) PURE;
741 };
742 #undef INTERFACE
743
744 #if !defined(__cplusplus) || defined(CINTERFACE)
745 /*** IUnknown methods ***/
746 #define IShellFolderViewCB_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
747 #define IShellFolderViewCB_AddRef(p) (p)->lpVtbl->AddRef(p)
748 #define IShellFolderViewCB_Release(p) (p)->lpVtbl->Release(p)
749 /*** IShellFolderViewCB methods ***/
750 #define IShellFolderViewCB_MessageSFVCB(p,a,b,c) (p)->lpVtbl->MessageSFVCB(p,a,b,c)
751 #endif
752
753 /****************************************************************************
754 * IShellFolderView interface
755 */
756
757 #include <pshpack8.h>
758
759 typedef struct _ITEMSPACING
760 {
761 int cxSmall;
762 int cySmall;
763 int cxLarge;
764 int cyLarge;
765 } ITEMSPACING;
766
767 #include <poppack.h>
768
769 #define INTERFACE IShellFolderView
770 DEFINE_GUID(IID_IShellFolderView,0x37a378c0,0xf82d,0x11ce,0xae,0x65,0x08,0x00,0x2b,0x2e,0x12,0x62);
771 DECLARE_INTERFACE_(IShellFolderView, IUnknown)
772 {
773 /*** IUnknown methods ***/
774 STDMETHOD_(HRESULT,QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
775 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
776 STDMETHOD_(ULONG,Release) (THIS) PURE;
777
778 /*** IShellFolderView methods ***/
779 STDMETHOD(Rearrange) (THIS_ LPARAM lParamSort) PURE;
780 STDMETHOD(GetArrangeParam) (THIS_ _Out_ LPARAM *plParamSort) PURE;
781 STDMETHOD(ArrangeGrid) (THIS) PURE;
782 STDMETHOD(AutoArrange) (THIS) PURE;
783 STDMETHOD(GetAutoArrange) (THIS) PURE;
784 STDMETHOD(AddObject) (THIS_ _In_ PITEMID_CHILD pidl, _Out_ UINT *puItem) PURE;
785 STDMETHOD(GetObject) (THIS_ _Outptr_ PITEMID_CHILD *ppidl, UINT uItem) PURE;
786 STDMETHOD(RemoveObject) (THIS_ _In_opt_ PITEMID_CHILD pidl, _Out_ UINT *puItem) PURE;
787 STDMETHOD(GetObjectCount) (THIS_ _Out_ UINT *puCount) PURE;
788 STDMETHOD(SetObjectCount) (THIS_ UINT uCount, UINT dwFlags) PURE;
789 STDMETHOD(UpdateObject) (THIS_ _In_ PITEMID_CHILD pidlOld, _In_ PITEMID_CHILD pidlNew, _Out_ UINT *puItem) PURE;
790 STDMETHOD(RefreshObject) (THIS_ _In_ PITEMID_CHILD pidl, _Out_ UINT *puItem) PURE;
791 STDMETHOD(SetRedraw) (THIS_ BOOL bRedraw) PURE;
792 STDMETHOD(GetSelectedCount) (THIS_ _Out_ UINT *puSelected) PURE;
793 STDMETHOD(GetSelectedObjects) (THIS_ _Outptr_result_buffer_(*puItems) PCUITEMID_CHILD **pppidl, _Out_ UINT *puItems) PURE;
794 STDMETHOD(IsDropOnSource) (THIS_ _In_opt_ IDropTarget *pDropTarget) PURE;
795 STDMETHOD(GetDragPoint) (THIS_ _Out_ POINT *ppt) PURE;
796 STDMETHOD(GetDropPoint) (THIS_ _Out_ POINT *ppt) PURE;
797 STDMETHOD(MoveIcons) (THIS_ _In_ IDataObject *pDataObject) PURE;
798 STDMETHOD(SetItemPos) (THIS_ _In_ PCUITEMID_CHILD pidl, _In_ POINT *ppt) PURE;
799 STDMETHOD(IsBkDropTarget) (THIS_ _In_opt_ IDropTarget *pDropTarget) PURE;
800 STDMETHOD(SetClipboard) (THIS_ BOOL bMove) PURE;
801 STDMETHOD(SetPoints) (THIS_ _In_ IDataObject *pDataObject) PURE;
802 STDMETHOD(GetItemSpacing) (THIS_ _Out_ ITEMSPACING *pSpacing) PURE;
803 STDMETHOD(SetCallback) (THIS_ _In_opt_ IShellFolderViewCB* pNewCB, _Outptr_result_maybenull_ IShellFolderViewCB** ppOldCB) PURE;
804 STDMETHOD(Select) ( THIS_ UINT dwFlags ) PURE;
805 STDMETHOD(QuerySupport) (THIS_ _Inout_ UINT * pdwSupport) PURE;
806 STDMETHOD(SetAutomationObject)(THIS_ _In_opt_ IDispatch* pdisp) PURE;
807 };
808 #undef INTERFACE
809
810 #if !defined(__cplusplus) || defined(CINTERFACE)
811 /*** IUnknown methods ***/
812 #define IShellFolderView_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
813 #define IShellFolderView_AddRef(p) (p)->lpVtbl->AddRef(p)
814 #define IShellFolderView_Release(p) (p)->lpVtbl->Release(p)
815 /*** IShellFolderView methods ***/
816 #define IShellFolderView_Rearrange(p,a) (p)->lpVtbl->Rearrange(p,a)
817 #define IShellFolderView_GetArrangeParam(p,a) (p)->lpVtbl->GetArrangeParam(p,a)
818 #define IShellFolderView_ArrangeGrid(p) (p)->lpVtbl->ArrangeGrid(p)
819 #define IShellFolderView_AutoArrange(p) (p)->lpVtbl->AutoArrange(p)
820 #define IShellFolderView_GetAutoArrange(p) (p)->lpVtbl->GetAutoArrange(p)
821 #define IShellFolderView_AddObject(p,a,b) (p)->lpVtbl->AddObject(p,a,b)
822 #define IShellFolderView_GetObject(p,a,b) (p)->lpVtbl->GetObject(p,a,b)
823 #define IShellFolderView_RemoveObject(p,a,b) (p)->lpVtbl->RemoveObject(p,a,b)
824 #define IShellFolderView_GetObjectCount(p,a) (p)->lpVtbl->GetObjectCount(p,a)
825 #define IShellFolderView_SetObjectCount(p,a,b) (p)->lpVtbl->SetObjectCount(p,a,b)
826 #define IShellFolderView_UpdateObject(p,a,b,c) (p)->lpVtbl->UpdateObject(p,a,b,c)
827 #define IShellFolderView_RefreshObject(p,a,b) (p)->lpVtbl->RefreshObject(p,a,b)
828 #define IShellFolderView_SetRedraw(p,a) (p)->lpVtbl->SetRedraw(p,a)
829 #define IShellFolderView_GetSelectedCount(p,a) (p)->lpVtbl->GetSelectedCount(p,a)
830 #define IShellFolderView_GetSelectedObjects(p,a,b) (p)->lpVtbl->GetSelectedObjects(p,a,b)
831 #define IShellFolderView_IsDropOnSource(p,a) (p)->lpVtbl->IsDropOnSource(p,a)
832 #define IShellFolderView_GetDragPoint(p,a) (p)->lpVtbl->GetDragPoint(p,a)
833 #define IShellFolderView_GetDropPoint(p,a) (p)->lpVtbl->GetDropPoint(p,a)
834 #define IShellFolderView_MoveIcons(p,a) (p)->lpVtbl->MoveIcons(p,a)
835 #define IShellFolderView_SetItemPos(p,a,b) (p)->lpVtbl->SetItemPos(p,a,b)
836 #define IShellFolderView_DropTarget(p,a) (p)->lpVtbl->DropTarget(p,a)
837 #define IShellFolderView_SetClipboard(p,a) (p)->lpVtbl->SetClipboard(p,a)
838 #define IShellFolderView_SetPoints(p,a) (p)->lpVtbl->SetPoints(p,a)
839 #define IShellFolderView_GetItemSpacing(p,a) (p)->lpVtbl->GetItemSpacing(p,a)
840 #define IShellFolderView_SetCallback(p,a) (p)->lpVtbl->SetCallback(p,a)
841 #define IShellFolderView_Select(p,a) (p)->lpVtbl->Select(p,a)
842 #define IShellFolderView_QuerySupport(p,a) (p)->lpVtbl->QuerySupport(p,a)
843 #define IShellFolderView_SetAutomationObject(p,a) (p)->lpVtbl->SetAutomationObject(p,a)
844 #endif
845
846 /* IProgressDialog interface */
847 #define PROGDLG_NORMAL 0x00000000
848 #define PROGDLG_MODAL 0x00000001
849 #define PROGDLG_AUTOTIME 0x00000002
850 #define PROGDLG_NOTIME 0x00000004
851 #define PROGDLG_NOMINIMIZE 0x00000008
852 #define PROGDLG_NOPROGRESSBAR 0x00000010
853 #define PROGDLG_MARQUEEPROGRESS 0x00000020
854 #define PROGDLG_NOCANCEL 0x00000040
855
856 #define PDTIMER_RESET 0x00000001
857 #define PDTIMER_PAUSE 0x00000002
858 #define PDTIMER_RESUME 0x00000003
859
860 #define INTERFACE IProgressDialog
861 DECLARE_INTERFACE_(IProgressDialog,IUnknown)
862 {
863 /*** IUnknown methods ***/
864 STDMETHOD_(HRESULT,QueryInterface) (THIS_ REFIID riid, void** ppvObject) PURE;
865 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
866 STDMETHOD_(ULONG,Release) (THIS) PURE;
867 /*** IProgressDialog methods ***/
868 STDMETHOD(StartProgressDialog)(THIS_ _In_opt_ HWND hwndParent, _In_opt_ IUnknown *punkEnableModeless, DWORD dwFlags, _Reserved_ LPCVOID reserved) PURE;
869 STDMETHOD(StopProgressDialog)(THIS) PURE;
870 STDMETHOD(SetTitle)(THIS_ _In_ LPCWSTR pwzTitle) PURE;
871 STDMETHOD(SetAnimation)(THIS_ _In_opt_ HINSTANCE hInstance, UINT uiResourceId) PURE;
872 STDMETHOD_(BOOL,HasUserCancelled)(THIS) PURE;
873 STDMETHOD(SetProgress)(THIS_ DWORD dwCompleted, DWORD dwTotal) PURE;
874 STDMETHOD(SetProgress64)(THIS_ ULONGLONG ullCompleted, ULONGLONG ullTotal) PURE;
875 STDMETHOD(SetLine)(THIS_ DWORD dwLineNum, _In_ LPCWSTR pwzString, BOOL bPath, _Reserved_ LPCVOID reserved) PURE;
876 STDMETHOD(SetCancelMsg)(THIS_ _In_ LPCWSTR pwzCancelMsg, _Reserved_ LPCVOID reserved) PURE;
877 STDMETHOD(Timer)(THIS_ DWORD dwTimerAction, _Reserved_ LPCVOID reserved) PURE;
878 };
879 #undef INTERFACE
880
881 #if !defined(__cplusplus) || defined(CINTERFACE)
882 /*** IUnknown methods ***/
883 #define IProgressDialog_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
884 #define IProgressDialog_AddRef(p) (p)->lpVtbl->AddRef(p)
885 #define IProgressDialog_Release(p) (p)->lpVtbl->Release(p)
886 /*** IProgressDialog methods ***/
887 #define IProgressDialog_StartProgressDialog(p,a,b,c,d) (p)->lpVtbl->StartProgressDialog(p,a,b,c,d)
888 #define IProgressDialog_StopProgressDialog(p) (p)->lpVtbl->StopProgressDialog(p)
889 #define IProgressDialog_SetTitle(p,a) (p)->lpVtbl->SetTitle(p,a)
890 #define IProgressDialog_SetAnimation(p,a,b) (p)->lpVtbl->SetAnimation(p,a,b)
891 #define IProgressDialog_HasUserCancelled(p) (p)->lpVtbl->HasUserCancelled(p)
892 #define IProgressDialog_SetProgress(p,a,b) (p)->lpVtbl->SetProgress(p,a,b)
893 #define IProgressDialog_SetProgress64(p,a,b) (p)->lpVtbl->SetProgress64(p,a,b)
894 #define IProgressDialog_SetLine(p,a,b,c,d) (p)->lpVtbl->SetLine(p,a,b,c,d)
895 #define IProgressDialog_SetCancelMsg(p,a,b) (p)->lpVtbl->SetCancelMsg(p,a,b)
896 #define IProgressDialog_Timer(p,a,b) (p)->lpVtbl->Timer(p,a,b)
897 #endif
898
899
900 /* IDeskBarClient interface */
901 #define INTERFACE IDeskBarClient
902 DECLARE_INTERFACE_(IDeskBarClient,IOleWindow)
903 {
904 /*** IUnknown methods ***/
905 STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
906 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
907 STDMETHOD_(ULONG,Release)(THIS) PURE;
908 /*** IOleWindow methods ***/
909 STDMETHOD_(HRESULT,GetWindow)(THIS_ HWND*) PURE;
910 STDMETHOD_(HRESULT,ContextSensitiveHelp)(THIS_ BOOL) PURE;
911 /*** IDeskBarClient methods ***/
912 STDMETHOD_(HRESULT,SetDeskBarSite)(THIS_ _In_opt_ IUnknown*) PURE;
913 STDMETHOD_(HRESULT,SetModeDBC)(THIS_ DWORD) PURE;
914 STDMETHOD_(HRESULT,UIActivateDBC)(THIS_ DWORD) PURE;
915 STDMETHOD_(HRESULT,GetSize)(THIS_ DWORD, _Out_ LPRECT) PURE;
916 };
917 #undef INTERFACE
918
919 #if !defined(__cplusplus) || defined(CINTERFACE)
920 /*** IUnknown methods ***/
921 #define IDeskBarClient_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
922 #define IDeskBarClient_AddRef(p) (p)->lpVtbl->AddRef(p)
923 #define IDeskBarClient_Release(p) (p)->lpVtbl->Release(p)
924 /*** IOleWindow methods ***/
925 #define IDeskBarClient_GetWindow(p,a) (p)->lpVtbl->GetWindow(p,a)
926 #define IDeskBarClient_ContextSensitiveHelp(p,a) (p)->lpVtbl->ContextSensitiveHelp(p,a)
927 /*** IOleWindow IDeskBarClient ***/
928 #define IDeskBarClient_SetDeskBarSite(p,a) (p)->lpVtbl->SetDeskBarSite(p,a)
929 #define IDeskBarClient_SetModeDBC(p,a) (p)->lpVtbl->SetModeDBC(p,a)
930 #define IDeskBarClient_UIActivateDBC(p,a) (p)->lpVtbl->UIActivateDBC(p,a)
931 #define IDeskBarClient_GetSize(p,a,b) (p)->lpVtbl->GetSize(p,a,b)
932 #endif
933
934 #define DBC_GS_IDEAL 0
935 #define DBC_GS_SIZEDOWN 1
936
937 #define DBC_HIDE 0
938 #define DBC_SHOW 1
939 #define DBC_SHOWOBSCURE 2
940
941
942 /****************************************************************************
943 * SHAddToRecentDocs API
944 */
945 #define SHARD_PIDL 0x00000001L
946 #define SHARD_PATHA 0x00000002L
947 #define SHARD_PATHW 0x00000003L
948 #define SHARD_PATH WINELIB_NAME_AW(SHARD_PATH)
949
950 void WINAPI SHAddToRecentDocs(UINT, _In_opt_ LPCVOID);
951
952 /****************************************************************************
953 * SHBrowseForFolder API
954 */
955 typedef INT (CALLBACK *BFFCALLBACK)(HWND,UINT,LPARAM,LPARAM);
956
957 #include <pshpack8.h>
958
959 typedef struct tagBROWSEINFOA {
960 HWND hwndOwner;
961 LPCITEMIDLIST pidlRoot;
962 LPSTR pszDisplayName;
963 LPCSTR lpszTitle;
964 UINT ulFlags;
965 BFFCALLBACK lpfn;
966 LPARAM lParam;
967 INT iImage;
968 } BROWSEINFOA, *PBROWSEINFOA, *LPBROWSEINFOA;
969
970 typedef struct tagBROWSEINFOW {
971 HWND hwndOwner;
972 LPCITEMIDLIST pidlRoot;
973 LPWSTR pszDisplayName;
974 LPCWSTR lpszTitle;
975 UINT ulFlags;
976 BFFCALLBACK lpfn;
977 LPARAM lParam;
978 INT iImage;
979 } BROWSEINFOW, *PBROWSEINFOW, *LPBROWSEINFOW;
980
981 #define BROWSEINFO WINELIB_NAME_AW(BROWSEINFO)
982 #define PBROWSEINFO WINELIB_NAME_AW(PBROWSEINFO)
983 #define LPBROWSEINFO WINELIB_NAME_AW(LPBROWSEINFO)
984
985 #include <poppack.h>
986
987 /* Browsing for directory. */
988 #define BIF_RETURNONLYFSDIRS 0x0001
989 #define BIF_DONTGOBELOWDOMAIN 0x0002
990 #define BIF_STATUSTEXT 0x0004
991 #define BIF_RETURNFSANCESTORS 0x0008
992 #define BIF_EDITBOX 0x0010
993 #define BIF_VALIDATE 0x0020
994 #define BIF_NEWDIALOGSTYLE 0x0040
995 #define BIF_USENEWUI (BIF_NEWDIALOGSTYLE | BIF_EDITBOX)
996 #define BIF_BROWSEINCLUDEURLS 0x0080
997 #define BIF_UAHINT 0x0100
998 #define BIF_NONEWFOLDERBUTTON 0x0200
999 #define BIF_NOTRANSLATETARGETS 0x0400
1000
1001 #define BIF_BROWSEFORCOMPUTER 0x1000
1002 #define BIF_BROWSEFORPRINTER 0x2000
1003 #define BIF_BROWSEINCLUDEFILES 0x4000
1004 #define BIF_SHAREABLE 0x8000
1005
1006 /* message from browser */
1007 #define BFFM_INITIALIZED 1
1008 #define BFFM_SELCHANGED 2
1009 #define BFFM_VALIDATEFAILEDA 3
1010 #define BFFM_VALIDATEFAILEDW 4
1011 #define BFFM_IUNKNOWN 5
1012
1013 /* messages to browser */
1014 #define BFFM_SETSTATUSTEXTA (WM_USER+100)
1015 #define BFFM_ENABLEOK (WM_USER+101)
1016 #define BFFM_SETSELECTIONA (WM_USER+102)
1017 #define BFFM_SETSELECTIONW (WM_USER+103)
1018 #define BFFM_SETSTATUSTEXTW (WM_USER+104)
1019 #define BFFM_SETOKTEXT (WM_USER+105)
1020 #define BFFM_SETEXPANDED (WM_USER+106)
1021
1022 LPITEMIDLIST WINAPI SHBrowseForFolderA(_In_ LPBROWSEINFOA lpbi);
1023 LPITEMIDLIST WINAPI SHBrowseForFolderW(_In_ LPBROWSEINFOW lpbi);
1024 #define SHBrowseForFolder WINELIB_NAME_AW(SHBrowseForFolder)
1025
1026 #define BFFM_SETSTATUSTEXT WINELIB_NAME_AW(BFFM_SETSTATUSTEXT)
1027 #define BFFM_SETSELECTION WINELIB_NAME_AW(BFFM_SETSELECTION)
1028 #define BFFM_VALIDATEFAILED WINELIB_NAME_AW(BFFM_VALIDATEFAILED)
1029
1030 /**********************************************************************
1031 * SHCreateShellFolderViewEx API
1032 */
1033
1034 typedef HRESULT
1035 (CALLBACK *LPFNVIEWCALLBACK)(
1036 _In_ IShellView* dwUser,
1037 _In_ IShellFolder* pshf,
1038 _In_ HWND hWnd,
1039 UINT uMsg,
1040 WPARAM wParam,
1041 LPARAM lParam);
1042
1043 #include <pshpack8.h>
1044
1045 typedef struct _CSFV
1046 {
1047 UINT cbSize;
1048 IShellFolder* pshf;
1049 IShellView* psvOuter;
1050 LPCITEMIDLIST pidl;
1051 LONG lEvents;
1052 LPFNVIEWCALLBACK pfnCallback;
1053 FOLDERVIEWMODE fvm;
1054 } CSFV, *LPCSFV;
1055
1056 #include <poppack.h>
1057
1058 HRESULT
1059 WINAPI
1060 SHCreateShellFolderViewEx(
1061 _In_ LPCSFV pshfvi,
1062 _Outptr_ IShellView **ppshv);
1063
1064 /* SHCreateShellFolderViewEx callback messages */
1065 #define SFVM_MERGEMENU 1
1066 #define SFVM_INVOKECOMMAND 2
1067 #define SFVM_GETHELPTEXT 3
1068 #define SFVM_GETTOOLTIPTEXT 4
1069 #define SFVM_GETBUTTONINFO 5
1070 #define SFVM_GETBUTTONS 6
1071 #define SFVM_INITMENUPOPUP 7
1072 #define SFVM_SELECTIONCHANGED 8 /* undocumented */
1073 #define SFVM_DRAWMENUITEM 9 /* undocumented */
1074 #define SFVM_MEASUREMENUITEM 10 /* undocumented */
1075 #define SFVM_EXITMENULOOP 11 /* undocumented */
1076 #define SFVM_VIEWRELEASE 12 /* undocumented */
1077 #define SFVM_GETNAMELENGTH 13 /* undocumented */
1078 #define SFVM_FSNOTIFY 14
1079 #define SFVM_WINDOWCREATED 15
1080 #define SFVM_WINDOWCLOSING 16 /* undocumented */
1081 #define SFVM_LISTREFRESHED 17 /* undocumented */
1082 #define SFVM_WINDOWFOCUSED 18 /* undocumented */
1083 #define SFVM_REGISTERCOPYHOOK 20 /* undocumented */
1084 #define SFVM_COPYHOOKCALLBACK 21 /* undocumented */
1085 #define SFVM_GETDETAILSOF 23
1086 #define SFVM_COLUMNCLICK 24
1087 #define SFVM_QUERYFSNOTIFY 25
1088 #define SFVM_DEFITEMCOUNT 26
1089 #define SFVM_DEFVIEWMODE 27
1090 #define SFVM_UNMERGEFROMMENU 28
1091 #define SFVM_ADDINGOBJECT 29 /* undocumented */
1092 #define SFVM_REMOVINGOBJECT 30 /* undocumented */
1093 #define SFVM_UPDATESTATUSBAR 31
1094 #define SFVM_BACKGROUNDENUM 32
1095 #define SFVM_GETCOMMANDDIR 33 /* undocumented */
1096 #define SFVM_GETCOLUMNSTREAM 34 /* undocumented */
1097 #define SFVM_CANSELECTALL 35 /* undocumented */
1098 #define SFVM_DIDDRAGDROP 36
1099 #define SFVM_ISSTRICTREFRESH 37 /* undocumented */
1100 #define SFVM_ISCHILDOBJECT 38 /* undocumented */
1101 #define SFVM_SETISFV 39
1102 #define SFVM_GETEXTVIEWS 40 /* undocumented */
1103 #define SFVM_THISIDLIST 41
1104 #define SFVM_ADDPROPERTYPAGES 47
1105 #define SFVM_BACKGROUNDENUMDONE 48
1106 #define SFVM_GETNOTIFY 49
1107 #define SFVM_GETSORTDEFAULTS 53
1108 #define SFVM_SIZE 57
1109 #define SFVM_GETZONE 58
1110 #define SFVM_GETPANE 59
1111 #define SFVM_GETHELPTOPIC 63
1112 #define SFVM_GETANIMATION 68
1113 #define SFVM_GET_CUSTOMVIEWINFO 77 /* undocumented */
1114 #define SFVM_ENUMERATEDITEMS 79 /* undocumented */
1115 #define SFVM_GET_VIEW_DATA 80 /* undocumented */
1116 #define SFVM_GET_WEBVIEW_LAYOUT 82 /* undocumented */
1117 #define SFVM_GET_WEBVIEW_CONTENT 83 /* undocumented */
1118 #define SFVM_GET_WEBVIEW_TASKS 84 /* undocumented */
1119 #define SFVM_GET_WEBVIEW_THEME 86 /* undocumented */
1120 #define SFVM_GETDEFERREDVIEWSETTINGS 92 /* undocumented */
1121
1122 #include <pshpack8.h>
1123
1124 typedef struct _SFV_CREATE
1125 {
1126 UINT cbSize;
1127 IShellFolder *pshf;
1128 IShellView *psvOuter;
1129 IShellFolderViewCB *psfvcb;
1130 } SFV_CREATE;
1131
1132 #include <poppack.h>
1133
1134 HRESULT
1135 WINAPI
1136 SHCreateShellFolderView(
1137 _In_ const SFV_CREATE *pscfv,
1138 _Outptr_ IShellView **ppsv);
1139
1140 /* Types and definitions for the SFM_* parameters */
1141 #include <pshpack8.h>
1142
1143 #define QCMINFO_PLACE_BEFORE 0
1144 #define QCMINFO_PLACE_AFTER 1
1145 typedef struct _QCMINFO_IDMAP_PLACEMENT
1146 {
1147 UINT id;
1148 UINT fFlags;
1149 } QCMINFO_IDMAP_PLACEMENT;
1150
1151 typedef struct _QCMINFO_IDMAP
1152 {
1153 UINT nMaxIds;
1154 QCMINFO_IDMAP_PLACEMENT pIdList[1];
1155 } QCMINFO_IDMAP;
1156
1157 typedef struct _QCMINFO
1158 {
1159 HMENU hmenu;
1160 UINT indexMenu;
1161 UINT idCmdFirst;
1162 UINT idCmdLast;
1163 QCMINFO_IDMAP const* pIdMap;
1164 } QCMINFO, *LPQCMINFO;
1165
1166 #define TBIF_DEFAULT 0x00000000
1167 #define TBIF_APPEND 0x00000000
1168 #define TBIF_PREPEND 0x00000001
1169 #define TBIF_REPLACE 0x00000002
1170 #define TBIF_INTERNETBAR 0x00010000
1171 #define TBIF_STANDARDTOOLBAR 0x00020000
1172 #define TBIF_NOTOOLBAR 0x00030000
1173
1174 typedef struct _TBINFO
1175 {
1176 UINT cbuttons;
1177 UINT uFlags;
1178 } TBINFO, *LPTBINFO;
1179
1180 #include <poppack.h>
1181
1182 /****************************************************************************
1183 * SHShellFolderView_Message API
1184 */
1185
1186 LRESULT
1187 WINAPI
1188 SHShellFolderView_Message(
1189 _In_ HWND hwndCabinet,
1190 UINT uMessage,
1191 LPARAM lParam);
1192
1193 /* SHShellFolderView_Message messages */
1194 #define SFVM_REARRANGE 0x0001
1195 #define SFVM_GETARRANGECOLUMN 0x0002 /* undocumented */
1196 #define SFVM_ADDOBJECT 0x0003
1197 #define SFVM_GETITEMCOUNT 0x0004 /* undocumented */
1198 #define SFVM_GETITEMPIDL 0x0005 /* undocumented */
1199 #define SFVM_REMOVEOBJECT 0x0006
1200 #define SFVM_UPDATEOBJECT 0x0007
1201 #define SFVM_SETREDRAW 0x0008 /* undocumented */
1202 #define SFVM_GETSELECTEDOBJECTS 0x0009
1203 #define SFVM_ISDROPONSOURCE 0x000A /* undocumented */
1204 #define SFVM_MOVEICONS 0x000B /* undocumented */
1205 #define SFVM_GETDRAGPOINT 0x000C /* undocumented */
1206 #define SFVM_GETDROPPOINT 0x000D /* undocumented */
1207 #define SFVM_SETITEMPOS 0x000E
1208 #define SFVM_ISDROPONBACKGROUND 0x000F /* undocumented */
1209 #define SFVM_SETCLIPBOARD 0x0010
1210 #define SFVM_TOGGLEAUTOARRANGE 0x0011 /* undocumented */
1211 #define SFVM_LINEUPICONS 0x0012 /* undocumented */
1212 #define SFVM_GETAUTOARRANGE 0x0013 /* undocumented */
1213 #define SFVM_GETSELECTEDCOUNT 0x0014 /* undocumented */
1214 #define SFVM_GETITEMSPACING 0x0015 /* undocumented */
1215 #define SFVM_REFRESHOBJECT 0x0016 /* undocumented */
1216 #define SFVM_SETPOINTS 0x0017
1217
1218 /****************************************************************************
1219 * SHGetDataFromIDList API
1220 */
1221 #define SHGDFIL_FINDDATA 1
1222 #define SHGDFIL_NETRESOURCE 2
1223 #define SHGDFIL_DESCRIPTIONID 3
1224
1225 #define SHDID_ROOT_REGITEM 1
1226 #define SHDID_FS_FILE 2
1227 #define SHDID_FS_DIRECTORY 3
1228 #define SHDID_FS_OTHER 4
1229 #define SHDID_COMPUTER_DRIVE35 5
1230 #define SHDID_COMPUTER_DRIVE525 6
1231 #define SHDID_COMPUTER_REMOVABLE 7
1232 #define SHDID_COMPUTER_FIXED 8
1233 #define SHDID_COMPUTER_NETDRIVE 9
1234 #define SHDID_COMPUTER_CDROM 10
1235 #define SHDID_COMPUTER_RAMDISK 11
1236 #define SHDID_COMPUTER_OTHER 12
1237 #define SHDID_NET_DOMAIN 13
1238 #define SHDID_NET_SERVER 14
1239 #define SHDID_NET_SHARE 15
1240 #define SHDID_NET_RESTOFNET 16
1241 #define SHDID_NET_OTHER 17
1242 #define SHDID_COMPUTER_IMAGING 18
1243 #define SHDID_COMPUTER_AUDIO 19
1244 #define SHDID_COMPUTER_SHAREDDOCS 20
1245
1246 #include <pshpack8.h>
1247
1248 typedef struct _SHDESCRIPTIONID
1249 { DWORD dwDescriptionId;
1250 CLSID clsid;
1251 } SHDESCRIPTIONID, *LPSHDESCRIPTIONID;
1252
1253 #include <poppack.h>
1254
1255 HRESULT
1256 WINAPI
1257 SHGetDataFromIDListA(
1258 _In_ LPSHELLFOLDER psf,
1259 _In_ LPCITEMIDLIST pidl,
1260 int nFormat,
1261 _Out_writes_bytes_(cb) LPVOID pv,
1262 int cb);
1263
1264 HRESULT
1265 WINAPI
1266 SHGetDataFromIDListW(
1267 _In_ LPSHELLFOLDER psf,
1268 _In_ LPCITEMIDLIST pidl,
1269 int nFormat,
1270 _Out_writes_bytes_(cb) LPVOID pv,
1271 int cb);
1272
1273 #define SHGetDataFromIDList WINELIB_NAME_AW(SHGetDataFromIDList)
1274
1275 LPITEMIDLIST
1276 WINAPI
1277 SHCloneSpecialIDList(
1278 _Reserved_ HWND hwnd,
1279 _In_ int csidl,
1280 _In_ BOOL fCreate);
1281
1282 _Success_(return != 0)
1283 BOOL
1284 WINAPI
1285 SHGetSpecialFolderPathA(
1286 _Reserved_ HWND hwndOwner,
1287 _Out_writes_(MAX_PATH) LPSTR szPath,
1288 _In_ int nFolder,
1289 _In_ BOOL bCreate);
1290
1291 _Success_(return != 0)
1292 BOOL
1293 WINAPI
1294 SHGetSpecialFolderPathW(
1295 _Reserved_ HWND hwndOwner,
1296 _Out_writes_(MAX_PATH) LPWSTR szPath,
1297 _In_ int nFolder,
1298 _In_ BOOL bCreate);
1299
1300 #define SHGetSpecialFolderPath WINELIB_NAME_AW(SHGetSpecialFolderPath)
1301
1302 _Check_return_ HRESULT WINAPI SHGetMalloc(_Outptr_ LPMALLOC *lpmal);
1303
1304 /**********************************************************************
1305 * SHGetSetSettings ()
1306 */
1307
1308 typedef struct
1309 {
1310 BOOL fShowAllObjects : 1;
1311 BOOL fShowExtensions : 1;
1312 BOOL fNoConfirmRecycle : 1;
1313
1314 BOOL fShowSysFiles : 1;
1315 BOOL fShowCompColor : 1;
1316 BOOL fDoubleClickInWebView : 1;
1317 BOOL fDesktopHTML : 1;
1318 BOOL fWin95Classic : 1;
1319 BOOL fDontPrettyPath : 1;
1320 BOOL fShowAttribCol : 1;
1321 BOOL fMapNetDrvBtn : 1;
1322 BOOL fShowInfoTip : 1;
1323 BOOL fHideIcons : 1;
1324 BOOL fWebView : 1;
1325 BOOL fFilter : 1;
1326 BOOL fShowSuperHidden : 1;
1327 BOOL fNoNetCrawling : 1;
1328
1329 UINT :15; /* Required for proper binary layout with gcc */
1330 DWORD dwWin95Unused;
1331 UINT uWin95Unused;
1332 LONG lParamSort;
1333 int iSortDirection;
1334 UINT version;
1335 UINT uNotUsed;
1336 BOOL fSepProcess: 1;
1337 BOOL fStartPanelOn: 1;
1338 BOOL fShowStartPage: 1;
1339 UINT fSpareFlags : 13;
1340 UINT :15; /* Required for proper binary layout with gcc */
1341 } SHELLSTATE, *LPSHELLSTATE;
1342
1343 /**********************************************************************
1344 * SHGetSettings ()
1345 */
1346 typedef struct
1347 { BOOL fShowAllObjects : 1;
1348 BOOL fShowExtensions : 1;
1349 BOOL fNoConfirmRecycle : 1;
1350 BOOL fShowSysFiles : 1;
1351
1352 BOOL fShowCompColor : 1;
1353 BOOL fDoubleClickInWebView : 1;
1354 BOOL fDesktopHTML : 1;
1355 BOOL fWin95Classic : 1;
1356
1357 BOOL fDontPrettyPath : 1;
1358 BOOL fShowAttribCol : 1;
1359 BOOL fMapNetDrvBtn : 1;
1360 BOOL fShowInfoTip : 1;
1361
1362 BOOL fHideIcons : 1;
1363 UINT fRestFlags : 3;
1364 UINT :15; /* Required for proper binary layout with gcc */
1365 } SHELLFLAGSTATE, * LPSHELLFLAGSTATE;
1366
1367 VOID WINAPI SHGetSettings(_Out_ LPSHELLFLAGSTATE lpsfs, DWORD dwMask);
1368
1369 #define SSF_SHOWALLOBJECTS 0x0001
1370 #define SSF_SHOWEXTENSIONS 0x0002
1371 #define SSF_SHOWCOMPCOLOR 0x0008
1372 #define SSF_SHOWSYSFILES 0x0020
1373 #define SSF_DOUBLECLICKINWEBVIEW 0x0080
1374 #define SSF_SHOWATTRIBCOL 0x0100
1375 #define SSF_DESKTOPHTML 0x0200
1376 #define SSF_WIN95CLASSIC 0x0400
1377 #define SSF_DONTPRETTYPATH 0x0800
1378 #define SSF_SHOWINFOTIP 0x2000
1379 #define SSF_MAPNETDRVBUTTON 0x1000
1380 #define SSF_NOCONFIRMRECYCLE 0x8000
1381 #define SSF_HIDEICONS 0x4000
1382
1383 /****************************************************************************
1384 * SHRestricted API
1385 */
1386 typedef enum RESTRICTIONS
1387 {
1388 REST_NONE = 0x00000000,
1389 REST_NORUN = 0x00000001,
1390 REST_NOCLOSE = 0x00000002,
1391 REST_NOSAVESET = 0x00000004,
1392 REST_NOFILEMENU = 0x00000008,
1393 REST_NOSETFOLDERS = 0x00000010,
1394 REST_NOSETTASKBAR = 0x00000020,
1395 REST_NODESKTOP = 0x00000040,
1396 REST_NOFIND = 0x00000080,
1397 REST_NODRIVES = 0x00000100,
1398 REST_NODRIVEAUTORUN = 0x00000200,
1399 REST_NODRIVETYPEAUTORUN = 0x00000400,
1400 REST_NONETHOOD = 0x00000800,
1401 REST_STARTBANNER = 0x00001000,
1402 REST_RESTRICTRUN = 0x00002000,
1403 REST_NOPRINTERTABS = 0x00004000,
1404 REST_NOPRINTERDELETE = 0x00008000,
1405 REST_NOPRINTERADD = 0x00010000,
1406 REST_NOSTARTMENUSUBFOLDERS = 0x00020000,
1407 REST_MYDOCSONNET = 0x00040000,
1408 REST_NOEXITTODOS = 0x00080000,
1409 REST_ENFORCESHELLEXTSECURITY = 0x00100000,
1410 REST_LINKRESOLVEIGNORELINKINFO = 0x00200000,
1411 REST_NOCOMMONGROUPS = 0x00400000,
1412 REST_SEPARATEDESKTOPPROCESS = 0x00800000,
1413 REST_NOWEB = 0x01000000,
1414 REST_NOTRAYCONTEXTMENU = 0x02000000,
1415 REST_NOVIEWCONTEXTMENU = 0x04000000,
1416 REST_NONETCONNECTDISCONNECT = 0x08000000,
1417 REST_STARTMENULOGOFF = 0x10000000,
1418 REST_NOSETTINGSASSIST = 0x20000000,
1419 REST_NOINTERNETICON = 0x40000001,
1420 REST_NORECENTDOCSHISTORY,
1421 REST_NORECENTDOCSMENU,
1422 REST_NOACTIVEDESKTOP,
1423 REST_NOACTIVEDESKTOPCHANGES,
1424 REST_NOFAVORITESMENU,
1425 REST_CLEARRECENTDOCSONEXIT,
1426 REST_CLASSICSHELL,
1427 REST_NOCUSTOMIZEWEBVIEW,
1428
1429 REST_NOHTMLWALLPAPER = 0x40000010,
1430 REST_NOCHANGINGWALLPAPER,
1431 REST_NODESKCOMP,
1432 REST_NOADDDESKCOMP,
1433 REST_NODELDESKCOMP,
1434 REST_NOCLOSEDESKCOMP,
1435 REST_NOCLOSE_DRAGDROPBAND,
1436 REST_NOMOVINGBAND,
1437 REST_NOEDITDESKCOMP,
1438 REST_NORESOLVESEARCH,
1439 REST_NORESOLVETRACK,
1440 REST_FORCECOPYACLWITHFILE,
1441 REST_NOLOGO3CHANNELNOTIFY,
1442 REST_NOFORGETSOFTWAREUPDATE,
1443 REST_NOSETACTIVEDESKTOP,
1444 REST_NOUPDATEWINDOWS,
1445 REST_NOCHANGESTARMENU, /* 0x40000020 */
1446 REST_NOFOLDEROPTIONS,
1447 REST_HASFINDCOMPUTERS,
1448 REST_INTELLIMENUS,
1449 REST_RUNDLGMEMCHECKBOX,
1450 REST_ARP_ShowPostSetup,
1451 REST_NOCSC,
1452 REST_NOCONTROLPANEL,
1453 REST_ENUMWORKGROUP,
1454 REST_ARP_NOARP,
1455 REST_ARP_NOREMOVEPAGE,
1456 REST_ARP_NOADDPAGE,
1457 REST_ARP_NOWINSETUPPAGE,
1458 REST_GREYMSIADS,
1459 REST_NOCHANGEMAPPEDDRIVELABEL,
1460 REST_NOCHANGEMAPPEDDRIVECOMMENT,
1461 REST_MaxRecentDocs, /* 0x40000030 */
1462 REST_NONETWORKCONNECTIONS,
1463 REST_FORCESTARTMENULOGOFF,
1464 REST_NOWEBVIEW,
1465 REST_NOCUSTOMIZETHISFOLDER,
1466 REST_NOENCRYPTION,
1467
1468 REST_ALLOWFRENCHENCRYPTION, /* not documented */
1469
1470 REST_DONTSHOWSUPERHIDDEN,
1471 REST_NOSHELLSEARCHBUTTON,
1472 REST_NOHARDWARETAB,
1473 REST_NORUNASINSTALLPROMPT,
1474 REST_PROMPTRUNASINSTALLNETPATH,
1475 REST_NOMANAGEMYCOMPUTERVERB,
1476 REST_NORECENTDOCSNETHOOD,
1477 REST_DISALLOWRUN,
1478 REST_NOWELCOMESCREEN,
1479 REST_RESTRICTCPL, /* 0x40000040 */
1480 REST_DISALLOWCPL,
1481 REST_NOSMBALLOONTIP,
1482 REST_NOSMHELP,
1483 REST_NOWINKEYS,
1484 REST_NOENCRYPTONMOVE,
1485 REST_NOLOCALMACHINERUN,
1486 REST_NOCURRENTUSERRUN,
1487 REST_NOLOCALMACHINERUNONCE,
1488 REST_NOCURRENTUSERRUNONCE,
1489 REST_FORCEACTIVEDESKTOPON,
1490 REST_NOCOMPUTERSNEARME,
1491 REST_NOVIEWONDRIVE,
1492 REST_NONETCRAWL,
1493 REST_NOSHAREDDOCUMENTS,
1494 REST_NOSMMYDOCS,
1495 REST_NOSMMYPICS, /* 0x40000050 */
1496 REST_ALLOWBITBUCKDRIVES,
1497 REST_NONLEGACYSHELLMODE,
1498 REST_NOCONTROLPANELBARRICADE,
1499 REST_NOSTARTPAGE,
1500 REST_NOAUTOTRAYNOTIFY,
1501 REST_NOTASKGROUPING,
1502 REST_NOCDBURNING,
1503 REST_MYCOMPNOPROP,
1504 REST_MYDOCSNOPROP,
1505 REST_NOSTARTPANEL,
1506 REST_NODISPLAYAPPEARANCEPAGE,
1507 REST_NOTHEMESTAB,
1508 REST_NOVISUALSTYLECHOICE,
1509 REST_NOSIZECHOICE,
1510 REST_NOCOLORCHOICE,
1511 REST_SETVISUALSTYLE, /* 0x40000060 */
1512 REST_STARTRUNNOHOMEPATH,
1513 REST_NOUSERNAMEINSTARTPANEL,
1514 REST_NOMYCOMPUTERICON,
1515 REST_NOSMNETWORKPLACES,
1516 REST_NOSMPINNEDLIST,
1517 REST_NOSMMYMUSIC,
1518 REST_NOSMEJECTPC,
1519 REST_NOSMMOREPROGRAMS,
1520 REST_NOSMMFUPROGRAMS,
1521 REST_NOTRAYITEMSDISPLAY,
1522 REST_NOTOOLBARSONTASKBAR,
1523 /* 0x4000006C
1524 0x4000006D
1525 0x4000006E */
1526 REST_NOSMCONFIGUREPROGRAMS = 0x4000006F,
1527 REST_HIDECLOCK, /* 0x40000070 */
1528 REST_NOLOWDISKSPACECHECKS,
1529 REST_NOENTIRENETWORK,
1530 REST_NODESKTOPCLEANUP,
1531 REST_BITBUCKNUKEONDELETE,
1532 REST_BITBUCKCONFIRMDELETE,
1533 REST_BITBUCKNOPROP,
1534 REST_NODISPBACKGROUND,
1535 REST_NODISPSCREENSAVEPG,
1536 REST_NODISPSETTINGSPG,
1537 REST_NODISPSCREENSAVEPREVIEW,
1538 REST_NODISPLAYCPL,
1539 REST_HIDERUNASVERB,
1540 REST_NOTHUMBNAILCACHE,
1541 REST_NOSTRCMPLOGICAL,
1542 REST_NOPUBLISHWIZARD,
1543 REST_NOONLINEPRINTSWIZARD, /* 0x40000080 */
1544 REST_NOWEBSERVICES,
1545 REST_ALLOWUNHASHEDWEBVIEW,
1546 REST_ALLOWLEGACYWEBVIEW,
1547 REST_REVERTWEBVIEWSECURITY,
1548
1549 REST_INHERITCONSOLEHANDLES = 0x40000086,
1550
1551 REST_NODISCONNECT = 0x41000001,
1552 REST_NOSECURITY,
1553 REST_NOFILEASSOCIATE, /* 0x41000003 */
1554 } RESTRICTIONS;
1555
1556 DWORD WINAPI SHRestricted(RESTRICTIONS rest);
1557
1558 /****************************************************************************
1559 * SHChangeNotify API
1560 */
1561 typedef struct _SHChangeNotifyEntry
1562 {
1563 LPCITEMIDLIST pidl;
1564 BOOL fRecursive;
1565 } SHChangeNotifyEntry;
1566
1567 #define SHCNE_RENAMEITEM 0x00000001
1568 #define SHCNE_CREATE 0x00000002
1569 #define SHCNE_DELETE 0x00000004
1570 #define SHCNE_MKDIR 0x00000008
1571 #define SHCNE_RMDIR 0x00000010
1572 #define SHCNE_MEDIAINSERTED 0x00000020
1573 #define SHCNE_MEDIAREMOVED 0x00000040
1574 #define SHCNE_DRIVEREMOVED 0x00000080
1575 #define SHCNE_DRIVEADD 0x00000100
1576 #define SHCNE_NETSHARE 0x00000200
1577 #define SHCNE_NETUNSHARE 0x00000400
1578 #define SHCNE_ATTRIBUTES 0x00000800
1579 #define SHCNE_UPDATEDIR 0x00001000
1580 #define SHCNE_UPDATEITEM 0x00002000
1581 #define SHCNE_SERVERDISCONNECT 0x00004000
1582 #define SHCNE_UPDATEIMAGE 0x00008000
1583 #define SHCNE_DRIVEADDGUI 0x00010000
1584 #define SHCNE_RENAMEFOLDER 0x00020000
1585 #define SHCNE_FREESPACE 0x00040000
1586
1587 #define SHCNE_EXTENDED_EVENT 0x04000000
1588 #define SHCNE_ASSOCCHANGED 0x08000000
1589 #define SHCNE_DISKEVENTS 0x0002381F
1590 #define SHCNE_GLOBALEVENTS 0x0C0581E0
1591 #define SHCNE_ALLEVENTS 0x7FFFFFFF
1592 #define SHCNE_INTERRUPT 0x80000000
1593
1594 #define SHCNEE_ORDERCHANGED 0x0002L
1595 #define SHCNEE_MSI_CHANGE 0x0004L
1596 #define SHCNEE_MSI_UNINSTALL 0x0005L
1597
1598 #define SHCNF_IDLIST 0x0000
1599 #define SHCNF_PATHA 0x0001
1600 #define SHCNF_PRINTERA 0x0002
1601 #define SHCNF_DWORD 0x0003
1602 #define SHCNF_PATHW 0x0005
1603 #define SHCNF_PRINTERW 0x0006
1604 #define SHCNF_TYPE 0x00FF
1605 #define SHCNF_FLUSH 0x1000
1606 #define SHCNF_FLUSHNOWAIT 0x3000
1607 #define SHCNF_NOTIFYRECURSIVE 0x10000
1608
1609 #define SHCNF_PATH WINELIB_NAME_AW(SHCNF_PATH)
1610 #define SHCNF_PRINTER WINELIB_NAME_AW(SHCNF_PRINTER)
1611
1612 #define SHCNRF_InterruptLevel 0x0001
1613 #define SHCNRF_ShellLevel 0x0002
1614 #define SHCNRF_RecursiveInterrupt 0x1000
1615 #define SHCNRF_NewDelivery 0x8000
1616
1617 void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2);
1618
1619 typedef enum {
1620 SLDF_DEFAULT = 0x00000000,
1621 SLDF_HAS_ID_LIST = 0x00000001,
1622 SLDF_HAS_LINK_INFO = 0x00000002,
1623 SLDF_HAS_NAME = 0x00000004,
1624 SLDF_HAS_RELPATH = 0x00000008,
1625 SLDF_HAS_WORKINGDIR = 0x00000010,
1626 SLDF_HAS_ARGS = 0x00000020,
1627 SLDF_HAS_ICONLOCATION = 0x00000040,
1628 SLDF_UNICODE = 0x00000080,
1629 SLDF_FORCE_NO_LINKINFO = 0x00000100,
1630 SLDF_HAS_EXP_SZ = 0x00000200,
1631 SLDF_RUN_IN_SEPARATE = 0x00000400,
1632 SLDF_HAS_LOGO3ID = 0x00000800,
1633 SLDF_HAS_DARWINID = 0x00001000,
1634 SLDF_RUNAS_USER = 0x00002000,
1635 SLDF_HAS_EXP_ICON_SZ = 0x00004000,
1636 SLDF_NO_PIDL_ALIAS = 0x00008000,
1637 SLDF_FORCE_UNCNAME = 0x00010000,
1638 SLDF_RUN_WITH_SHIMLAYER = 0x00020000,
1639 SLDF_FORCE_NO_LINKTRACK = 0x00040000,
1640 SLDF_ENABLE_TARGET_METADATA = 0x00080000,
1641 SLDF_DISABLE_LINK_PATH_TRACKING = 0x00100000,
1642 SLDF_DISABLE_KNOWNFOLDER_RELATIVE_TRACKING = 0x00200000,
1643 #if (NTDDI_VERSION >= NTDDI_WIN7)
1644 SLDF_NO_KF_ALIAS = 0x00400000,
1645 SLDF_ALLOW_LINK_TO_LINK = 0x00800000,
1646 SLDF_UNALIAS_ON_SAVE = 0x01000000,
1647 SLDF_PREFER_ENVIRONMENT_PATH = 0x02000000,
1648 SLDF_KEEP_LOCAL_IDLIST_FOR_UNC_TARGET = 0x04000000,
1649 #if (NTDDI_VERSION >= NTDDI_WIN8)
1650 SLDF_PERSIST_VOLUME_ID_RELATIVE = 0x08000000,
1651 SLDF_VALID = 0x0ffff7ff, /* Windows 8 */
1652 #else
1653 SLDF_VALID = 0x07fff7ff, /* Windows 7 */
1654 #endif
1655 #else
1656 SLDF_VALID = 0x003ff7ff, /* Windows Vista */
1657 #endif
1658 SLDF_RESERVED = 0x80000000,
1659 } SHELL_LINK_DATA_FLAGS;
1660
1661 typedef struct tagDATABLOCKHEADER
1662 {
1663 DWORD cbSize;
1664 DWORD dwSignature;
1665 } DATABLOCK_HEADER, *LPDATABLOCK_HEADER, *LPDBLIST;
1666
1667 typedef struct {
1668 DATABLOCK_HEADER dbh;
1669 CHAR szDarwinID[MAX_PATH];
1670 WCHAR szwDarwinID[MAX_PATH];
1671 } EXP_DARWIN_LINK, *LPEXP_DARWIN_LINK;
1672
1673 typedef struct {
1674 DWORD cbSize;
1675 DWORD dwSignature;
1676 CHAR szTarget[MAX_PATH];
1677 WCHAR szwTarget[MAX_PATH];
1678 } EXP_SZ_LINK, *LPEXP_SZ_LINK;
1679
1680 typedef struct {
1681 DWORD cbSize;
1682 DWORD dwSignature;
1683 DWORD idSpecialFolder;
1684 DWORD cbOffset;
1685 } EXP_SPECIAL_FOLDER, *LPEXP_SPECIAL_FOLDER;
1686
1687 typedef struct {
1688 DWORD cbSize;
1689 DWORD dwSignature;
1690 BYTE abPropertyStorage[1];
1691 } EXP_PROPERTYSTORAGE;
1692
1693 #ifdef LF_FACESIZE
1694 typedef struct {
1695 DATABLOCK_HEADER dbh;
1696 WORD wFillAttribute;
1697 WORD wPopupFillAttribute;
1698 COORD dwScreenBufferSize;
1699 COORD dwWindowSize;
1700 COORD dwWindowOrigin;
1701 DWORD nFont;
1702 DWORD nInputBufferSize;
1703 COORD dwFontSize;
1704 UINT uFontFamily;
1705 UINT uFontWeight;
1706 WCHAR FaceName[LF_FACESIZE];
1707 UINT uCursorSize;
1708 BOOL bFullScreen;
1709 BOOL bQuickEdit;
1710 BOOL bInsertMode;
1711 BOOL bAutoPosition;
1712 UINT uHistoryBufferSize;
1713 UINT uNumberOfHistoryBuffers;
1714 BOOL bHistoryNoDup;
1715 COLORREF ColorTable[16];
1716 } NT_CONSOLE_PROPS, *LPNT_CONSOLE_PROPS;
1717 #endif
1718
1719 typedef struct {
1720 DATABLOCK_HEADER dbh;
1721 UINT uCodePage;
1722 } NT_FE_CONSOLE_PROPS, *LPNT_FE_CONSOLE_PROPS;
1723
1724 #define EXP_SZ_LINK_SIG 0xa0000001 /* EXP_SZ_LINK */
1725 #define NT_CONSOLE_PROPS_SIG 0xa0000002 /* NT_CONSOLE_PROPS */
1726 #define NT_FE_CONSOLE_PROPS_SIG 0xa0000004 /* NT_FE_CONSOLE_PROPS */
1727 #define EXP_SPECIAL_FOLDER_SIG 0xa0000005 /* EXP_SPECIAL_FOLDER */
1728 #define EXP_DARWIN_ID_SIG 0xa0000006 /* EXP_DARWIN_LINK */
1729 #define EXP_SZ_ICON_SIG 0xa0000007 /* EXP_SZ_LINK */
1730 #define EXP_LOGO3_ID_SIG EXP_SZ_ICON_SIG /* Old SDKs only */
1731 #define EXP_PROPERTYSTORAGE_SIG 0xa0000009 /* EXP_PROPERTYSTORAGE */
1732
1733 typedef struct _SHChangeDWORDAsIDList {
1734 USHORT cb;
1735 DWORD dwItem1;
1736 DWORD dwItem2;
1737 USHORT cbZero;
1738 } SHChangeDWORDAsIDList, *LPSHChangeDWORDAsIDList;
1739
1740 typedef struct _SHChangeProductKeyAsIDList {
1741 USHORT cb;
1742 WCHAR wszProductKey[39];
1743 USHORT cbZero;
1744 } SHChangeProductKeyAsIDList, *LPSHChangeProductKeyAsIDList;
1745
1746 ULONG
1747 WINAPI
1748 SHChangeNotifyRegister(
1749 _In_ HWND hwnd,
1750 int fSources,
1751 LONG fEvents,
1752 UINT wMsg,
1753 int cEntries,
1754 _In_ SHChangeNotifyEntry *pshcne);
1755
1756 BOOL WINAPI SHChangeNotifyDeregister(ULONG ulID);
1757
1758 HANDLE
1759 WINAPI
1760 SHChangeNotification_Lock(
1761 _In_ HANDLE hChangeNotification,
1762 DWORD dwProcessId,
1763 _Outptr_opt_result_buffer_(2)_Outptr_opt_result_buffer_(2) LPITEMIDLIST **pppidl,
1764 _Out_opt_ LONG *plEvent);
1765
1766 BOOL WINAPI SHChangeNotification_Unlock(_In_ HANDLE hLock);
1767
1768 HRESULT
1769 WINAPI
1770 SHGetRealIDL(
1771 _In_ IShellFolder *psf,
1772 _In_ LPCITEMIDLIST pidlSimple,
1773 _Outptr_ LPITEMIDLIST * ppidlReal);
1774
1775 /****************************************************************************
1776 * SHCreateDirectory API
1777 */
1778 int WINAPI SHCreateDirectory(_In_opt_ HWND, _In_ LPCWSTR);
1779
1780 int
1781 WINAPI
1782 SHCreateDirectoryExA(
1783 _In_opt_ HWND,
1784 _In_ LPCSTR,
1785 _In_opt_ LPSECURITY_ATTRIBUTES);
1786
1787 int
1788 WINAPI
1789 SHCreateDirectoryExW(
1790 _In_opt_ HWND,
1791 _In_ LPCWSTR,
1792 _In_opt_ LPSECURITY_ATTRIBUTES);
1793
1794 #define SHCreateDirectoryEx WINELIB_NAME_AW(SHCreateDirectoryEx)
1795
1796 /****************************************************************************
1797 * SHGetSpecialFolderLocation API
1798 */
1799 _Check_return_
1800 HRESULT
1801 WINAPI
1802 SHGetSpecialFolderLocation(
1803 _Reserved_ HWND hwndOwner,
1804 _In_ int nFolder,
1805 _Outptr_ LPITEMIDLIST *ppidl);
1806
1807 HRESULT
1808 WINAPI
1809 SHGetFolderLocation(
1810 _Reserved_ HWND hwndOwner,
1811 _In_ int nFolder,
1812 _In_opt_ HANDLE hToken,
1813 _In_ DWORD dwReserved,
1814 _Outptr_ LPITEMIDLIST *ppidl);
1815
1816 /****************************************************************************
1817 * SHGetFolderPath API
1818 */
1819 typedef enum {
1820 SHGFP_TYPE_CURRENT = 0,
1821 SHGFP_TYPE_DEFAULT = 1
1822 } SHGFP_TYPE;
1823
1824 HRESULT
1825 WINAPI
1826 SHGetFolderPathA(
1827 _Reserved_ HWND hwnd,
1828 _In_ int nFolder,
1829 _In_opt_ HANDLE hToken,
1830 _In_ DWORD dwFlags,
1831 _Out_writes_(MAX_PATH) LPSTR pszPath);
1832
1833 HRESULT
1834 WINAPI
1835 SHGetFolderPathW(
1836 _Reserved_ HWND hwnd,
1837 _In_ int nFolder,
1838 _In_opt_ HANDLE hToken,
1839 _In_ DWORD dwFlags,
1840 _Out_writes_(MAX_PATH) LPWSTR pszPath);
1841
1842 #define SHGetFolderPath WINELIB_NAME_AW(SHGetFolderPath)
1843
1844 #define CSIDL_DESKTOP 0x0000
1845 #define CSIDL_INTERNET 0x0001
1846 #define CSIDL_PROGRAMS 0x0002
1847 #define CSIDL_CONTROLS 0x0003
1848 #define CSIDL_PRINTERS 0x0004
1849 #define CSIDL_PERSONAL 0x0005
1850 #define CSIDL_FAVORITES 0x0006
1851 #define CSIDL_STARTUP 0x0007
1852 #define CSIDL_RECENT 0x0008
1853 #define CSIDL_SENDTO 0x0009
1854 #define CSIDL_BITBUCKET 0x000a
1855 #define CSIDL_STARTMENU 0x000b
1856 #define CSIDL_MYDOCUMENTS CSIDL_PERSONAL
1857 #define CSIDL_MYMUSIC 0x000d
1858 #define CSIDL_MYVIDEO 0x000e
1859 #define CSIDL_DESKTOPDIRECTORY 0x0010
1860 #define CSIDL_DRIVES 0x0011
1861 #define CSIDL_NETWORK 0x0012
1862 #define CSIDL_NETHOOD 0x0013
1863 #define CSIDL_FONTS 0x0014
1864 #define CSIDL_TEMPLATES 0x0015
1865 #define CSIDL_COMMON_STARTMENU 0x0016
1866 #define CSIDL_COMMON_PROGRAMS 0X0017
1867 #define CSIDL_COMMON_STARTUP 0x0018
1868 #define CSIDL_COMMON_DESKTOPDIRECTORY 0x0019
1869 #define CSIDL_APPDATA 0x001a
1870 #define CSIDL_PRINTHOOD 0x001b
1871 #define CSIDL_LOCAL_APPDATA 0x001c
1872 #define CSIDL_ALTSTARTUP 0x001d
1873 #define CSIDL_COMMON_ALTSTARTUP 0x001e
1874 #define CSIDL_COMMON_FAVORITES 0x001f
1875 #define CSIDL_INTERNET_CACHE 0x0020
1876 #define CSIDL_COOKIES 0x0021
1877 #define CSIDL_HISTORY 0x0022
1878 #define CSIDL_COMMON_APPDATA 0x0023
1879 #define CSIDL_WINDOWS 0x0024
1880 #define CSIDL_SYSTEM 0x0025
1881 #define CSIDL_PROGRAM_FILES 0x0026
1882 #define CSIDL_MYPICTURES 0x0027
1883 #define CSIDL_PROFILE 0x0028
1884 #define CSIDL_SYSTEMX86 0x0029
1885 #define CSIDL_PROGRAM_FILESX86 0x002a
1886 #define CSIDL_PROGRAM_FILES_COMMON 0x002b
1887 #define CSIDL_PROGRAM_FILES_COMMONX86 0x002c
1888 #define CSIDL_COMMON_TEMPLATES 0x002d
1889 #define CSIDL_COMMON_DOCUMENTS 0x002e
1890 #define CSIDL_COMMON_ADMINTOOLS 0x002f
1891 #define CSIDL_ADMINTOOLS 0x0030
1892 #define CSIDL_CONNECTIONS 0x0031
1893 #define CSIDL_COMMON_MUSIC 0x0035
1894 #define CSIDL_COMMON_PICTURES 0x0036
1895 #define CSIDL_COMMON_VIDEO 0x0037
1896 #define CSIDL_RESOURCES 0x0038
1897 #define CSIDL_RESOURCES_LOCALIZED 0x0039
1898 #define CSIDL_COMMON_OEM_LINKS 0x003a
1899 #define CSIDL_CDBURN_AREA 0x003b
1900 #define CSIDL_COMPUTERSNEARME 0x003d
1901 #define CSIDL_PROFILES 0x003e
1902 #define CSIDL_FOLDER_MASK 0x00ff
1903 #define CSIDL_FLAG_PER_USER_INIT 0x0800
1904 #define CSIDL_FLAG_NO_ALIAS 0x1000
1905 #define CSIDL_FLAG_DONT_VERIFY 0x4000
1906 #define CSIDL_FLAG_CREATE 0x8000
1907
1908 #define CSIDL_FLAG_MASK 0xff00
1909
1910 /****************************************************************************
1911 * SHGetDesktopFolder API
1912 */
1913 _Check_return_ HRESULT WINAPI SHGetDesktopFolder(_Outptr_ IShellFolder * *);
1914
1915 /****************************************************************************
1916 * SHBindToParent API
1917 */
1918 HRESULT
1919 WINAPI
1920 SHBindToParent(
1921 _In_ LPCITEMIDLIST pidl,
1922 _In_ REFIID riid,
1923 _Outptr_ LPVOID *ppv,
1924 _Outptr_opt_ LPCITEMIDLIST *ppidlLast);
1925
1926 /****************************************************************************
1927 * SHDefExtractIcon API
1928 */
1929 HRESULT
1930 WINAPI
1931 SHDefExtractIconA(
1932 _In_ LPCSTR pszIconFile,
1933 int iIndex,
1934 UINT uFlags,
1935 _Out_opt_ HICON* phiconLarge,
1936 _Out_opt_ HICON* phiconSmall,
1937 UINT nIconSize);
1938
1939 HRESULT
1940 WINAPI
1941 SHDefExtractIconW(
1942 _In_ LPCWSTR pszIconFile,
1943 int iIndex,
1944 UINT uFlags,
1945 _Out_opt_ HICON* phiconLarge,
1946 _Out_opt_ HICON* phiconSmall,
1947 UINT nIconSize);
1948
1949 #define SHDefExtractIcon WINELIB_NAME_AW(SHDefExtractIcon)
1950
1951 /*
1952 * DROPFILES for CF_HDROP and CF_PRINTERS
1953 */
1954 typedef struct _DROPFILES
1955 {
1956 DWORD pFiles;
1957 POINT pt;
1958 BOOL fNC;
1959 BOOL fWide;
1960 } DROPFILES, *LPDROPFILES;
1961
1962 /*
1963 * Properties of a file in the clipboard
1964 */
1965 typedef struct _FILEDESCRIPTORA {
1966 DWORD dwFlags;
1967 CLSID clsid;
1968 SIZEL sizel;
1969 POINTL pointl;
1970 DWORD dwFileAttributes;
1971 FILETIME ftCreationTime;
1972 FILETIME ftLastAccessTime;
1973 FILETIME ftLastWriteTime;
1974 DWORD nFileSizeHigh;
1975 DWORD nFileSizeLow;
1976 CHAR cFileName[MAX_PATH];
1977 } FILEDESCRIPTORA, *LPFILEDESCRIPTORA;
1978
1979 typedef struct _FILEDESCRIPTORW {
1980 DWORD dwFlags;
1981 CLSID clsid;
1982 SIZEL sizel;
1983 POINTL pointl;
1984 DWORD dwFileAttributes;
1985 FILETIME ftCreationTime;
1986 FILETIME ftLastAccessTime;
1987 FILETIME ftLastWriteTime;
1988 DWORD nFileSizeHigh;
1989 DWORD nFileSizeLow;
1990 WCHAR cFileName[MAX_PATH];
1991 } FILEDESCRIPTORW, *LPFILEDESCRIPTORW;
1992
1993 DECL_WINELIB_TYPE_AW(FILEDESCRIPTOR)
1994 DECL_WINELIB_TYPE_AW(LPFILEDESCRIPTOR)
1995
1996 /*
1997 * CF_FILEGROUPDESCRIPTOR clipboard format
1998 */
1999 typedef struct _FILEGROUPDESCRIPTORA {
2000 UINT cItems;
2001 FILEDESCRIPTORA fgd[1];
2002 } FILEGROUPDESCRIPTORA, *LPFILEGROUPDESCRIPTORA;
2003
2004 typedef struct _FILEGROUPDESCRIPTORW {
2005 UINT cItems;
2006 FILEDESCRIPTORW fgd[1];
2007 } FILEGROUPDESCRIPTORW, *LPFILEGROUPDESCRIPTORW;
2008
2009 DECL_WINELIB_TYPE_AW(FILEGROUPDESCRIPTOR)
2010 DECL_WINELIB_TYPE_AW(LPFILEGROUPDESCRIPTOR)
2011
2012 /****************************************************************************
2013 * Cabinet functions
2014 */
2015
2016 typedef struct {
2017 WORD cLength;
2018 WORD nVersion;
2019 BOOL fFullPathTitle:1;
2020 BOOL fSaveLocalView:1;
2021 BOOL fNotShell:1;
2022 BOOL fSimpleDefault:1;
2023 BOOL fDontShowDescBar:1;
2024 BOOL fNewWindowMode:1;
2025 BOOL fShowCompColor:1;
2026 BOOL fDontPrettyNames:1;
2027 BOOL fAdminsCreateCommonGroups:1;
2028 UINT fUnusedFlags:7;
2029 UINT :15; /* Required for proper binary layout with gcc */
2030 UINT fMenuEnumFilter;
2031 } CABINETSTATE, *LPCABINETSTATE;
2032
2033 #define CABINETSTATE_VERSION 2
2034
2035 BOOL
2036 WINAPI
2037 ReadCabinetState(
2038 _Out_writes_bytes_(cLength) CABINETSTATE *,
2039 int cLength);
2040
2041 BOOL WINAPI WriteCabinetState(_In_ CABINETSTATE *);
2042
2043 /****************************************************************************
2044 * Path Manipulation Routines
2045 */
2046
2047 /* PathProcessCommand flags */
2048 #define PPCF_ADDQUOTES 0x01
2049 #define PPCF_INCLUDEARGS 0x02
2050 #define PPCF_ADDARGUMENTS 0x03
2051 #define PPCF_NODIRECTORIES 0x10
2052 #define PPCF_DONTRESOLVE 0x20
2053 #define PPCF_FORCEQUALIFY 0x40
2054 #define PPCF_LONGESTPOSSIBLE 0x80
2055
2056 /* PathResolve flags */
2057 #define PRF_VERIFYEXISTS 0x01
2058 #define PRF_EXECUTABLE 0x02
2059 #define PRF_TRYPROGRAMEXTENSIONS 0x03
2060 #define PRF_FIRSTDIRDEF 0x04
2061 #define PRF_DONTFINDLINK 0x08
2062
2063 VOID WINAPI PathGetShortPath(_Inout_updates_(MAX_PATH) LPWSTR pszPath);
2064
2065 LONG
2066 WINAPI
2067 PathProcessCommand(
2068 _In_ LPCWSTR,
2069 _Out_writes_(cchDest) LPWSTR,
2070 int cchDest,
2071 DWORD);
2072
2073 _Success_(return != 0)
2074 BOOL
2075 WINAPI
2076 PathYetAnotherMakeUniqueName(
2077 _Out_writes_(MAX_PATH) LPWSTR,
2078 _In_ LPCWSTR,
2079 _In_opt_ LPCWSTR,
2080 _In_opt_ LPCWSTR);
2081
2082 /****************************************************************************
2083 * Drag And Drop Routines
2084 */
2085
2086 /* DAD_AutoScroll sample structure */
2087 #define NUM_POINTS 3
2088 typedef struct
2089 {
2090 int iNextSample;
2091 DWORD dwLastScroll;
2092 BOOL bFull;
2093 POINT pts[NUM_POINTS];
2094 DWORD dwTimes[NUM_POINTS];
2095 } AUTO_SCROLL_DATA;
2096
2097 BOOL WINAPI DAD_SetDragImage(HIMAGELIST,LPPOINT);
2098 BOOL WINAPI DAD_DragEnterEx(HWND,POINT);
2099 BOOL WINAPI DAD_DragEnterEx2(_In_ HWND, POINT, _In_opt_ IDataObject*);
2100 BOOL WINAPI DAD_DragMove(POINT);
2101 BOOL WINAPI DAD_DragLeave(void);
2102 BOOL WINAPI DAD_AutoScroll(HWND,AUTO_SCROLL_DATA*,const POINT*);
2103
2104 HRESULT
2105 WINAPI
2106 SHDoDragDrop(
2107 _In_opt_ HWND,
2108 _In_ IDataObject*,
2109 _In_opt_ IDropSource*,
2110 _In_ DWORD,
2111 _Out_ LPDWORD);
2112
2113 /****************************************************************************
2114 * Internet shortcut properties
2115 */
2116
2117 #define PID_IS_URL 2
2118 #define PID_IS_NAME 4
2119 #define PID_IS_WORKINGDIR 5
2120 #define PID_IS_HOTKEY 6
2121 #define PID_IS_SHOWCMD 7
2122 #define PID_IS_ICONINDEX 8
2123 #define PID_IS_ICONFILE 9
2124 #define PID_IS_WHATSNEW 10
2125 #define PID_IS_AUTHOR 11
2126 #define PID_IS_DESCRIPTION 12
2127 #define PID_IS_COMMENT 13
2128
2129
2130 LPITEMIDLIST WINAPI ILAppendID(_In_opt_ LPITEMIDLIST, _In_ LPCSHITEMID, BOOL);
2131 LPITEMIDLIST WINAPI ILClone(_In_ LPCITEMIDLIST);
2132 LPITEMIDLIST WINAPI ILCloneFirst(_In_ LPCITEMIDLIST);
2133 LPITEMIDLIST WINAPI ILCreateFromPathA(_In_ LPCSTR);
2134 LPITEMIDLIST WINAPI ILCreateFromPathW(_In_ LPCWSTR);
2135 #define ILCreateFromPath WINELIB_NAME_AW(ILCreateFromPath)
2136 LPITEMIDLIST WINAPI ILCombine(_In_opt_ LPCITEMIDLIST, _In_opt_ LPCITEMIDLIST);
2137 LPITEMIDLIST WINAPI ILFindChild(_In_ LPCITEMIDLIST, _In_ LPCITEMIDLIST);
2138 LPITEMIDLIST WINAPI ILFindLastID(_In_ LPCITEMIDLIST);
2139 void WINAPI ILFree(_In_opt_ LPITEMIDLIST);
2140 LPITEMIDLIST WINAPI ILGetNext(_In_opt_ LPCITEMIDLIST);
2141 UINT WINAPI ILGetSize(_In_opt_ LPCITEMIDLIST);
2142 BOOL WINAPI ILIsEqual(_In_ LPCITEMIDLIST, _In_ LPCITEMIDLIST);
2143 BOOL WINAPI ILIsParent(_In_ LPCITEMIDLIST, _In_ LPCITEMIDLIST, BOOL);
2144 HRESULT WINAPI ILLoadFromStream(_In_ LPSTREAM, _Inout_ LPITEMIDLIST*);
2145 BOOL WINAPI ILRemoveLastID(_Inout_opt_ LPITEMIDLIST);
2146 HRESULT WINAPI ILSaveToStream(_In_ LPSTREAM, _In_ LPCITEMIDLIST);
2147
2148
2149 #include <poppack.h>
2150
2151
2152 /* menu merging */
2153 #define MM_ADDSEPARATOR 0x00000001L
2154 #define MM_SUBMENUSHAVEIDS 0x00000002L
2155 #define MM_DONTREMOVESEPS 0x00000004L
2156
2157 UINT
2158 WINAPI
2159 Shell_MergeMenus(
2160 _In_ HMENU hmDst,
2161 _In_ HMENU hmSrc,
2162 UINT uInsert,
2163 UINT uIDAdjust,
2164 UINT uIDAdjustMax,
2165 ULONG uFlags);
2166
2167
2168 /****************************************************************************
2169 * SHCreateDefaultContextMenu API
2170 */
2171
2172 typedef struct
2173 {
2174 HWND hwnd;
2175 IContextMenuCB *pcmcb;
2176 PCIDLIST_ABSOLUTE pidlFolder;
2177 IShellFolder *psf;
2178 UINT cidl;
2179 PCUITEMID_CHILD_ARRAY apidl;
2180 IUnknown *punkAssociationInfo;
2181 UINT cKeys;
2182 const HKEY *aKeys;
2183 }DEFCONTEXTMENU;
2184
2185 HRESULT
2186 WINAPI
2187 SHCreateDefaultContextMenu(
2188 _In_ const DEFCONTEXTMENU *,
2189 _In_ REFIID,
2190 _Outptr_ void **ppv);
2191
2192 typedef HRESULT
2193 (CALLBACK * LPFNDFMCALLBACK)(
2194 _In_opt_ IShellFolder*,
2195 _In_opt_ HWND,
2196 _In_opt_ IDataObject*,
2197 UINT,
2198 WPARAM,
2199 LPARAM);
2200
2201 HRESULT
2202 WINAPI
2203 CDefFolderMenu_Create2(
2204 _In_opt_ PCIDLIST_ABSOLUTE,
2205 _In_opt_ HWND,
2206 UINT cidl,
2207 _In_reads_opt_(cidl) PCUITEMID_CHILD_ARRAY,
2208 _In_opt_ IShellFolder*,
2209 _In_opt_ LPFNDFMCALLBACK,
2210 UINT nKeys,
2211 _In_reads_opt_(nKeys) const HKEY *,
2212 _Outptr_ IContextMenu **);
2213
2214 #define DFM_MERGECONTEXTMENU 1
2215 #define DFM_INVOKECOMMAND 2
2216 #define DFM_INVOKECOMMANDEX 12
2217 #define DFM_GETDEFSTATICID 14
2218
2219 #define DFM_CMD_DELETE ((UINT)-1)
2220 #define DFM_CMD_MOVE ((UINT)-2)
2221 #define DFM_CMD_COPY ((UINT)-3)
2222 #define DFM_CMD_LINK ((UINT)-4)
2223 #define DFM_CMD_PROPERTIES ((UINT)-5)
2224 #define DFM_CMD_NEWFOLDER ((UINT)-6)
2225 #define DFM_CMD_PASTE ((UINT)-7)
2226 #define DFM_CMD_VIEWLIST ((UINT)-8)
2227 #define DFM_CMD_VIEWDETAILS ((UINT)-9)
2228 #define DFM_CMD_PASTELINK ((UINT)-10)
2229 #define DFM_CMD_PASTESPECIAL ((UINT)-11)
2230 #define DFM_CMD_MODALPROP ((UINT)-12)
2231 #define DFM_CMD_RENAME ((UINT)-13)
2232
2233 /****************************************************************************
2234 * SHCreateDefaultExtractIcon API
2235 */
2236
2237 HRESULT WINAPI
2238 SHCreateDefaultExtractIcon(
2239 REFIID riid,
2240 void **ppv);
2241 /****************************************************************************
2242 * SHCreateDataObject API
2243 */
2244
2245 HRESULT WINAPI SHCreateDataObject(
2246 _In_opt_ PCIDLIST_ABSOLUTE pidlFolder,
2247 _In_ UINT cidl,
2248 _In_reads_opt_(cidl) PCUITEMID_CHILD_ARRAY apidl,
2249 _In_opt_ IDataObject *pdtInner,
2250 _In_ REFIID riid,
2251 _Outptr_ void **ppv);
2252
2253 /****************************************************************************
2254 * CIDLData_CreateFromIDArray API
2255 */
2256
2257 HRESULT WINAPI CIDLData_CreateFromIDArray(
2258 _In_ PCIDLIST_ABSOLUTE pidlFolder,
2259 _In_ UINT cidl,
2260 _In_reads_opt_(cidl) PCUIDLIST_RELATIVE_ARRAY apidl,
2261 _Outptr_ IDataObject **ppdtobj);
2262
2263 /****************************************************************************
2264 * SHOpenWithDialog
2265 */
2266
2267 enum tagOPEN_AS_INFO_FLAGS
2268 {
2269 OAIF_ALLOW_REGISTRATION = 1,
2270 OAIF_REGISTER_EXT = 2,
2271 OAIF_EXEC = 4,
2272 OAIF_FORCE_REGISTRATION = 8,
2273 #if (NTDDI_VERSION >= NTDDI_VISTA)
2274 OAIF_HIDE_REGISTRATION = 32,
2275 OAIF_URL_PROTOCOL = 64,
2276 #endif
2277 };
2278 typedef int OPEN_AS_INFO_FLAGS;
2279
2280
2281 typedef struct tagOPENASINFO {
2282 LPCWSTR pcszFile;
2283 LPCWSTR pcszClass;
2284 OPEN_AS_INFO_FLAGS oaifInFlags;
2285 } OPENASINFO;
2286
2287 HRESULT
2288 WINAPI
2289 SHOpenWithDialog(
2290 _In_opt_ HWND hwndParent,
2291 _In_ const OPENASINFO *poainfo);
2292
2293 #define INTERFACE IShellIconOverlayIdentifier
2294
2295 DECLARE_INTERFACE_(IShellIconOverlayIdentifier, IUnknown)
2296 {
2297 STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
2298 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
2299 STDMETHOD_(ULONG,Release) (THIS) PURE;
2300
2301 STDMETHOD (IsMemberOf)(THIS_ _In_ LPCWSTR pwszPath, DWORD dwAttrib) PURE;
2302 STDMETHOD (GetOverlayInfo)(THIS_ _Out_writes_(cchMax) LPWSTR pwszIconFile, int cchMax, _Out_ int * pIndex, _Out_ DWORD * pdwFlags) PURE;
2303 STDMETHOD (GetPriority)(THIS_ _Out_ int * pIPriority) PURE;
2304 };
2305
2306 #if !defined(__cplusplus) || defined(CINTERFACE)
2307 /*** IUnknown methods ***/
2308 #define IShellIconOverlayIdentifier_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2309 #define IShellIconOverlayIdentifier_AddRef(p) (p)->lpVtbl->AddRef(p)
2310 #define IShellIconOverlayIdentifier_Release(p) (p)->lpVtbl->Release(p)
2311 /*** IShellIconOverlayIdentifier methods ***/
2312 #define IShellIconOverlayIdentifier_IsMemberOf(p,a,b) (p)->lpVtbl->IsMemberOf(p,a,b)
2313 #define IShellIconOverlayIdentifier_GetOverlayInfo(p,a,b,c,d) (p)->lpVtbl->GetOverlayInfo(p,a,b,c,d)
2314 #define IShellIconOverlayIdentifier_GetPriority(p,a) (p)->lpVtbl->GetPriority(p,a)
2315 #endif
2316
2317 #define ISIOI_ICONFILE 0x00000001
2318 #define ISIOI_ICONINDEX 0x00000002
2319
2320 #undef INTERFACE
2321
2322 /****************************************************************************
2323 * Travel log
2324 */
2325
2326 #define TLOG_BACK -1
2327 #define TLOG_FORE 1
2328
2329 #define TLMENUF_INCLUDECURRENT 0x00000001
2330 #define TLMENUF_CHECKCURRENT (TLMENUF_INCLUDECURRENT | 0x00000002)
2331 #define TLMENUF_BACK 0x00000010 // Default
2332 #define TLMENUF_FORE 0x00000020
2333 #define TLMENUF_BACKANDFORTH (TLMENUF_BACK | TLMENUF_FORE | TLMENUF_INCLUDECURRENT)
2334
2335 /*****************************************************************************
2336 * IDockingWindowSite interface
2337 */
2338 #define INTERFACE IDockingWindowSite
2339 DECLARE_INTERFACE_(IDockingWindowSite, IOleWindow)
2340 {
2341 // *** IUnknown methods ***
2342 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
2343 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2344 STDMETHOD_(ULONG,Release)(THIS) PURE;
2345
2346 // *** IOleWindow methods ***
2347 STDMETHOD(GetWindow)(THIS_ HWND *lphwnd) PURE;
2348 STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL fEnterMode) PURE;
2349
2350 // *** IDockingWindowSite methods ***
2351 STDMETHOD(GetBorderDW)(THIS_ _In_ IUnknown *punkObj, _Out_ LPRECT prcBorder) PURE;
2352 STDMETHOD(RequestBorderSpaceDW)(THIS_ _In_ IUnknown *punkObj, _In_ LPCBORDERWIDTHS pbw) PURE;
2353 STDMETHOD(SetBorderSpaceDW)(THIS_ _In_ IUnknown *punkObj, _In_ LPCBORDERWIDTHS pbw) PURE;
2354 };
2355 #undef INTERFACE
2356
2357 #if !defined(__cplusplus) || defined(CINTERFACE)
2358 /*** IUnknown methods ***/
2359 #define IDockingWindowSite_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2360 #define IDockingWindowSite_AddRef(p) (p)->lpVtbl->AddRef(p)
2361 #define IDockingWindowSite_Release(p) (p)->lpVtbl->Release(p)
2362 /*** IOleWindow methods ***/
2363 #define IDockingWindowSite_GetWindow(p,a) (p)->lpVtbl->GetWindow(p,a)
2364 #define IDockingWindowSite_ContextSensitiveHelp(p,a) (p)->lpVtbl->ContextSensitiveHelp(p,a)
2365 /*** IDockingWindowSite methods ***/
2366 #define IDockingWindowSite_GetBorderDW(p,a,b) (p)->lpVtbl->GetBorderDW(p,a,b)
2367 #define IDockingWindowSite_RequestBorderSpaceDW(p,a,b) (p)->lpVtbl->RequestBorderSpaceDW(p,a,b)
2368 #define IDockingWindowSite_SetBorderSpaceDW(p,a,b) (p)->lpVtbl->SetBorderSpaceDW(p,a,b)
2369 #endif
2370
2371 typedef void (CALLBACK *PFNASYNCICONTASKBALLBACK)(LPCITEMIDLIST pidl, LPVOID pvData, LPVOID pvHint, INT iIconIndex, INT iOpenIconIndex);
2372
2373 /*****************************************************************************
2374 * Control Panel functions
2375 */
2376 LRESULT WINAPI CallCPLEntry16(HINSTANCE hMod, FARPROC pFunc, HWND dw3, UINT dw4, LPARAM dw5, LPARAM dw6);
2377
2378 #ifdef __cplusplus
2379 } /* extern "C" */
2380 #endif /* defined(__cplusplus) */
2381
2382 #endif /* __WINE_SHLOBJ_H */