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