comctl32/header: Make Header_* macros match PSDK.
[wine] / include / 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 #include <shlguid.h>
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif /* defined(__cplusplus) */
30
31 /* Except for specific structs, this header is byte packed */
32 #include <pshpack1.h>
33
34 #include <shtypes.h>
35 #include <shobjidl.h>
36
37 #ifndef HPSXA_DEFINED
38 #define HPSXA_DEFINED
39 DECLARE_HANDLE(HPSXA);
40 #endif
41
42 UINT         WINAPI SHAddFromPropSheetExtArray(HPSXA,LPFNADDPROPSHEETPAGE,LPARAM);
43 LPVOID       WINAPI SHAlloc(ULONG) __WINE_ALLOC_SIZE(1);
44 HRESULT      WINAPI SHCoCreateInstance(LPCWSTR,const CLSID*,IUnknown*,REFIID,LPVOID*);
45 HPSXA        WINAPI SHCreatePropSheetExtArray(HKEY,LPCWSTR,UINT);
46 HPSXA        WINAPI SHCreatePropSheetExtArrayEx(HKEY,LPCWSTR,UINT,IDataObject*);
47 HRESULT      WINAPI SHCreateShellItem(LPCITEMIDLIST,IShellFolder*,LPCITEMIDLIST,IShellItem**);
48 DWORD        WINAPI SHCLSIDFromStringA(LPCSTR,CLSID*);
49 DWORD        WINAPI SHCLSIDFromStringW(LPCWSTR,CLSID*);
50 #define             SHCLSIDFromString WINELIB_NAME_AW(SHCLSIDFromString)
51 HRESULT      WINAPI SHCreateStdEnumFmtEtc(DWORD,const FORMATETC *,IEnumFORMATETC**);
52 void         WINAPI SHDestroyPropSheetExtArray(HPSXA);
53 BOOL         WINAPI SHFindFiles(LPCITEMIDLIST,LPCITEMIDLIST);
54 DWORD        WINAPI SHFormatDrive(HWND,UINT,UINT,UINT);
55 void         WINAPI SHFree(LPVOID);
56 BOOL         WINAPI GetFileNameFromBrowse(HWND,LPSTR,DWORD,LPCSTR,LPCSTR,LPCSTR,LPCSTR);
57 HRESULT      WINAPI SHGetInstanceExplorer(IUnknown**);
58 HRESULT      WINAPI SHGetFolderPathAndSubDirA(HWND,int,HANDLE,DWORD,LPCSTR,LPSTR);
59 HRESULT      WINAPI SHGetFolderPathAndSubDirW(HWND,int,HANDLE,DWORD,LPCWSTR,LPWSTR);
60 #define             SHGetFolderPathAndSubDir WINELIB_NAME_AW(SHGetFolderPathAndSubDir);
61 BOOL         WINAPI SHGetPathFromIDListA(LPCITEMIDLIST,LPSTR);
62 BOOL         WINAPI SHGetPathFromIDListW(LPCITEMIDLIST,LPWSTR);
63 #define             SHGetPathFromIDList WINELIB_NAME_AW(SHGetPathFromIDList)
64 INT          WINAPI SHHandleUpdateImage(LPCITEMIDLIST);
65 HRESULT      WINAPI SHILCreateFromPath(LPCWSTR,LPITEMIDLIST*,DWORD*);
66 HRESULT      WINAPI SHLoadOLE(LPARAM);
67 HRESULT      WINAPI SHParseDisplayName(LPCWSTR,IBindCtx*,LPITEMIDLIST*,SFGAOF,SFGAOF*);
68 HRESULT      WINAPI SHPathPrepareForWriteA(HWND,IUnknown*,LPCSTR,DWORD);
69 HRESULT      WINAPI SHPathPrepareForWriteW(HWND,IUnknown*,LPCWSTR,DWORD);
70 #define             SHPathPrepareForWrite WINELIB_NAME_AW(SHPathPrepareForWrite);
71 UINT         WINAPI SHReplaceFromPropSheetExtArray(HPSXA,UINT,LPFNADDPROPSHEETPAGE,LPARAM);
72 LPITEMIDLIST WINAPI SHSimpleIDListFromPath(LPCWSTR);
73 int          WINAPI SHMapPIDLToSystemImageListIndex(IShellFolder*,LPCITEMIDLIST,int*);
74 HRESULT      WINAPI SHStartNetConnectionDialog(HWND,LPCSTR,DWORD);
75 VOID         WINAPI SHUpdateImageA(LPCSTR,INT,UINT,INT);
76 VOID         WINAPI SHUpdateImageW(LPCWSTR,INT,UINT,INT);
77 #define             SHUpdateImage WINELIB_NAME_AW(SHUpdateImage)
78 int          WINAPI RestartDialog(HWND,LPCWSTR,DWORD);
79 int          WINAPI RestartDialogEx(HWND,LPCWSTR,DWORD,DWORD);
80
81 #define SHFMT_ERROR     0xFFFFFFFFL  /* Error on last format, drive may be formattable */
82 #define SHFMT_CANCEL    0xFFFFFFFEL  /* Last format was cancelled */
83 #define SHFMT_NOFORMAT  0xFFFFFFFDL  /* Drive is not formattable */
84
85 /* SHFormatDrive flags */
86 #define SHFMT_ID_DEFAULT        0xFFFF
87 #define SHFMT_OPT_FULL          1
88 #define SHFMT_OPT_SYSONLY       2
89
90 /* SHPathPrepareForWrite flags */
91 #define SHPPFW_NONE             0x00000000
92 #define SHPPFW_DIRCREATE        0x00000001
93 #define SHPPFW_DEFAULT          SHPPFW_DIRCREATE
94 #define SHPPFW_ASKDIRCREATE     0x00000002
95 #define SHPPFW_IGNOREFILENAME   0x00000004
96 #define SHPPFW_NOWRITECHECK     0x00000008
97 #define SHPPFW_MEDIACHECKONLY   0x00000010
98
99 /* SHObjectProperties flags */
100 #define SHOP_PRINTERNAME 0x01
101 #define SHOP_FILEPATH    0x02
102 #define SHOP_VOLUMEGUID  0x04
103
104 BOOL WINAPI SHObjectProperties(HWND,DWORD,LPCWSTR,LPCWSTR);
105
106 #define PCS_FATAL           0x80000000
107 #define PCS_REPLACEDCHAR    0x00000001
108 #define PCS_REMOVEDCHAR     0x00000002
109 #define PCS_TRUNCATED       0x00000004
110 #define PCS_PATHTOOLONG     0x00000008
111
112 int WINAPI PathCleanupSpec(LPCWSTR,LPWSTR);
113
114 /*****************************************************************************
115  * IContextMenu interface
116  */
117
118
119 /* DATAOBJECT_InitShellIDList*/
120 #define CFSTR_SHELLIDLISTA           "Shell IDList Array"   /* CF_IDLIST */
121 #define CFSTR_SHELLIDLISTOFFSETA     "Shell Object Offsets" /* CF_OBJECTPOSITIONS */
122 #define CFSTR_NETRESOURCESA          "Net Resource"         /* CF_NETRESOURCE */
123 /* DATAOBJECT_InitFileGroupDesc */
124 #define CFSTR_FILEDESCRIPTORA        "FileGroupDescriptor"  /* CF_FILEGROUPDESCRIPTORA */
125 /* DATAOBJECT_InitFileContents*/
126 #define CFSTR_FILECONTENTSA          "FileContents"         /* CF_FILECONTENTS */
127 #define CFSTR_FILENAMEA              "FileName"             /* CF_FILENAMEA */
128 #define CFSTR_FILENAMEMAPA           "FileNameMap"          /* CF_FILENAMEMAPA */
129 #define CFSTR_PRINTERGROUPA          "PrinterFriendlyName"  /* CF_PRINTERS */
130 #define CFSTR_SHELLURLA              "UniformResourceLocator"
131 #define CFSTR_INETURLA               CFSTR_SHELLURLA
132 #define CFSTR_PREFERREDDROPEFFECTA   "Preferred DropEffect"
133 #define CFSTR_PERFORMEDDROPEFFECTA   "Performed DropEffect"
134 #define CFSTR_PASTESUCCEEDEDA        "Paste Succeeded"
135 #define CFSTR_INDRAGLOOPA            "InShellDragLoop"
136 #define CFSTR_DRAGCONTEXTA           "DragContext"
137 #define CFSTR_MOUNTEDVOLUMEA         "MountedVolume"
138 #define CFSTR_PERSISTEDDATAOBJECTA   "PersistedDataObject"
139 #define CFSTR_TARGETCLSIDA           "TargetCLSID"
140 #define CFSTR_AUTOPLAY_SHELLIDLISTSA "Autoplay Enumerated IDList Array"
141 #define CFSTR_LOGICALPERFORMEDDROPEFFECTA "Logical Performed DropEffect"
142
143 #if defined(__GNUC__)
144 # define CFSTR_SHELLIDLISTW \
145     (const WCHAR []){ 'S','h','e','l','l',' ','I','D','L','i','s','t',' ','A','r','r','a','y',0 }
146 # define CFSTR_SHELLIDLISTOFFSETW \
147     (const WCHAR []){ 'S','h','e','l','l',' ','O','b','j','e','c','t',' ','O','f','f','s','e','t','s',0 }
148 # define CFSTR_NETRESOURCESW \
149     (const WCHAR []){ 'N','e','t',' ','R','e','s','o','u','r','c','e',0 }
150 # define CFSTR_FILEDESCRIPTORW \
151     (const WCHAR []){ 'F','i','l','e','G','r','o','u','p','D','e','s','c','r','i','p','t','o','r','W',0 }
152 # define CFSTR_FILECONTENTSW \
153     (const WCHAR []){ 'F','i','l','e','C','o','n','t','e','n','t','s',0 }
154 # define CFSTR_FILENAMEW \
155     (const WCHAR []){ 'F','i','l','e','N','a','m','e','W',0 }
156 # define CFSTR_FILENAMEMAPW \
157     (const WCHAR []){ 'F','i','l','e','N','a','m','e','M','a','p','W',0 }
158 # define CFSTR_PRINTERGROUPW \
159     (const WCHAR []){ 'P','r','i','n','t','e','r','F','r','i','e','n','d','l','y','N','a','m','e',0 }
160 # define CFSTR_SHELLURLW \
161     (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 }
162 # define CFSTR_INETURLW \
163     (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 }
164 # define CFSTR_PREFERREDDROPEFFECTW \
165     (const WCHAR []){ 'P','r','e','f','e','r','r','e','d',' ','D','r','o','p','E','f','f','e','c','t',0 }
166 # define CFSTR_PERFORMEDDROPEFFECTW \
167     (const WCHAR []){ 'P','e','r','f','o','r','m','e','d',' ','D','r','o','p','E','f','f','e','c','t',0 }
168 # define CFSTR_PASTESUCCEEDEDW \
169     (const WCHAR []){ 'P','a','s','t','e',' ','S','u','c','c','e','e','d','e','d',0 }
170 # define CFSTR_INDRAGLOOPW \
171     (const WCHAR []){ 'I','n','S','h','e','l','l','D','r','a','g','L','o','o','p',0 }
172 # define CFSTR_DRAGCONTEXTW \
173     (const WCHAR []){ 'D','r','a','g','C','o','n','t','e','x','t',0 }
174 # define CFSTR_MOUNTEDVOLUMEW \
175     (const WCHAR []){ 'M','o','u','n','t','e','d','V','o','l','u','m','e',0 }
176 # define CFSTR_PERSISTEDDATAOBJECTW \
177     (const WCHAR []){ 'P','e','r','s','i','s','t','e','d','D','a','t','a','O','b','j','e','c','t',0 }
178 # define CFSTR_TARGETCLSIDW \
179     (const WCHAR []){ 'T','a','r','g','e','t','C','L','S','I','D',0 }
180 # define CFSTR_AUTOPLAY_SHELLIDLISTSW \
181     (const WCHAR []){ 'A','u','t','o','p','l','a','y',' ','E','n','u','m','e','r','a','t','e','d',\
182                       ' ','I','D','L','i','s','t',' ','A','r','r','a','y',0 }
183 # define CFSTR_LOGICALPERFORMEDDROPEFFECTW \
184     (const WCHAR []){ 'L','o','g','i','c','a','l',' ','P','e','r','f','o','r','m','e','d',\
185                       ' ','D','r','o','p','E','f','f','e','c','t',0 }
186 #elif defined(_MSC_VER)
187 # define CFSTR_SHELLIDLISTW           L"Shell IDList Array"
188 # define CFSTR_SHELLIDLISTOFFSETW     L"Shell Object Offsets"
189 # define CFSTR_NETRESOURCESW          L"Net Resource"
190 # define CFSTR_FILEDESCRIPTORW        L"FileGroupDescriptorW"
191 # define CFSTR_FILECONTENTSW          L"FileContents"
192 # define CFSTR_FILENAMEW              L"FileNameW"
193 # define CFSTR_FILENAMEMAPW           L"FileNameMapW"
194 # define CFSTR_PRINTERGROUPW          L"PrinterFriendlyName"
195 # define CFSTR_SHELLURLW              L"UniformResourceLocator"
196 # define CFSTR_INETURLW               L"UniformResourceLocatorW"
197 # define CFSTR_PREFERREDDROPEFFECTW   L"Preferred DropEffect"
198 # define CFSTR_PERFORMEDDROPEFFECTW   L"Performed DropEffect"
199 # define CFSTR_PASTESUCCEEDEDW        L"Paste Succeeded"
200 # define CFSTR_INDRAGLOOPW            L"InShellDragLoop"
201 # define CFSTR_DRAGCONTEXTW           L"DragContext"
202 # define CFSTR_MOUNTEDVOLUMEW         L"MountedVolume"
203 # define CFSTR_PERSISTEDDATAOBJECTW   L"PersistedDataObject"
204 # define CFSTR_TARGETCLSIDW           L"TargetCLSID"
205 # define CFSTR_AUTOPLAY_SHELLIDLISTSW L"Autoplay Enumerated IDList Array"
206 # define CFSTR_LOGICALPERFORMEDDROPEFFECTW L"Logical Performed DropEffect"
207 #else
208 static const WCHAR CFSTR_SHELLIDLISTW[] =
209     { 'S','h','e','l','l',' ','I','D','L','i','s','t',' ','A','r','r','a','y',0 };
210 static const WCHAR CFSTR_SHELLIDLISTOFFSETW[] =
211     { 'S','h','e','l','l',' ','O','b','j','e','c','t',' ','O','f','f','s','e','t','s',0 };
212 static const WCHAR CFSTR_NETRESOURCESW[] =
213     { 'N','e','t',' ','R','e','s','o','u','r','c','e',0 };
214 static const WCHAR CFSTR_FILEDESCRIPTORW[] =
215     { 'F','i','l','e','G','r','o','u','p','D','e','s','c','r','i','p','t','o','r','W',0 };
216 static const WCHAR CFSTR_FILECONTENTSW[] =
217     { 'F','i','l','e','C','o','n','t','e','n','t','s',0 };
218 static const WCHAR CFSTR_FILENAMEW[] =
219     { 'F','i','l','e','N','a','m','e','W',0 }
220 static const WCHAR CFSTR_FILENAMEMAPW[] =
221     { 'F','i','l','e','N','a','m','e','M','a','p','W',0 };
222 static const WCHAR CFSTR_PRINTERGROUPW[] =
223     { 'P','r','i','n','t','e','r','F','r','i','e','n','d','l','y','N','a','m','e',0 };
224 static const WCHAR CFSTR_SHELLURLW[] =
225     { 'U','n','i','f','o','r','m','R','e','s','o','u','r','c','e','L','o','c','a','t','o','r',0 };
226 static const WCHAR CFSTR_INETURLW[] =
227     { 'U','n','i','f','o','r','m','R','e','s','o','u','r','c','e','L','o','c','a','t','o','r','W',0 };
228 static const WCHAR CFSTR_PREFERREDDROPEFFECTW[] =
229     { 'P','r','e','f','e','r','r','e','d',' ','D','r','o','p','E','f','f','e','c','t',0 };
230 static const WCHAR CFSTR_PERFORMEDDROPEFFECTW[] =
231     { 'P','e','r','f','o','r','m','e','d',' ','D','r','o','p','E','f','f','e','c','t',0 };
232 static const WCHAR CFSTR_PASTESUCCEEDEDW[] =
233     { 'P','a','s','t','e',' ','S','u','c','c','e','e','d','e','d',0 };
234 static const WCHAR CFSTR_INDRAGLOOPW[] =
235     { 'I','n','S','h','e','l','l','D','r','a','g','L','o','o','p',0 };
236 static const WCHAR CFSTR_DRAGCONTEXTW[] =
237     { 'D','r','a','g','C','o','n','t','e','x','t',0 };
238 static const WCHAR CFSTR_MOUNTEDVOLUMEW[] =
239     { 'M','o','u','n','t','e','d','V','o','l','u','m','e',0 };
240 static const WCHAR CFSTR_PERSISTEDDATAOBJECTW[] =
241     { 'P','e','r','s','i','s','t','e','d','D','a','t','a','O','b','j','e','c','t',0 };
242 static const WCHAR CFSTR_TARGETCLSIDW[] =
243     { 'T','a','r','g','e','t','C','L','S','I','D',0 };
244 static const WCHAR CFSTR_AUTOPLAY_SHELLIDLISTSW[] =
245     { 'A','u','t','o','p','l','a','y',' ','E','n','u','m','e','r','a','t','e','d',
246       ' ','I','D','L','i','s','t',' ','A','r','r','a','y',0 };
247 static const WCHAR CFSTR_LOGICALPERFORMEDDROPEFFECTW[] =
248     { 'L','o','g','i','c','a','l',' ','P','e','r','f','o','r','m','e','d',
249       ' ','D','r','o','p','E','f','f','e','c','t',0 };
250 #endif
251
252 #define CFSTR_SHELLIDLIST           WINELIB_NAME_AW(CFSTR_SHELLIDLIST)
253 #define CFSTR_SHELLIDLISTOFFSET     WINELIB_NAME_AW(CFSTR_SHELLIDLISTOFFSET)
254 #define CFSTR_NETRESOURCES          WINELIB_NAME_AW(CFSTR_NETRESOURCES)
255 #define CFSTR_FILEDESCRIPTOR        WINELIB_NAME_AW(CFSTR_FILEDESCRIPTOR)
256 #define CFSTR_FILECONTENTS          WINELIB_NAME_AW(CFSTR_FILECONTENTS)
257 #define CFSTR_FILENAME              WINELIB_NAME_AW(CFSTR_FILENAME)
258 #define CFSTR_FILENAMEMAP           WINELIB_NAME_AW(CFSTR_FILENAMEMAP)
259 #define CFSTR_PRINTERGROUP          WINELIB_NAME_AW(CFSTR_PRINTERGROUP)
260 #define CFSTR_SHELLURL              WINELIB_NAME_AW(CFSTR_SHELLURL)
261 #define CFSTR_INETURL               WINELIB_NAME_AW(CFSTR_INETURL)
262 #define CFSTR_PREFERREDDROPEFFECT   WINELIB_NAME_AW(CFSTR_PREFERREDDROPEFFECT)
263 #define CFSTR_PERFORMEDDROPEFFECT   WINELIB_NAME_AW(CFSTR_PERFORMEDDROPEFFECT)
264 #define CFSTR_PASTESUCCEEDED        WINELIB_NAME_AW(CFSTR_PASTESUCCEEDED)
265 #define CFSTR_INDRAGLOOP            WINELIB_NAME_AW(CFSTR_INDRAGLOOP)
266 #define CFSTR_DRAGCONTEXT           WINELIB_NAME_AW(CFSTR_DRAGCONTEXT)
267 #define CFSTR_MOUNTEDVOLUME         WINELIB_NAME_AW(CFSTR_MOUNTEDVOLUME)
268 #define CFSTR_PERSISTEDDATAOBJECT   WINELIB_NAME_AW(CFSTR_PERSISTEDDATAOBJECT)
269 #define CFSTR_TARGETCLSID           WINELIB_NAME_AW(CFSTR_TARGETCLSID)
270 #define CFSTR_AUTOPLAY_SHELLIDLISTS WINELIB_NAME_AW(CFSTR_AUTOPLAY_SHELLIDLISTS)
271 #define CFSTR_LOGICALPERFORMEDDROPEFFECT WINELIB_NAME_AW(CFSTR_LOGICALPERFORMEDDROPEFFECT)
272
273 typedef struct
274 {       UINT cidl;
275         UINT aoffset[1];
276 } CIDA, *LPIDA;
277
278 /************************************************************************
279 * IShellView interface
280 */
281
282 #define FCIDM_SHVIEWFIRST       0x0000
283 /* undocumented */
284 #define FCIDM_SHVIEW_ARRANGE    0x7001
285 #define FCIDM_SHVIEW_DELETE     0x7011
286 #define FCIDM_SHVIEW_PROPERTIES 0x7013
287 #define FCIDM_SHVIEW_CUT        0x7018
288 #define FCIDM_SHVIEW_COPY       0x7019
289 #define FCIDM_SHVIEW_INSERT     0x701A
290 #define FCIDM_SHVIEW_UNDO       0x701B
291 #define FCIDM_SHVIEW_INSERTLINK 0x701C
292 #define FCIDM_SHVIEW_SELECTALL  0x7021
293 #define FCIDM_SHVIEW_INVERTSELECTION 0x7022
294
295 #define FCIDM_SHVIEW_BIGICON    0x7029
296 #define FCIDM_SHVIEW_SMALLICON  0x702A
297 #define FCIDM_SHVIEW_LISTVIEW   0x702B
298 #define FCIDM_SHVIEW_REPORTVIEW 0x702C
299 /* 0x7030-0x703f are used by the shellbrowser */
300 #define FCIDM_SHVIEW_AUTOARRANGE 0x7031
301 #define FCIDM_SHVIEW_SNAPTOGRID 0x7032
302
303 #define FCIDM_SHVIEW_HELP       0x7041
304 #define FCIDM_SHVIEW_RENAME     0x7050
305 #define FCIDM_SHVIEW_CREATELINK 0x7051
306 #define FCIDM_SHVIEW_NEWLINK    0x7052
307 #define FCIDM_SHVIEW_NEWFOLDER  0x7053
308
309 #define FCIDM_SHVIEW_REFRESH    0x7100 /* FIXME */
310 #define FCIDM_SHVIEW_EXPLORE    0x7101 /* FIXME */
311 #define FCIDM_SHVIEW_OPEN       0x7102 /* FIXME */
312
313 #define FCIDM_SHVIEWLAST        0x7fff
314 #define FCIDM_BROWSERFIRST      0xA000
315 /* undocumented toolbar items from stddlg's*/
316 #define FCIDM_TB_UPFOLDER       0xA001
317 #define FCIDM_TB_NEWFOLDER      0xA002
318 #define FCIDM_TB_SMALLICON      0xA003
319 #define FCIDM_TB_REPORTVIEW     0xA004
320 #define FCIDM_TB_DESKTOP        0xA005  /* FIXME */
321
322 #define FCIDM_BROWSERLAST       0xbf00
323 #define FCIDM_GLOBALFIRST       0x8000
324 #define FCIDM_GLOBALLAST        0x9fff
325
326 /*
327 * Global submenu IDs and separator IDs
328 */
329 #define FCIDM_MENU_FILE             (FCIDM_GLOBALFIRST+0x0000)
330 #define FCIDM_MENU_EDIT             (FCIDM_GLOBALFIRST+0x0040)
331 #define FCIDM_MENU_VIEW             (FCIDM_GLOBALFIRST+0x0080)
332 #define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081)
333 #define FCIDM_MENU_TOOLS            (FCIDM_GLOBALFIRST+0x00c0)
334 #define FCIDM_MENU_TOOLS_SEP_GOTO   (FCIDM_GLOBALFIRST+0x00c1)
335 #define FCIDM_MENU_HELP             (FCIDM_GLOBALFIRST+0x0100)
336 #define FCIDM_MENU_FIND             (FCIDM_GLOBALFIRST+0x0140)
337 #define FCIDM_MENU_EXPLORE          (FCIDM_GLOBALFIRST+0x0150)
338 #define FCIDM_MENU_FAVORITES        (FCIDM_GLOBALFIRST+0x0170)
339
340 /* control IDs known to the view */
341 #define FCIDM_TOOLBAR      (FCIDM_BROWSERFIRST + 0)
342 #define FCIDM_STATUS       (FCIDM_BROWSERFIRST + 1)
343
344
345 /****************************************************************************
346  * IShellIcon interface
347  */
348
349 #define INTERFACE IShellIcon
350 DECLARE_INTERFACE_(IShellIcon,IUnknown)
351 {
352     /*** IUnknown methods ***/
353     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
354     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
355     STDMETHOD_(ULONG,Release)(THIS) PURE;
356     /*** IShellIcon methods ***/
357     STDMETHOD(GetIconOf)(THIS_ LPCITEMIDLIST pidl, UINT flags, LPINT lpIconIndex) PURE;
358 };
359 #undef INTERFACE
360
361 #if !defined(__cplusplus) || defined(CINTERFACE)
362 /*** IUnknown methods ***/
363 #define IShellIcon_QueryInterface(p,a,b)      (p)->lpVtbl->QueryInterface(p,a,b)
364 #define IShellIcon_AddRef(p)                  (p)->lpVtbl->AddRef(p)
365 #define IShellIcon_Release(p)                 (p)->lpVtbl->Release(p)
366 /*** IShellIcon methods ***/
367 #define IShellIcon_GetIconOf(p,a,b,c)         (p)->lpVtbl->GetIconOf(p,a,b,c)
368 #endif
369
370 typedef IShellIcon *LPSHELLICON;
371
372 /* IQueryInfo interface */
373 #define INTERFACE IQueryInfo
374 DECLARE_INTERFACE_(IQueryInfo,IUnknown)
375 {
376     /*** IUnknown methods ***/
377     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
378     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
379     STDMETHOD_(ULONG,Release)(THIS) PURE;
380     /*** IQueryInfo methods ***/
381     STDMETHOD(GetInfoTip)(THIS_ DWORD dwFlags, WCHAR** lppTips) PURE;
382     STDMETHOD(GetInfoFlags)(THIS_ DWORD* lpFlags) PURE;
383 };
384 #undef INTERFACE
385
386 #if !defined(__cplusplus) || defined(CINTERFACE)
387 /*** IUnknown methods ***/
388 #define IQueryInfo_QueryInterface(p,a,b)      (p)->lpVtbl->QueryInterface(p,a,b)
389 #define IQueryInfo_AddRef(p)                  (p)->lpVtbl->AddRef(p)
390 #define IQueryInfo_Release(p)                 (p)->lpVtbl->Release(p)
391 /*** IQueryInfo methods ***/
392 #define IQueryInfo_GetInfoTip(p,a,b)          (p)->lpVtbl->GetInfoTip(p,a,b)
393 #define IQueryInfo_GetInfoFlags(p,a)          (p)->lpVtbl->GetInfoFlags(p,a)
394 #endif
395
396 /* IInputObject interface */
397 #define INTERFACE IInputObject
398 DECLARE_INTERFACE_(IInputObject,IUnknown)
399 {
400     /*** IUnknown methods ***/
401     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
402     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
403     STDMETHOD_(ULONG,Release)(THIS) PURE;
404     /*** IInputObject methods ***/
405     STDMETHOD(UIActivateIO)(THIS_ BOOL bActivating, LPMSG lpMsg) PURE;
406     STDMETHOD(HasFocusIO)(THIS) PURE;
407     STDMETHOD(TranslateAcceleratorIO)(THIS_ LPMSG lpMsg) PURE;
408 };
409 #undef INTERFACE
410
411 #if !defined(__cplusplus) || defined(CINTERFACE)
412 /*** IUnknown methods ***/
413 #define IInputObject_QueryInterface(p,a,b)       (p)->lpVtbl->QueryInterface(p,a,b)
414 #define IInputObject_AddRef(p)                   (p)->lpVtbl->AddRef(p)
415 #define IInputObject_Release(p)                  (p)->lpVtbl->Release(p)
416 /*** IInputObject methods ***/
417 #define IInputObject_UIActivateIO(p,a,b)         (p)->lpVtbl->UIActivateIO(p,a,b)
418 #define IInputObject_HasFocusIO(p)               (p)->lpVtbl->HasFocusIO(p)
419 #define IInputObject_TranslateAcceleratorIO(p,a) (p)->lpVtbl->TranslateAcceleratorIO(p,a)
420 #endif
421
422 /* IInputObjectSite interface */
423 #define INTERFACE IInputObjectSite
424 DECLARE_INTERFACE_(IInputObjectSite,IUnknown)
425 {
426     /*** IUnknown methods ***/
427     STDMETHOD_(HRESULT,QueryInterface) (THIS_ REFIID riid, void** ppvObject) PURE;
428     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
429     STDMETHOD_(ULONG,Release) (THIS) PURE;
430     /*** IInputObjectSite methods ***/
431     STDMETHOD(OnFocusChangeIS)(THIS_ LPUNKNOWN lpUnknown, BOOL bFocus) PURE;
432 };
433 #undef INTERFACE
434
435 #if !defined(__cplusplus) || defined(CINTERFACE)
436 /*** IUnknown methods ***/
437 #define IInputObjectSite_QueryInterface(p,a,b)  (p)->lpVtbl->QueryInterface(p,a,b)
438 #define IInputObjectSite_AddRef(p)              (p)->lpVtbl->AddRef(p)
439 #define IInputObjectSite_Release(p)             (p)->lpVtbl->Release(p)
440 /*** IInputObject methods ***/
441 #define IInputObjectSite_OnFocusChangeIS(p,a,b) (p)->lpVtbl->OnFocusChangeIS(p,a,b)
442 #endif
443
444 /* IObjMgr interface */
445 #define INTERFACE IObjMgr
446 DECLARE_INTERFACE_(IObjMgr,IUnknown)
447 {
448     /*** IUnknown methods ***/
449     STDMETHOD_(HRESULT,QueryInterface) (THIS_ REFIID riid, void** ppvObject) PURE;
450     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
451     STDMETHOD_(ULONG,Release) (THIS) PURE;
452     /*** IObjMgr methods ***/
453     STDMETHOD(Append)(THIS_ LPUNKNOWN punk) PURE;
454     STDMETHOD(Remove)(THIS_ LPUNKNOWN punk) PURE;
455 };
456 #undef INTERFACE
457
458 #if !defined(__cplusplus) || defined(CINTERFACE)
459 /*** IUnknown methods ***/
460 #define IObjMgr_QueryInterface(p,a,b)  (p)->lpVtbl->QueryInterface(p,a,b)
461 #define IObjMgr_AddRef(p)              (p)->lpVtbl->AddRef(p)
462 #define IObjMgr_Release(p)             (p)->lpVtbl->Release(p)
463 /*** IObjMgr methods ***/
464 #define IObjMgr_Append(p,a) (p)->lpVtbl->Append(p,a)
465 #define IObjMgr_Remove(p,a) (p)->lpVtbl->Remove(p,a)
466 #endif
467
468 /* IACList interface */
469 #define INTERFACE IACList
470 DECLARE_INTERFACE_(IACList,IUnknown)
471 {
472     /*** IUnknown methods ***/
473     STDMETHOD_(HRESULT,QueryInterface) (THIS_ REFIID riid, void** ppvObject) PURE;
474     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
475     STDMETHOD_(ULONG,Release) (THIS) PURE;
476     /*** IACList methods ***/
477     STDMETHOD(Expand)(THIS_ LPCOLESTR str) PURE;
478 };
479 #undef INTERFACE
480
481 #if !defined(__cplusplus) || defined(CINTERFACE)
482 /*** IUnknown methods ***/
483 #define IACList_QueryInterface(p,a,b)  (p)->lpVtbl->QueryInterface(p,a,b)
484 #define IACList_AddRef(p)              (p)->lpVtbl->AddRef(p)
485 #define IACList_Release(p)             (p)->lpVtbl->Release(p)
486 /*** IACList methods ***/
487 #define IACList_Expand(p,a)             (p)->lpVtbl->Expand(p,a)
488 #endif
489
490 /* IACList2 interface */
491 #define INTERFACE IACList2
492 DECLARE_INTERFACE_(IACList2,IACList)
493 {
494     /*** IUnknown methods ***/
495     STDMETHOD_(HRESULT,QueryInterface) (THIS_ REFIID riid, void** ppvObject) PURE;
496     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
497     STDMETHOD_(ULONG,Release) (THIS) PURE;
498     /*** IACList methods ***/
499     STDMETHOD(Expand)(THIS_ LPCOLESTR str) PURE;
500     /*** IACList2 methods ***/
501     STDMETHOD(SetOptions)(THIS_ DWORD dwFlag) PURE;
502     STDMETHOD(GetOptions)(THIS_ DWORD* pdwFlag) PURE;
503 };
504 #undef INTERFACE
505
506 #if !defined(__cplusplus) || defined(CINTERFACE)
507 /*** IUnknown methods ***/
508 #define IACList2_QueryInterface(p,a,b)  (p)->lpVtbl->QueryInterface(p,a,b)
509 #define IACList2_AddRef(p)              (p)->lpVtbl->AddRef(p)
510 #define IACList2_Release(p)             (p)->lpVtbl->Release(p)
511 /*** IACList2 methods ***/
512 #define IACList2_GetOptions(p,a)        (p)->lpVtbl->GetOptions(p,a)
513 #define IACList2_SetOptions(p,a)        (p)->lpVtbl->SetOptions(p,a)
514 #endif
515
516 /* IProgressDialog interface */
517 #define PROGDLG_NORMAL           0x00000000
518 #define PROGDLG_MODAL            0x00000001
519 #define PROGDLG_AUTOTIME         0x00000002
520 #define PROGDLG_NOTIME           0x00000004
521 #define PROGDLG_NOMINIMIZE       0x00000008
522 #define PROGDLG_NOPROGRESSBAR    0x00000010
523 #define PROGDLG_MARQUEEPROGRESS  0x00000020
524 #define PROGDLG_NOCANCEL         0x00000040
525
526 #define PDTIMER_RESET            0x00000001
527 #define PDTIMER_PAUSE            0x00000002
528 #define PDTIMER_RESUME           0x00000003
529
530 #define INTERFACE IProgressDialog
531 DECLARE_INTERFACE_(IProgressDialog,IUnknown)
532 {
533     /*** IUnknown methods ***/
534     STDMETHOD_(HRESULT,QueryInterface) (THIS_ REFIID riid, void** ppvObject) PURE;
535     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
536     STDMETHOD_(ULONG,Release) (THIS) PURE;
537     /*** IProgressDialog methods ***/
538     STDMETHOD(StartProgressDialog)(THIS_ HWND hwndParent, IUnknown *punkEnableModeless, DWORD dwFlags, LPCVOID reserved) PURE;
539     STDMETHOD(StopProgressDialog)(THIS) PURE;
540     STDMETHOD(SetTitle)(THIS_ LPCWSTR pwzTitle) PURE;
541     STDMETHOD(SetAnimation)(THIS_ HINSTANCE hInstance, UINT uiResourceId) PURE;
542     STDMETHOD_(BOOL,HasUserCancelled)(THIS) PURE;
543     STDMETHOD(SetProgress)(THIS_ DWORD dwCompleted, DWORD dwTotal) PURE;
544     STDMETHOD(SetProgress64)(THIS_ ULONGLONG ullCompleted, ULONGLONG ullTotal) PURE;
545     STDMETHOD(SetLine)(THIS_ DWORD dwLineNum, LPCWSTR pwzString, BOOL bPath, LPCVOID reserved) PURE;
546     STDMETHOD(SetCancelMsg)(THIS_ LPCWSTR pwzCancelMsg, LPCVOID reserved) PURE;
547     STDMETHOD(Timer)(THIS_ DWORD dwTimerAction, LPCVOID reserved) PURE;
548 };
549 #undef INTERFACE
550
551 #if !defined(__cplusplus) || defined(CINTERFACE)
552 /*** IUnknown methods ***/
553 #define IProgressDialog_QueryInterface(p,a,b)  (p)->lpVtbl->QueryInterface(p,a,b)
554 #define IProgressDialog_AddRef(p)              (p)->lpVtbl->AddRef(p)
555 #define IProgressDialog_Release(p)             (p)->lpVtbl->Release(p)
556 /*** IProgressDialog methods ***/
557 #define IProgressDialog_StartProgressDialog(p,a,b,c,d)    (p)->lpVtbl->StartProgressDialog(p,a,b,c,d)
558 #define IProgressDialog_StopProgressDialog(p)             (p)->lpVtbl->StopProgressDialog(p)
559 #define IProgressDialog_SetTitle(p,a)                     (p)->lpVtbl->SetTitle(p,a)
560 #define IProgressDialog_SetAnimation(p,a,b)               (p)->lpVtbl->SetAnimation(p,a,b)
561 #define IProgressDialog_HasUserCancelled(p)               (p)->lpVtbl->HasUserCancelled(p)
562 #define IProgressDialog_SetProgress(p,a,b)                (p)->lpVtbl->SetProgress(p,a,b)
563 #define IProgressDialog_SetProgress64(p,a,b)              (p)->lpVtbl->SetProgress64(p,a,b)
564 #define IProgressDialog_SetLine(p,a,b,c,d)                (p)->lpVtbl->SetLine(p,a,b,c,d)
565 #define IProgressDialog_SetCancelMsg(p,a,b)               (p)->lpVtbl->SetCancelMsg(p,a,b)
566 #define IProgressDialog_Timer(p,a,b)                      (p)->lpVtbl->Timer(p,a,b)
567 #endif
568
569
570 /****************************************************************************
571 * SHAddToRecentDocs API
572 */
573 #define SHARD_PIDL      0x00000001L
574 #define SHARD_PATHA     0x00000002L
575 #define SHARD_PATHW     0x00000003L
576 #define SHARD_PATH WINELIB_NAME_AW(SHARD_PATH)
577
578 void WINAPI SHAddToRecentDocs(UINT,LPCVOID);
579
580 /****************************************************************************
581  * SHBrowseForFolder API
582  */
583 typedef INT (CALLBACK *BFFCALLBACK)(HWND,UINT,LPARAM,LPARAM);
584
585 #include <pshpack8.h>
586
587 typedef struct tagBROWSEINFOA {
588     HWND        hwndOwner;
589     LPCITEMIDLIST pidlRoot;
590     LPSTR         pszDisplayName;
591     LPCSTR        lpszTitle;
592     UINT        ulFlags;
593     BFFCALLBACK   lpfn;
594     LPARAM        lParam;
595     INT         iImage;
596 } BROWSEINFOA, *PBROWSEINFOA, *LPBROWSEINFOA;
597
598 typedef struct tagBROWSEINFOW {
599     HWND        hwndOwner;
600     LPCITEMIDLIST pidlRoot;
601     LPWSTR        pszDisplayName;
602     LPCWSTR       lpszTitle;
603     UINT        ulFlags;
604     BFFCALLBACK   lpfn;
605     LPARAM        lParam;
606     INT         iImage;
607 } BROWSEINFOW, *PBROWSEINFOW, *LPBROWSEINFOW;
608
609 #define BROWSEINFO   WINELIB_NAME_AW(BROWSEINFO)
610 #define PBROWSEINFO  WINELIB_NAME_AW(PBROWSEINFO)
611 #define LPBROWSEINFO WINELIB_NAME_AW(LPBROWSEINFO)
612
613 #include <poppack.h>
614
615 /* Browsing for directory. */
616 #define BIF_RETURNONLYFSDIRS   0x0001
617 #define BIF_DONTGOBELOWDOMAIN  0x0002
618 #define BIF_STATUSTEXT         0x0004
619 #define BIF_RETURNFSANCESTORS  0x0008
620 #define BIF_EDITBOX            0x0010
621 #define BIF_VALIDATE           0x0020
622 #define BIF_NEWDIALOGSTYLE     0x0040
623 #define BIF_USENEWUI           (BIF_NEWDIALOGSTYLE | BIF_EDITBOX)
624 #define BIF_BROWSEINCLUDEURLS  0x0080
625 #define BIF_UAHINT             0x0100
626 #define BIF_NONEWFOLDERBUTTON  0x0200
627 #define BIF_NOTRANSLATETARGETS 0x0400
628
629 #define BIF_BROWSEFORCOMPUTER  0x1000
630 #define BIF_BROWSEFORPRINTER   0x2000
631 #define BIF_BROWSEINCLUDEFILES 0x4000
632
633 /* message from browser */
634 #define BFFM_INITIALIZED        1
635 #define BFFM_SELCHANGED         2
636 #define BFFM_VALIDATEFAILEDA    3
637 #define BFFM_VALIDATEFAILEDW    4
638 #define BFFM_IUNKNOWN           5
639
640 /* messages to browser */
641 #define BFFM_SETSTATUSTEXTA     (WM_USER+100)
642 #define BFFM_ENABLEOK           (WM_USER+101)
643 #define BFFM_SETSELECTIONA      (WM_USER+102)
644 #define BFFM_SETSELECTIONW      (WM_USER+103)
645 #define BFFM_SETSTATUSTEXTW     (WM_USER+104)
646 #define BFFM_SETOKTEXT          (WM_USER+105)
647 #define BFFM_SETEXPANDED        (WM_USER+106)
648
649 LPITEMIDLIST WINAPI SHBrowseForFolderA(LPBROWSEINFOA lpbi);
650 LPITEMIDLIST WINAPI SHBrowseForFolderW(LPBROWSEINFOW lpbi);
651 #define SHBrowseForFolder        WINELIB_NAME_AW(SHBrowseForFolder)
652 #define BFFM_SETSTATUSTEXT  WINELIB_NAME_AW(BFFM_SETSTATUSTEXT)
653 #define BFFM_SETSELECTION   WINELIB_NAME_AW(BFFM_SETSELECTION)
654 #define BFFM_VALIDATEFAILED WINELIB_NAME_AW(BFFM_VALIDATEFAILED)
655
656 /**********************************************************************
657  * SHCreateShellFolderViewEx API
658  */
659
660 typedef HRESULT (CALLBACK *LPFNVIEWCALLBACK)(
661         IShellView* dwUser,
662         IShellFolder* pshf,
663         HWND hWnd,
664         UINT uMsg,
665         WPARAM wParam,
666         LPARAM lParam);
667
668 typedef struct _CSFV
669 {
670   UINT             cbSize;
671   IShellFolder*    pshf;
672   IShellView*      psvOuter;
673   LPCITEMIDLIST    pidl;
674   LONG             lEvents;
675   LPFNVIEWCALLBACK pfnCallback;
676   FOLDERVIEWMODE   fvm;
677 } CSFV, *LPCSFV;
678
679 HRESULT WINAPI SHCreateShellFolderViewEx(LPCSFV pshfvi, IShellView **ppshv);
680
681 /* SHCreateShellFolderViewEx callback messages */
682 #define SFVM_MERGEMENU                 1
683 #define SFVM_INVOKECOMMAND             2
684 #define SFVM_GETHELPTEXT               3
685 #define SFVM_GETTOOLTIPTEXT            4
686 #define SFVM_GETBUTTONINFO             5
687 #define SFVM_GETBUTTONS                6
688 #define SFVM_INITMENUPOPUP             7
689 #define SFVM_SELECTIONCHANGED          8 /* undocumented */
690 #define SFVM_DRAWMENUITEM              9 /* undocumented */
691 #define SFVM_MEASUREMENUITEM          10 /* undocumented */
692 #define SFVM_EXITMENULOOP             11 /* undocumented */
693 #define SFVM_VIEWRELEASE              12 /* undocumented */
694 #define SFVM_GETNAMELENGTH            13 /* undocumented */
695 #define SFVM_FSNOTIFY                 14
696 #define SFVM_WINDOWCREATED            15
697 #define SFVM_WINDOWCLOSING            16 /* undocumented */
698 #define SFVM_LISTREFRESHED            17 /* undocumented */
699 #define SFVM_WINDOWFOCUSED            18 /* undocumented */
700 #define SFVM_REGISTERCOPYHOOK         20 /* undocumented */
701 #define SFVM_COPYHOOKCALLBACK         21 /* undocumented */
702 #define SFVM_GETDETAILSOF             23
703 #define SFVM_COLUMNCLICK              24
704 #define SFVM_QUERYFSNOTIFY            25
705 #define SFVM_DEFITEMCOUNT             26
706 #define SFVM_DEFVIEWMODE              27
707 #define SFVM_UNMERGEFROMMENU          28
708 #define SFVM_ADDINGOBJECT             29 /* undocumented */
709 #define SFVM_REMOVINGOBJECT           30 /* undocumented */
710 #define SFVM_UPDATESTATUSBAR          31
711 #define SFVM_BACKGROUNDENUM           32
712 #define SFVM_GETCOMMANDDIR            33 /* undocumented */
713 #define SFVM_GETCOLUMNSTREAM          34 /* undocumented */
714 #define SFVM_CANSELECTALL             35 /* undocumented */
715 #define SFVM_DIDDRAGDROP              36
716 #define SFVM_ISSTRICTREFRESH          37 /* undocumented */
717 #define SFVM_ISCHILDOBJECT            38 /* undocumented */
718 #define SFVM_SETISFV                  39
719 #define SFVM_GETEXTVIEWS              40 /* undocumented */
720 #define SFVM_THISIDLIST               41
721 #define SFVM_ADDPROPERTYPAGES         47
722 #define SFVM_BACKGROUNDENUMDONE       48
723 #define SFVM_GETNOTIFY                49
724 #define SFVM_GETSORTDEFAULTS          53
725 #define SFVM_SIZE                     57
726 #define SFVM_GETZONE                  58
727 #define SFVM_GETPANE                  59
728 #define SFVM_GETHELPTOPIC             63
729 #define SFVM_GETANIMATION             68
730 #define SFVM_GET_CUSTOMVIEWINFO       77 /* undocumented */
731 #define SFVM_ENUMERATEDITEMS          79 /* undocumented */
732 #define SFVM_GET_VIEW_DATA            80 /* undocumented */
733 #define SFVM_GET_WEBVIEW_LAYOUT       82 /* undocumented */
734 #define SFVM_GET_WEBVIEW_CONTENT      83 /* undocumented */
735 #define SFVM_GET_WEBVIEW_TASKS        84 /* undocumented */
736 #define SFVM_GET_WEBVIEW_THEME        86 /* undocumented */
737 #define SFVM_GETDEFERREDVIEWSETTINGS  92 /* undocumented */
738
739 /* Types and definitions for the SFM_* parameters */
740 #include <pshpack8.h>
741
742 #define QCMINFO_PLACE_BEFORE          0
743 #define QCMINFO_PLACE_AFTER           1
744 typedef struct _QCMINFO_IDMAP_PLACEMENT
745 {
746     UINT id;
747     UINT fFlags;
748 } QCMINFO_IDMAP_PLACEMENT;
749
750 typedef struct _QCMINFO_IDMAP
751 {
752     UINT nMaxIds;
753     QCMINFO_IDMAP_PLACEMENT pIdList[1];
754 } QCMINFO_IDMAP;
755
756 typedef struct _QCMINFO
757 {
758     HMENU hmenu;
759     UINT indexMenu;
760     UINT idCmdFirst;
761     UINT idCmdLast;
762     QCMINFO_IDMAP const* pIdMap;
763 } QCMINFO, *LPQCMINFO;
764
765 #define TBIF_DEFAULT           0x00000000
766 #define TBIF_APPEND            0x00000000
767 #define TBIF_PREPEND           0x00000001
768 #define TBIF_REPLACE           0x00000002
769 #define TBIF_INTERNETBAR       0x00010000
770 #define TBIF_STANDARDTOOLBAR   0x00020000
771 #define TBIF_NOTOOLBAR         0x00030000
772
773 typedef struct _TBINFO
774 {
775     UINT cbuttons;
776     UINT uFlags;
777 } TBINFO, *LPTBINFO;
778
779 #include <poppack.h>
780
781 /****************************************************************************
782 *       SHShellFolderView_Message API
783 */
784
785 LRESULT WINAPI SHShellFolderView_Message(
786         HWND hwndCabinet,
787         UINT uMessage,
788         LPARAM lParam);
789
790 /* SHShellFolderView_Message messages */
791 #define SFVM_REARRANGE          0x0001
792 #define SFVM_GETARRANGECOLUMN   0x0002 /* undocumented */
793 #define SFVM_ADDOBJECT          0x0003
794 #define SFVM_GETITEMCOUNT       0x0004 /* undocumented */
795 #define SFVM_GETITEMPIDL        0x0005 /* undocumented */
796 #define SFVM_REMOVEOBJECT       0x0006
797 #define SFVM_UPDATEOBJECT       0x0007
798 #define SFVM_SETREDRAW          0x0008 /* undocumented */
799 #define SFVM_GETSELECTEDOBJECTS 0x0009
800 #define SFVM_ISDROPONSOURCE     0x000A /* undocumented */
801 #define SFVM_MOVEICONS          0x000B /* undocumented */
802 #define SFVM_GETDRAGPOINT       0x000C /* undocumented */
803 #define SFVM_GETDROPPOINT       0x000D /* undocumented */
804 #define SFVM_SETITEMPOS         0x000E
805 #define SFVM_ISDROPONBACKGROUND 0x000F /* undocumented */
806 #define SFVM_SETCLIPBOARD       0x0010
807 #define SFVM_TOGGLEAUTOARRANGE  0x0011 /* undocumented */
808 #define SFVM_LINEUPICONS        0x0012 /* undocumented */
809 #define SFVM_GETAUTOARRANGE     0x0013 /* undocumented */
810 #define SFVM_GETSELECTEDCOUNT   0x0014 /* undocumented */
811 #define SFVM_GETITEMSPACING     0x0015 /* undocumented */
812 #define SFVM_REFRESHOBJECT      0x0016 /* undocumented */
813 #define SFVM_SETPOINTS          0x0017
814
815 /****************************************************************************
816 *       SHGetDataFromIDList API
817 */
818 #define SHGDFIL_FINDDATA        1
819 #define SHGDFIL_NETRESOURCE     2
820 #define SHGDFIL_DESCRIPTIONID   3
821
822 #define SHDID_ROOT_REGITEM          1
823 #define SHDID_FS_FILE               2
824 #define SHDID_FS_DIRECTORY          3
825 #define SHDID_FS_OTHER              4
826 #define SHDID_COMPUTER_DRIVE35      5
827 #define SHDID_COMPUTER_DRIVE525     6
828 #define SHDID_COMPUTER_REMOVABLE    7
829 #define SHDID_COMPUTER_FIXED        8
830 #define SHDID_COMPUTER_NETDRIVE     9
831 #define SHDID_COMPUTER_CDROM        10
832 #define SHDID_COMPUTER_RAMDISK      11
833 #define SHDID_COMPUTER_OTHER        12
834 #define SHDID_NET_DOMAIN            13
835 #define SHDID_NET_SERVER            14
836 #define SHDID_NET_SHARE             15
837 #define SHDID_NET_RESTOFNET         16
838 #define SHDID_NET_OTHER             17
839 #define SHDID_COMPUTER_IMAGING      18
840 #define SHDID_COMPUTER_AUDIO        19
841 #define SHDID_COMPUTER_SHAREDDOCS   20
842
843 #include <pshpack8.h>
844
845 typedef struct _SHDESCRIPTIONID
846 {   DWORD   dwDescriptionId;
847     CLSID   clsid;
848 } SHDESCRIPTIONID, *LPSHDESCRIPTIONID;
849
850 #include <poppack.h>
851
852 HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID pv, int cb);
853 HRESULT WINAPI SHGetDataFromIDListW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID pv, int cb);
854 #define  SHGetDataFromIDList WINELIB_NAME_AW(SHGetDataFromIDList)
855
856 BOOL WINAPI SHGetSpecialFolderPathA (HWND hwndOwner, LPSTR szPath, int nFolder, BOOL bCreate);
857 BOOL WINAPI SHGetSpecialFolderPathW (HWND hwndOwner, LPWSTR szPath, int nFolder, BOOL bCreate);
858 #define  SHGetSpecialFolderPath WINELIB_NAME_AW(SHGetSpecialFolderPath)
859
860 HRESULT WINAPI SHGetMalloc(LPMALLOC *lpmal) ;
861
862 /**********************************************************************
863  * SHGetSetSettings ()
864  */
865
866 typedef struct
867 {
868     BOOL fShowAllObjects : 1;
869     BOOL fShowExtensions : 1;
870     BOOL fNoConfirmRecycle : 1;
871
872     BOOL fShowSysFiles : 1;
873     BOOL fShowCompColor : 1;
874     BOOL fDoubleClickInWebView : 1;
875     BOOL fDesktopHTML : 1;
876     BOOL fWin95Classic : 1;
877     BOOL fDontPrettyPath : 1;
878     BOOL fShowAttribCol : 1;
879     BOOL fMapNetDrvBtn : 1;
880     BOOL fShowInfoTip : 1;
881     BOOL fHideIcons : 1;
882     BOOL fWebView : 1;
883     BOOL fFilter : 1;
884     BOOL fShowSuperHidden : 1;
885     BOOL fNoNetCrawling : 1;
886
887     UINT :15; /* Required for proper binary layout with gcc */
888     DWORD dwWin95Unused;
889     UINT  uWin95Unused;
890     LONG   lParamSort;
891     int    iSortDirection;
892     UINT   version;
893     UINT uNotUsed;
894     BOOL fSepProcess: 1;
895     BOOL fStartPanelOn: 1;
896     BOOL fShowStartPage: 1;
897     UINT fSpareFlags : 13;
898     UINT :15; /* Required for proper binary layout with gcc */
899 } SHELLSTATE, *LPSHELLSTATE;
900
901 /**********************************************************************
902  * SHGetSettings ()
903  */
904 typedef struct
905 {       BOOL fShowAllObjects : 1;
906         BOOL fShowExtensions : 1;
907         BOOL fNoConfirmRecycle : 1;
908         BOOL fShowSysFiles : 1;
909
910         BOOL fShowCompColor : 1;
911         BOOL fDoubleClickInWebView : 1;
912         BOOL fDesktopHTML : 1;
913         BOOL fWin95Classic : 1;
914
915         BOOL fDontPrettyPath : 1;
916         BOOL fShowAttribCol : 1;
917         BOOL fMapNetDrvBtn : 1;
918         BOOL fShowInfoTip : 1;
919
920         BOOL fHideIcons : 1;
921         UINT fRestFlags : 3;
922         UINT :15; /* Required for proper binary layout with gcc */
923 } SHELLFLAGSTATE, * LPSHELLFLAGSTATE;
924
925 VOID WINAPI SHGetSettings(LPSHELLFLAGSTATE lpsfs, DWORD dwMask);
926
927 #define SSF_SHOWALLOBJECTS              0x0001
928 #define SSF_SHOWEXTENSIONS              0x0002
929 #define SSF_SHOWCOMPCOLOR               0x0008
930 #define SSF_SHOWSYSFILES                0x0020
931 #define SSF_DOUBLECLICKINWEBVIEW        0x0080
932 #define SSF_SHOWATTRIBCOL               0x0100
933 #define SSF_DESKTOPHTML                 0x0200
934 #define SSF_WIN95CLASSIC                0x0400
935 #define SSF_DONTPRETTYPATH              0x0800
936 #define SSF_SHOWINFOTIP                 0x2000
937 #define SSF_MAPNETDRVBUTTON             0x1000
938 #define SSF_NOCONFIRMRECYCLE            0x8000
939 #define SSF_HIDEICONS                   0x4000
940
941 /****************************************************************************
942 * SHRestricted API
943 */
944 typedef enum RESTRICTIONS
945 {
946         REST_NONE                       = 0x00000000,
947         REST_NORUN                      = 0x00000001,
948         REST_NOCLOSE                    = 0x00000002,
949         REST_NOSAVESET                  = 0x00000004,
950         REST_NOFILEMENU                 = 0x00000008,
951         REST_NOSETFOLDERS               = 0x00000010,
952         REST_NOSETTASKBAR               = 0x00000020,
953         REST_NODESKTOP                  = 0x00000040,
954         REST_NOFIND                     = 0x00000080,
955         REST_NODRIVES                   = 0x00000100,
956         REST_NODRIVEAUTORUN             = 0x00000200,
957         REST_NODRIVETYPEAUTORUN         = 0x00000400,
958         REST_NONETHOOD                  = 0x00000800,
959         REST_STARTBANNER                = 0x00001000,
960         REST_RESTRICTRUN                = 0x00002000,
961         REST_NOPRINTERTABS              = 0x00004000,
962         REST_NOPRINTERDELETE            = 0x00008000,
963         REST_NOPRINTERADD               = 0x00010000,
964         REST_NOSTARTMENUSUBFOLDERS      = 0x00020000,
965         REST_MYDOCSONNET                = 0x00040000,
966         REST_NOEXITTODOS                = 0x00080000,
967         REST_ENFORCESHELLEXTSECURITY    = 0x00100000,
968         REST_LINKRESOLVEIGNORELINKINFO  = 0x00200000,
969         REST_NOCOMMONGROUPS             = 0x00400000,
970         REST_SEPARATEDESKTOPPROCESS     = 0x00800000,
971         REST_NOWEB                      = 0x01000000,
972         REST_NOTRAYCONTEXTMENU          = 0x02000000,
973         REST_NOVIEWCONTEXTMENU          = 0x04000000,
974         REST_NONETCONNECTDISCONNECT     = 0x08000000,
975         REST_STARTMENULOGOFF            = 0x10000000,
976         REST_NOSETTINGSASSIST           = 0x20000000,
977         REST_NOINTERNETICON             = 0x40000001,
978         REST_NORECENTDOCSHISTORY,
979         REST_NORECENTDOCSMENU,
980         REST_NOACTIVEDESKTOP,
981         REST_NOACTIVEDESKTOPCHANGES,
982         REST_NOFAVORITESMENU,
983         REST_CLEARRECENTDOCSONEXIT,
984         REST_CLASSICSHELL,
985         REST_NOCUSTOMIZEWEBVIEW,
986
987         REST_NOHTMLWALLPAPER            = 0x40000010,
988         REST_NOCHANGINGWALLPAPER,
989         REST_NODESKCOMP,
990         REST_NOADDDESKCOMP,
991         REST_NODELDESKCOMP,
992         REST_NOCLOSEDESKCOMP,
993         REST_NOCLOSE_DRAGDROPBAND,
994         REST_NOMOVINGBAND,
995         REST_NOEDITDESKCOMP,
996         REST_NORESOLVESEARCH,
997         REST_NORESOLVETRACK,
998         REST_FORCECOPYACLWITHFILE,
999         REST_NOLOGO3CHANNELNOTIFY,
1000         REST_NOFORGETSOFTWAREUPDATE,
1001         REST_NOSETACTIVEDESKTOP,
1002         REST_NOUPDATEWINDOWS,
1003         REST_NOCHANGESTARMENU,          /* 0x40000020 */
1004         REST_NOFOLDEROPTIONS,
1005         REST_HASFINDCOMPUTERS,
1006         REST_INTELLIMENUS,
1007         REST_RUNDLGMEMCHECKBOX,
1008         REST_ARP_ShowPostSetup,
1009         REST_NOCSC,
1010         REST_NOCONTROLPANEL,
1011         REST_ENUMWORKGROUP,
1012         REST_ARP_NOARP,
1013         REST_ARP_NOREMOVEPAGE,
1014         REST_ARP_NOADDPAGE,
1015         REST_ARP_NOWINSETUPPAGE,
1016         REST_GREYMSIADS,
1017         REST_NOCHANGEMAPPEDDRIVELABEL,
1018         REST_NOCHANGEMAPPEDDRIVECOMMENT,
1019         REST_MaxRecentDocs,             /* 0x40000030 */
1020         REST_NONETWORKCONNECTIONS,
1021         REST_FORCESTARTMENULOGOFF,
1022         REST_NOWEBVIEW,
1023         REST_NOCUSTOMIZETHISFOLDER,
1024         REST_NOENCRYPTION,
1025
1026         REST_ALLOWFRENCHENCRYPTION,     /* not documented */
1027
1028         REST_DONTSHOWSUPERHIDDEN,
1029         REST_NOSHELLSEARCHBUTTON,
1030         REST_NOHARDWARETAB,
1031         REST_NORUNASINSTALLPROMPT,
1032         REST_PROMPTRUNASINSTALLNETPATH,
1033         REST_NOMANAGEMYCOMPUTERVERB,
1034         REST_NORECENTDOCSNETHOOD,
1035         REST_DISALLOWRUN,
1036         REST_NOWELCOMESCREEN,
1037         REST_RESTRICTCPL,               /* 0x40000040 */
1038         REST_DISALLOWCPL,
1039         REST_NOSMBALLOONTIP,
1040         REST_NOSMHELP,
1041         REST_NOWINKEYS,
1042         REST_NOENCRYPTONMOVE,
1043         REST_NOLOCALMACHINERUN,
1044         REST_NOCURRENTUSERRUN,
1045         REST_NOLOCALMACHINERUNONCE,
1046         REST_NOCURRENTUSERRUNONCE,
1047         REST_FORCEACTIVEDESKTOPON,
1048         REST_NOCOMPUTERSNEARME,
1049         REST_NOVIEWONDRIVE,
1050         REST_NONETCRAWL,
1051         REST_NOSHAREDDOCUMENTS,
1052         REST_NOSMMYDOCS,
1053         REST_NOSMMYPICS,                /* 0x40000050 */
1054         REST_ALLOWBITBUCKDRIVES,
1055         REST_NONLEGACYSHELLMODE,
1056         REST_NOCONTROLPANELBARRICADE,
1057         REST_NOSTARTPAGE,
1058         REST_NOAUTOTRAYNOTIFY,
1059         REST_NOTASKGROUPING,
1060         REST_NOCDBURNING,
1061         REST_MYCOMPNOPROP,
1062         REST_MYDOCSNOPROP,
1063         REST_NOSTARTPANEL,
1064         REST_NODISPLAYAPPEARANCEPAGE,
1065         REST_NOTHEMESTAB,
1066         REST_NOVISUALSTYLECHOICE,
1067         REST_NOSIZECHOICE,
1068         REST_NOCOLORCHOICE,
1069         REST_SETVISUALSTYLE,            /* 0x40000060 */
1070         REST_STARTRUNNOHOMEPATH,
1071         REST_NOUSERNAMEINSTARTPANEL,
1072         REST_NOMYCOMPUTERICON,
1073         REST_NOSMNETWORKPLACES,
1074         REST_NOSMPINNEDLIST,
1075         REST_NOSMMYMUSIC,
1076         REST_NOSMEJECTPC,
1077         REST_NOSMMOREPROGRAMS,
1078         REST_NOSMMFUPROGRAMS,
1079         REST_NOTRAYITEMSDISPLAY,
1080         REST_NOTOOLBARSONTASKBAR,
1081         /* 0x4000006C
1082            0x4000006D
1083            0x4000006E */
1084         REST_NOSMCONFIGUREPROGRAMS      = 0x4000006F,
1085         REST_HIDECLOCK,                 /* 0x40000070 */
1086         REST_NOLOWDISKSPACECHECKS,
1087         REST_NOENTIRENETWORK,
1088         REST_NODESKTOPCLEANUP,
1089         REST_BITBUCKNUKEONDELETE,
1090         REST_BITBUCKCONFIRMDELETE,
1091         REST_BITBUCKNOPROP,
1092         REST_NODISPBACKGROUND,
1093         REST_NODISPSCREENSAVEPG,
1094         REST_NODISPSETTINGSPG,
1095         REST_NODISPSCREENSAVEPREVIEW,
1096         REST_NODISPLAYCPL,
1097         REST_HIDERUNASVERB,
1098         REST_NOTHUMBNAILCACHE,
1099         REST_NOSTRCMPLOGICAL,
1100         REST_NOPUBLISHWIZARD,
1101         REST_NOONLINEPRINTSWIZARD,      /* 0x40000080 */
1102         REST_NOWEBSERVICES,
1103         REST_ALLOWUNHASHEDWEBVIEW,
1104         REST_ALLOWLEGACYWEBVIEW,
1105         REST_REVERTWEBVIEWSECURITY,
1106
1107         REST_INHERITCONSOLEHANDLES      = 0x40000086,
1108
1109         REST_NODISCONNECT               = 0x41000001,
1110         REST_NOSECURITY,
1111         REST_NOFILEASSOCIATE,           /* 0x41000003 */
1112 } RESTRICTIONS;
1113
1114 DWORD WINAPI SHRestricted(RESTRICTIONS rest);
1115
1116 /****************************************************************************
1117 * SHChangeNotify API
1118 */
1119 typedef struct _SHChangeNotifyEntry
1120 {
1121     LPCITEMIDLIST pidl;
1122     BOOL   fRecursive;
1123 } SHChangeNotifyEntry;
1124
1125 #define SHCNE_RENAMEITEM        0x00000001
1126 #define SHCNE_CREATE            0x00000002
1127 #define SHCNE_DELETE            0x00000004
1128 #define SHCNE_MKDIR             0x00000008
1129 #define SHCNE_RMDIR             0x00000010
1130 #define SHCNE_MEDIAINSERTED     0x00000020
1131 #define SHCNE_MEDIAREMOVED      0x00000040
1132 #define SHCNE_DRIVEREMOVED      0x00000080
1133 #define SHCNE_DRIVEADD          0x00000100
1134 #define SHCNE_NETSHARE          0x00000200
1135 #define SHCNE_NETUNSHARE        0x00000400
1136 #define SHCNE_ATTRIBUTES        0x00000800
1137 #define SHCNE_UPDATEDIR         0x00001000
1138 #define SHCNE_UPDATEITEM        0x00002000
1139 #define SHCNE_SERVERDISCONNECT  0x00004000
1140 #define SHCNE_UPDATEIMAGE       0x00008000
1141 #define SHCNE_DRIVEADDGUI       0x00010000
1142 #define SHCNE_RENAMEFOLDER      0x00020000
1143 #define SHCNE_FREESPACE         0x00040000
1144
1145 #define SHCNE_EXTENDED_EVENT    0x04000000
1146 #define SHCNE_ASSOCCHANGED      0x08000000
1147 #define SHCNE_DISKEVENTS        0x0002381F
1148 #define SHCNE_GLOBALEVENTS      0x0C0581E0
1149 #define SHCNE_ALLEVENTS         0x7FFFFFFF
1150 #define SHCNE_INTERRUPT         0x80000000
1151
1152 #define SHCNEE_ORDERCHANGED     0x0002L
1153 #define SHCNEE_MSI_CHANGE       0x0004L
1154 #define SHCNEE_MSI_UNINSTALL    0x0005L
1155
1156 #define SHCNF_IDLIST            0x0000
1157 #define SHCNF_PATHA             0x0001
1158 #define SHCNF_PRINTERA          0x0002
1159 #define SHCNF_DWORD             0x0003
1160 #define SHCNF_PATHW             0x0005
1161 #define SHCNF_PRINTERW          0x0006
1162 #define SHCNF_TYPE              0x00FF
1163 #define SHCNF_FLUSH             0x1000
1164 #define SHCNF_FLUSHNOWAIT       0x2000
1165
1166 #define SHCNF_PATH              WINELIB_NAME_AW(SHCNF_PATH)
1167 #define SHCNF_PRINTER           WINELIB_NAME_AW(SHCNF_PRINTER)
1168
1169 void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2);
1170
1171 typedef enum {
1172     SLDF_HAS_ID_LIST = 0x00000001,
1173     SLDF_HAS_LINK_INFO = 0x00000002,
1174     SLDF_HAS_NAME = 0x00000004,
1175     SLDF_HAS_RELPATH = 0x00000008,
1176     SLDF_HAS_WORKINGDIR = 0x00000010,
1177     SLDF_HAS_ARGS = 0x00000020,
1178     SLDF_HAS_ICONLOCATION = 0x00000040,
1179     SLDF_UNICODE = 0x00000080,
1180     SLDF_FORCE_NO_LINKINFO = 0x00000100,
1181     SLDF_HAS_EXP_SZ = 0x00000200,
1182     SLDF_RUN_IN_SEPARATE = 0x00000400,
1183     SLDF_HAS_LOGO3ID = 0x00000800,
1184     SLDF_HAS_DARWINID = 0x00001000,
1185     SLDF_RUNAS_USER = 0x00002000,
1186     SLDF_HAS_EXP_ICON_SZ = 0x00004000,
1187     SLDF_NO_PIDL_ALIAS = 0x00008000,
1188     SLDF_FORCE_UNCNAME = 0x00010000,
1189     SLDF_RUN_WITH_SHIMLAYER = 0x00020000,
1190     SLDF_FORCE_NO_LINKTRACK = 0x00040000,
1191     SLDF_ENABLE_TARGET_METADATA = 0x00080000,
1192     SLDF_DISABLE_KNOWNFOLDER_RELATIVE_TRACKING = 0x00200000,
1193     SLDF_VALID = 0x003ff7ff,
1194     SLDF_RESERVED = 0x80000000,
1195 } SHELL_LINK_DATA_FLAGS;
1196
1197 typedef struct tagDATABLOCKHEADER
1198 {
1199     DWORD cbSize;
1200     DWORD dwSignature;
1201 } DATABLOCK_HEADER, *LPDATABLOCK_HEADER, *LPDBLIST;
1202
1203 typedef struct {
1204     DATABLOCK_HEADER dbh;
1205     CHAR szDarwinID[MAX_PATH];
1206     WCHAR szwDarwinID[MAX_PATH];
1207 } EXP_DARWIN_LINK, *LPEXP_DARWIN_LINK;
1208
1209 typedef struct {
1210     DWORD cbSize;
1211     DWORD cbSignature;
1212     CHAR szTarget[MAX_PATH];
1213     WCHAR szwTarget[MAX_PATH];
1214 } EXP_SZ_LINK, *LPEXP_SZ_LINK;
1215
1216 typedef struct {
1217     DWORD cbSize;
1218     DWORD dwSignature;
1219     DWORD idSpecialFolder;
1220     DWORD cbOffset;
1221 } EXP_SPECIAL_FOLDER, *LPEXP_SPECIAL_FOLDER;
1222
1223 typedef struct {
1224     DWORD cbSize;
1225     DWORD dwSignature;
1226     BYTE abPropertyStorage[1];
1227 } EXP_PROPERTYSTORAGE;
1228
1229 #define EXP_SZ_LINK_SIG         0xa0000001
1230 #define NT_CONSOLE_PROPS_SIG    0xa0000002
1231 #define NT_FE_CONSOLE_PROPS_SIG 0xa0000004
1232 #define EXP_SPECIAL_FOLDER_SIG  0xa0000005
1233 #define EXP_DARWIN_ID_SIG       0xa0000006
1234 #define EXP_SZ_ICON_SIG         0xa0000007
1235 #define EXP_LOGO3_ID_SIG        EXP_SZ_ICON_SIG /* Old SDKs only */
1236 #define EXP_PROPERTYSTORAGE_SIG 0xa0000009
1237
1238 typedef struct _SHChangeDWORDAsIDList {
1239     USHORT   cb;
1240     DWORD    dwItem1;
1241     DWORD    dwItem2;
1242     USHORT   cbZero;
1243 } SHChangeDWORDAsIDList, *LPSHChangeDWORDAsIDList;
1244
1245 typedef struct _SHChangeProductKeyAsIDList {
1246     USHORT cb;
1247     WCHAR wszProductKey[39];
1248     USHORT cbZero;
1249 } SHChangeProductKeyAsIDList, *LPSHChangeProductKeyAsIDList;
1250
1251 ULONG WINAPI SHChangeNotifyRegister(HWND hwnd, int fSources, LONG fEvents, UINT wMsg,
1252                                     int cEntries, SHChangeNotifyEntry *pshcne);
1253 BOOL WINAPI SHChangeNotifyDeregister(ULONG ulID);
1254 HANDLE WINAPI SHChangeNotification_Lock(HANDLE hChangeNotification, DWORD dwProcessId,
1255                                         LPITEMIDLIST **pppidl, LONG *plEvent);
1256 BOOL WINAPI SHChangeNotification_Unlock(HANDLE hLock);
1257
1258 HRESULT WINAPI SHGetRealIDL(IShellFolder *psf, LPCITEMIDLIST pidlSimple, LPITEMIDLIST * ppidlReal);
1259
1260 /****************************************************************************
1261 * SHCreateDirectory API
1262 */
1263 DWORD WINAPI SHCreateDirectory(HWND, LPCVOID);
1264 int WINAPI SHCreateDirectoryExA(HWND, LPCSTR, LPSECURITY_ATTRIBUTES);
1265 int WINAPI SHCreateDirectoryExW(HWND, LPCWSTR, LPSECURITY_ATTRIBUTES);
1266
1267 /****************************************************************************
1268 * SHGetSpecialFolderLocation API
1269 */
1270 HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, int nFolder, LPITEMIDLIST * ppidl);
1271 HRESULT WINAPI SHGetFolderLocation(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwReserved, LPITEMIDLIST *ppidl);
1272
1273 /****************************************************************************
1274 * SHGetFolderPath API
1275 */
1276 typedef enum {
1277     SHGFP_TYPE_CURRENT = 0,
1278     SHGFP_TYPE_DEFAULT = 1
1279 } SHGFP_TYPE;
1280
1281 HRESULT WINAPI SHGetFolderPathA(HWND hwnd, int nFolder, HANDLE hToken, DWORD dwFlags, LPSTR pszPath);
1282 HRESULT WINAPI SHGetFolderPathW(HWND hwnd, int nFolder, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath);
1283 #define        SHGetFolderPath WINELIB_NAME_AW(SHGetFolderPath)
1284
1285 #define CSIDL_DESKTOP           0x0000
1286 #define CSIDL_INTERNET          0x0001
1287 #define CSIDL_PROGRAMS          0x0002
1288 #define CSIDL_CONTROLS          0x0003
1289 #define CSIDL_PRINTERS          0x0004
1290 #define CSIDL_PERSONAL          0x0005
1291 #define CSIDL_FAVORITES         0x0006
1292 #define CSIDL_STARTUP           0x0007
1293 #define CSIDL_RECENT            0x0008
1294 #define CSIDL_SENDTO            0x0009
1295 #define CSIDL_BITBUCKET         0x000a
1296 #define CSIDL_STARTMENU         0x000b
1297 #define CSIDL_MYDOCUMENTS       CSIDL_PERSONAL
1298 #define CSIDL_MYMUSIC           0x000d
1299 #define CSIDL_MYVIDEO           0x000e
1300 #define CSIDL_DESKTOPDIRECTORY  0x0010
1301 #define CSIDL_DRIVES            0x0011
1302 #define CSIDL_NETWORK           0x0012
1303 #define CSIDL_NETHOOD           0x0013
1304 #define CSIDL_FONTS             0x0014
1305 #define CSIDL_TEMPLATES         0x0015
1306 #define CSIDL_COMMON_STARTMENU  0x0016
1307 #define CSIDL_COMMON_PROGRAMS   0X0017
1308 #define CSIDL_COMMON_STARTUP    0x0018
1309 #define CSIDL_COMMON_DESKTOPDIRECTORY   0x0019
1310 #define CSIDL_APPDATA           0x001a
1311 #define CSIDL_PRINTHOOD         0x001b
1312 #define CSIDL_LOCAL_APPDATA     0x001c
1313 #define CSIDL_ALTSTARTUP        0x001d
1314 #define CSIDL_COMMON_ALTSTARTUP 0x001e
1315 #define CSIDL_COMMON_FAVORITES  0x001f
1316 #define CSIDL_INTERNET_CACHE    0x0020
1317 #define CSIDL_COOKIES           0x0021
1318 #define CSIDL_HISTORY           0x0022
1319 #define CSIDL_COMMON_APPDATA    0x0023
1320 #define CSIDL_WINDOWS           0x0024
1321 #define CSIDL_SYSTEM            0x0025
1322 #define CSIDL_PROGRAM_FILES     0x0026
1323 #define CSIDL_MYPICTURES        0x0027
1324 #define CSIDL_PROFILE           0x0028
1325 #define CSIDL_SYSTEMX86         0x0029
1326 #define CSIDL_PROGRAM_FILESX86  0x002a
1327 #define CSIDL_PROGRAM_FILES_COMMON      0x002b
1328 #define CSIDL_PROGRAM_FILES_COMMONX86   0x002c
1329 #define CSIDL_COMMON_TEMPLATES  0x002d
1330 #define CSIDL_COMMON_DOCUMENTS  0x002e
1331 #define CSIDL_COMMON_ADMINTOOLS 0x002f
1332 #define CSIDL_ADMINTOOLS        0x0030
1333 #define CSIDL_CONNECTIONS       0x0031
1334 #define CSIDL_COMMON_MUSIC      0x0035
1335 #define CSIDL_COMMON_PICTURES   0x0036
1336 #define CSIDL_COMMON_VIDEO      0x0037
1337 #define CSIDL_RESOURCES         0x0038
1338 #define CSIDL_RESOURCES_LOCALIZED 0x0039
1339 #define CSIDL_COMMON_OEM_LINKS  0x003a
1340 #define CSIDL_CDBURN_AREA       0x003b
1341 #define CSIDL_COMPUTERSNEARME   0x003d
1342 #define CSIDL_PROFILES          0x003e
1343 #define CSIDL_FOLDER_MASK       0x00ff
1344 #define CSIDL_FLAG_PER_USER_INIT 0x0800
1345 #define CSIDL_FLAG_NO_ALIAS     0x1000
1346 #define CSIDL_FLAG_DONT_VERIFY  0x4000
1347 #define CSIDL_FLAG_CREATE       0x8000
1348
1349 #define CSIDL_FLAG_MASK         0xff00
1350
1351 /****************************************************************************
1352  * SHGetDesktopFolder API
1353  */
1354 HRESULT WINAPI SHGetDesktopFolder(IShellFolder * *);
1355
1356 /****************************************************************************
1357  * SHBindToParent API
1358  */
1359 HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCITEMIDLIST *ppidlLast);
1360
1361 /****************************************************************************
1362 * SHDefExtractIcon API
1363 */
1364 HRESULT WINAPI SHDefExtractIconA(LPCSTR pszIconFile, int iIndex, UINT uFlags,
1365                                  HICON* phiconLarge, HICON* phiconSmall, UINT nIconSize);
1366 HRESULT WINAPI SHDefExtractIconW(LPCWSTR pszIconFile, int iIndex, UINT uFlags,
1367                                  HICON* phiconLarge, HICON* phiconSmall, UINT nIconSize);
1368 #define        SHDefExtractIcon WINELIB_NAME_AW(SHDefExtractIcon)
1369
1370 /*
1371  * DROPFILES for CF_HDROP and CF_PRINTERS
1372  */
1373 typedef struct _DROPFILES
1374 {
1375   DWORD pFiles;
1376   POINT pt;
1377   BOOL  fNC;
1378   BOOL  fWide;
1379 } DROPFILES, *LPDROPFILES;
1380
1381 /*
1382  * Properties of a file in the clipboard
1383  */
1384 typedef struct _FILEDESCRIPTORA {
1385     DWORD dwFlags;
1386     CLSID clsid;
1387     SIZEL sizel;
1388     POINTL pointl;
1389     DWORD dwFileAttributes;
1390     FILETIME ftCreationTime;
1391     FILETIME ftLastAccessTime;
1392     FILETIME ftLastWriteTime;
1393     DWORD nFileSizeHigh;
1394     DWORD nFileSizeLow;
1395     CHAR cFileName[MAX_PATH];
1396 } FILEDESCRIPTORA, *LPFILEDESCRIPTORA;
1397
1398 typedef struct _FILEDESCRIPTORW {
1399     DWORD dwFlags;
1400     CLSID clsid;
1401     SIZEL sizel;
1402     POINTL pointl;
1403     DWORD dwFileAttributes;
1404     FILETIME ftCreationTime;
1405     FILETIME ftLastAccessTime;
1406     FILETIME ftLastWriteTime;
1407     DWORD nFileSizeHigh;
1408     DWORD nFileSizeLow;
1409     WCHAR cFileName[MAX_PATH];
1410 } FILEDESCRIPTORW, *LPFILEDESCRIPTORW;
1411
1412 DECL_WINELIB_TYPE_AW(FILEDESCRIPTOR)
1413 DECL_WINELIB_TYPE_AW(LPFILEDESCRIPTOR)
1414
1415 /*
1416  * CF_FILEGROUPDESCRIPTOR clipboard format
1417  */
1418 typedef struct _FILEGROUPDESCRIPTORA {
1419     UINT cItems;
1420     FILEDESCRIPTORA fgd[1];
1421 } FILEGROUPDESCRIPTORA, *LPFILEGROUPDESCRIPTORA;
1422
1423 typedef struct _FILEGROUPDESCRIPTORW {
1424     UINT cItems;
1425     FILEDESCRIPTORW fgd[1];
1426 } FILEGROUPDESCRIPTORW, *LPFILEGROUPDESCRIPTORW;
1427
1428 DECL_WINELIB_TYPE_AW(FILEGROUPDESCRIPTOR)
1429 DECL_WINELIB_TYPE_AW(LPFILEGROUPDESCRIPTOR)
1430
1431 /****************************************************************************
1432  * Cabinet functions
1433  */
1434
1435 typedef struct {
1436     WORD cLength;
1437     WORD nVersion;
1438     BOOL fFullPathTitle:1;
1439     BOOL fSaveLocalView:1;
1440     BOOL fNotShell:1;
1441     BOOL fSimpleDefault:1;
1442     BOOL fDontShowDescBar:1;
1443     BOOL fNewWindowMode:1;
1444     BOOL fShowCompColor:1;
1445     BOOL fDontPrettyNames:1;
1446     BOOL fAdminsCreateCommonGroups:1;
1447     UINT fUnusedFlags:7;
1448     UINT :15; /* Required for proper binary layout with gcc */
1449     UINT fMenuEnumFilter;
1450 } CABINETSTATE, *LPCABINETSTATE;
1451
1452 #define CABINETSTATE_VERSION 2
1453
1454 BOOL WINAPI ReadCabinetState(CABINETSTATE *, int);
1455 BOOL WINAPI WriteCabinetState(CABINETSTATE *);
1456
1457 /****************************************************************************
1458  * Path Manipulation Routines
1459  */
1460
1461 /* PathProcessCommand flags */
1462 #define PPCF_ADDQUOTES        0x01
1463 #define PPCF_INCLUDEARGS      0x02
1464 #define PPCF_ADDARGUMENTS     0x03
1465 #define PPCF_NODIRECTORIES    0x10
1466 #define PPCF_DONTRESOLVE      0x20
1467 #define PPCF_FORCEQUALIFY     0x40
1468 #define PPCF_LONGESTPOSSIBLE  0x80
1469
1470 /* PathResolve flags */
1471 #define PRF_VERIFYEXISTS         0x01
1472 #define PRF_EXECUTABLE           0x02
1473 #define PRF_TRYPROGRAMEXTENSIONS 0x03
1474 #define PRF_FIRSTDIRDEF          0x04
1475 #define PRF_DONTFINDLINK         0x08
1476
1477 VOID WINAPI PathGetShortPath(LPWSTR pszPath);
1478 LONG WINAPI PathProcessCommand(LPCWSTR, LPWSTR, int, DWORD);
1479 BOOL WINAPI PathYetAnotherMakeUniqueName(LPWSTR, LPCWSTR, LPCWSTR, LPCWSTR);
1480
1481 /****************************************************************************
1482  * Drag And Drop Routines
1483  */
1484
1485 /* DAD_AutoScroll sample structure */
1486 #define NUM_POINTS 3
1487 typedef struct
1488 {
1489     int   iNextSample;
1490     DWORD dwLastScroll;
1491     BOOL  bFull;
1492     POINT pts[NUM_POINTS];
1493     DWORD dwTimes[NUM_POINTS];
1494 } AUTO_SCROLL_DATA;
1495
1496 BOOL         WINAPI DAD_SetDragImage(HIMAGELIST,LPPOINT);
1497 BOOL         WINAPI DAD_DragEnterEx(HWND,POINT);
1498 BOOL         WINAPI DAD_DragEnterEx2(HWND,POINT,IDataObject*);
1499 BOOL         WINAPI DAD_DragMove(POINT);
1500 BOOL         WINAPI DAD_DragLeave(void);
1501 BOOL         WINAPI DAD_AutoScroll(HWND,AUTO_SCROLL_DATA*,LPPOINT);
1502 HRESULT      WINAPI SHDoDragDrop(HWND,IDataObject*,IDropSource*,DWORD,LPDWORD);
1503
1504 LPITEMIDLIST WINAPI ILAppendID(LPITEMIDLIST,LPCSHITEMID,BOOL);
1505 LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST);
1506 LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST);
1507 LPITEMIDLIST WINAPI ILCreateFromPathA(LPCSTR);
1508 LPITEMIDLIST WINAPI ILCreateFromPathW(LPCWSTR);
1509 #define             ILCreateFromPath WINELIB_NAME_AW(ILCreateFromPath)
1510 LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST,LPCITEMIDLIST);
1511 LPITEMIDLIST WINAPI ILFindChild(LPCITEMIDLIST,LPCITEMIDLIST);
1512 LPITEMIDLIST WINAPI ILFindLastID(LPCITEMIDLIST);
1513 void         WINAPI ILFree(LPITEMIDLIST);
1514 LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST);
1515 UINT         WINAPI ILGetSize(LPCITEMIDLIST);
1516 BOOL         WINAPI ILIsEqual(LPCITEMIDLIST,LPCITEMIDLIST);
1517 BOOL         WINAPI ILIsParent(LPCITEMIDLIST,LPCITEMIDLIST,BOOL);
1518 HRESULT      WINAPI ILLoadFromStream(LPSTREAM,LPITEMIDLIST*);
1519 BOOL         WINAPI ILRemoveLastID(LPITEMIDLIST);
1520 HRESULT      WINAPI ILSaveToStream(LPSTREAM,LPCITEMIDLIST);
1521
1522
1523 #include <poppack.h>
1524
1525 #ifdef __cplusplus
1526 } /* extern "C" */
1527 #endif /* defined(__cplusplus) */
1528
1529 #endif /* __WINE_SHLOBJ_H */