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