Add a missing return.
[wine.git] / include / shlobj.h
blob7f96b51673c2b4b4cfb45e32b7ebb6d5d095eade
1 /*
2 * Copyright (C) the Wine project
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.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef __WINE_SHLOBJ_H
20 #define __WINE_SHLOBJ_H
22 #include <ole2.h>
23 #include <commctrl.h>
24 #include <prsht.h>
25 #include <shlguid.h>
27 #ifdef __cplusplus
28 extern "C" {
29 #endif /* defined(__cplusplus) */
31 #include <pshpack1.h>
33 #include <shtypes.h>
34 #include <shobjidl.h>
36 HRESULT WINAPI SHCoCreateInstance(LPCWSTR,const CLSID*,LPUNKNOWN,REFIID,LPVOID*);
38 BOOL WINAPI SHGetPathFromIDListA (LPCITEMIDLIST pidl,LPSTR pszPath);
39 BOOL WINAPI SHGetPathFromIDListW (LPCITEMIDLIST pidl,LPWSTR pszPath);
40 #define SHGetPathFromIDList WINELIB_NAME_AW(SHGetPathFromIDList)
42 /*****************************************************************************
43 * Predeclare interfaces
45 typedef struct IShellIcon IShellIcon, *LPSHELLICON;
48 /*****************************************************************************
49 * IContextMenu interface
53 /* DATAOBJECT_InitShellIDList*/
54 #define CFSTR_SHELLIDLIST "Shell IDList Array" /* CF_IDLIST */
56 extern UINT cfShellIDList;
58 typedef struct
59 { UINT cidl;
60 UINT aoffset[1];
61 } CIDA, *LPIDA;
63 #define CFSTR_SHELLIDLISTOFFSET "Shell Object Offsets" /* CF_OBJECTPOSITIONS */
64 #define CFSTR_NETRESOURCES "Net Resource" /* CF_NETRESOURCE */
66 /* DATAOBJECT_InitFileGroupDesc */
67 #define CFSTR_FILEDESCRIPTORA "FileGroupDescriptor" /* CF_FILEGROUPDESCRIPTORA */
68 extern UINT cfFileGroupDesc;
70 #define CFSTR_FILEDESCRIPTORW "FileGroupDescriptorW" /* CF_FILEGROUPDESCRIPTORW */
72 /* DATAOBJECT_InitFileContents*/
73 #define CFSTR_FILECONTENTS "FileContents" /* CF_FILECONTENTS */
74 extern UINT cfFileContents;
76 #define CFSTR_FILENAMEA "FileName" /* CF_FILENAMEA */
77 #define CFSTR_FILENAMEW "FileNameW" /* CF_FILENAMEW */
78 #define CFSTR_PRINTERGROUP "PrinterFriendlyName" /* CF_PRINTERS */
79 #define CFSTR_FILENAMEMAPA "FileNameMap" /* CF_FILENAMEMAPA */
80 #define CFSTR_FILENAMEMAPW "FileNameMapW" /* CF_FILENAMEMAPW */
81 #define CFSTR_SHELLURL "UniformResourceLocator"
82 #define CFSTR_PREFERREDDROPEFFECT "Preferred DropEffect"
83 #define CFSTR_PERFORMEDDROPEFFECT "Performed DropEffect"
84 #define CFSTR_PASTESUCCEEDED "Paste Succeeded"
85 #define CFSTR_INDRAGLOOP "InShellDragLoop"
87 #define CFSTR_FILENAME WINELIB_NAME_AW(CFSTR_FILENAME)
90 /************************************************************************
91 * IShellView interface
94 typedef GUID SHELLVIEWID;
95 #define SV_CLASS_NAME ("SHELLDLL_DefView")
97 #define FCIDM_SHVIEWFIRST 0x0000
98 /* undocumented */
99 #define FCIDM_SHVIEW_ARRANGE 0x7001
100 #define FCIDM_SHVIEW_DELETE 0x7011
101 #define FCIDM_SHVIEW_PROPERTIES 0x7013
102 #define FCIDM_SHVIEW_CUT 0x7018
103 #define FCIDM_SHVIEW_COPY 0x7019
104 #define FCIDM_SHVIEW_INSERT 0x701A
105 #define FCIDM_SHVIEW_UNDO 0x701B
106 #define FCIDM_SHVIEW_INSERTLINK 0x701C
107 #define FCIDM_SHVIEW_SELECTALL 0x7021
108 #define FCIDM_SHVIEW_INVERTSELECTION 0x7022
110 #define FCIDM_SHVIEW_BIGICON 0x7029
111 #define FCIDM_SHVIEW_SMALLICON 0x702A
112 #define FCIDM_SHVIEW_LISTVIEW 0x702B
113 #define FCIDM_SHVIEW_REPORTVIEW 0x702C
114 /* 0x7030-0x703f are used by the shellbrowser */
115 #define FCIDM_SHVIEW_AUTOARRANGE 0x7031
116 #define FCIDM_SHVIEW_SNAPTOGRID 0x7032
118 #define FCIDM_SHVIEW_HELP 0x7041
119 #define FCIDM_SHVIEW_RENAME 0x7050
120 #define FCIDM_SHVIEW_CREATELINK 0x7051
121 #define FCIDM_SHVIEW_NEWLINK 0x7052
122 #define FCIDM_SHVIEW_NEWFOLDER 0x7053
124 #define FCIDM_SHVIEW_REFRESH 0x7100 /* FIXME */
125 #define FCIDM_SHVIEW_EXPLORE 0x7101 /* FIXME */
126 #define FCIDM_SHVIEW_OPEN 0x7102 /* FIXME */
128 #define FCIDM_SHVIEWLAST 0x7fff
129 #define FCIDM_BROWSERFIRST 0xA000
130 /* undocumented toolbar items from stddlg's*/
131 #define FCIDM_TB_UPFOLDER 0xA001
132 #define FCIDM_TB_NEWFOLDER 0xA002
133 #define FCIDM_TB_SMALLICON 0xA003
134 #define FCIDM_TB_REPORTVIEW 0xA004
135 #define FCIDM_TB_DESKTOP 0xA005 /* FIXME */
137 #define FCIDM_BROWSERLAST 0xbf00
138 #define FCIDM_GLOBALFIRST 0x8000
139 #define FCIDM_GLOBALLAST 0x9fff
142 * Global submenu IDs and separator IDs
144 #define FCIDM_MENU_FILE (FCIDM_GLOBALFIRST+0x0000)
145 #define FCIDM_MENU_EDIT (FCIDM_GLOBALFIRST+0x0040)
146 #define FCIDM_MENU_VIEW (FCIDM_GLOBALFIRST+0x0080)
147 #define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081)
148 #define FCIDM_MENU_TOOLS (FCIDM_GLOBALFIRST+0x00c0)
149 #define FCIDM_MENU_TOOLS_SEP_GOTO (FCIDM_GLOBALFIRST+0x00c1)
150 #define FCIDM_MENU_HELP (FCIDM_GLOBALFIRST+0x0100)
151 #define FCIDM_MENU_FIND (FCIDM_GLOBALFIRST+0x0140)
152 #define FCIDM_MENU_EXPLORE (FCIDM_GLOBALFIRST+0x0150)
153 #define FCIDM_MENU_FAVORITES (FCIDM_GLOBALFIRST+0x0170)
155 /* control IDs known to the view */
156 #define FCIDM_TOOLBAR (FCIDM_BROWSERFIRST + 0)
157 #define FCIDM_STATUS (FCIDM_BROWSERFIRST + 1)
160 /****************************************************************************
161 * IShellIcon interface
164 #define INTERFACE IShellIcon
165 #define IShellIcon_METHODS \
166 IUnknown_METHODS \
167 STDMETHOD(GetIconOf)(THIS_ LPCITEMIDLIST pidl, UINT flags, LPINT lpIconIndex) PURE;
168 ICOM_DEFINE(IShellIcon, IUnknown)
169 #undef INTERFACE
171 #ifdef COBJMACROS
172 /*** IUnknown methods ***/
173 #define IShellIcon_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
174 #define IShellIcon_AddRef(p) (p)->lpVtbl->AddRef(p)
175 #define IShellIcon_Release(p) (p)->lpVtbl->Release(p)
176 /*** IShellIcon methods ***/
177 #define IShellIcon_GetIconOf(p,a,b,c) (p)->lpVtbl->GetIconOf(p,a,b,c)
178 #endif
180 /****************************************************************************
181 * SHAddToRecentDocs API
183 #define SHARD_PIDL 0x00000001L
184 #define SHARD_PATHA 0x00000002L
185 #define SHARD_PATHW 0x00000003L
186 #define SHARD_PATH WINELIB_NAME_AW(SHARD_PATH)
188 DWORD WINAPI SHAddToRecentDocs(UINT uFlags, LPCVOID pv);
190 /****************************************************************************
191 * SHBrowseForFolder API
193 typedef INT (CALLBACK *BFFCALLBACK)(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData);
195 typedef struct tagBROWSEINFOA {
196 HWND hwndOwner;
197 LPCITEMIDLIST pidlRoot;
198 LPSTR pszDisplayName;
199 LPCSTR lpszTitle;
200 UINT ulFlags;
201 BFFCALLBACK lpfn;
202 LPARAM lParam;
203 INT iImage;
204 } BROWSEINFOA, *PBROWSEINFOA, *LPBROWSEINFOA;
206 typedef struct tagBROWSEINFOW {
207 HWND hwndOwner;
208 LPCITEMIDLIST pidlRoot;
209 LPWSTR pszDisplayName;
210 LPCWSTR lpszTitle;
211 UINT ulFlags;
212 BFFCALLBACK lpfn;
213 LPARAM lParam;
214 INT iImage;
215 } BROWSEINFOW, *PBROWSEINFOW, *LPBROWSEINFOW;
217 #define BROWSEINFO WINELIB_NAME_AW(BROWSEINFO)
218 #define PBROWSEINFO WINELIB_NAME_AW(PBROWSEINFO)
219 #define LPBROWSEINFO WINELIB_NAME_AW(LPBROWSEINFO)
221 /* Browsing for directory. */
222 #define BIF_RETURNONLYFSDIRS 0x0001
223 #define BIF_DONTGOBELOWDOMAIN 0x0002
224 #define BIF_STATUSTEXT 0x0004
225 #define BIF_RETURNFSANCESTORS 0x0008
226 #define BIF_EDITBOX 0x0010
227 #define BIF_VALIDATE 0x0020
228 #define BIF_NEWDIALOGSTYLE 0x0040
230 #define BIF_BROWSEFORCOMPUTER 0x1000
231 #define BIF_BROWSEFORPRINTER 0x2000
232 #define BIF_BROWSEINCLUDEFILES 0x4000
234 /* message from browser */
235 #define BFFM_INITIALIZED 1
236 #define BFFM_SELCHANGED 2
237 #define BFFM_VALIDATEFAILEDA 3 /* lParam:szPath ret:1(cont),0(EndDialog) */
238 #define BFFM_VALIDATEFAILEDW 4 /* lParam:wzPath ret:1(cont),0(EndDialog) */
240 /* messages to browser */
241 #define BFFM_SETSTATUSTEXTA (WM_USER+100)
242 #define BFFM_ENABLEOK (WM_USER+101)
243 #define BFFM_SETSELECTIONA (WM_USER+102)
244 #define BFFM_SETSELECTIONW (WM_USER+103)
245 #define BFFM_SETSTATUSTEXTW (WM_USER+104)
246 #define BFFM_SETOKTEXT (WM_USER+105)
247 #define BFFM_SETEXPANDED (WM_USER+106)
249 LPITEMIDLIST WINAPI SHBrowseForFolderA(LPBROWSEINFOA lpbi);
250 LPITEMIDLIST WINAPI SHBrowseForFolderW(LPBROWSEINFOW lpbi);
251 #define SHBrowseForFolder WINELIB_NAME_AW(SHBrowseForFolder)
252 #define BFFM_SETSTATUSTEXT WINELIB_NAME_AW(BFFM_SETSTATUSTEXT)
253 #define BFFM_SETSELECTION WINELIB_NAME_AW(BFFM_SETSELECTION)
254 #define BFFM_VALIDATEFAILED WINELIB_NAME_AW(BFFM_VALIDATEFAILED)
256 /****************************************************************************
257 * SHGetDataFromIDList API
259 #define SHGDFIL_FINDDATA 1
260 #define SHGDFIL_NETRESOURCE 2
261 #define SHGDFIL_DESCRIPTIONID 3
263 #define SHDID_ROOT_REGITEM 1
264 #define SHDID_FS_FILE 2
265 #define SHDID_FS_DIRECTORY 3
266 #define SHDID_FS_OTHER 4
267 #define SHDID_COMPUTER_DRIVE35 5
268 #define SHDID_COMPUTER_DRIVE525 6
269 #define SHDID_COMPUTER_REMOVABLE 7
270 #define SHDID_COMPUTER_FIXED 8
271 #define SHDID_COMPUTER_NETDRIVE 9
272 #define SHDID_COMPUTER_CDROM 10
273 #define SHDID_COMPUTER_RAMDISK 11
274 #define SHDID_COMPUTER_OTHER 12
275 #define SHDID_NET_DOMAIN 13
276 #define SHDID_NET_SERVER 14
277 #define SHDID_NET_SHARE 15
278 #define SHDID_NET_RESTOFNET 16
279 #define SHDID_NET_OTHER 17
280 #define SHDID_COMPUTER_IMAGING 18
281 #define SHDID_COMPUTER_AUDIO 19
282 #define SHDID_COMPUTER_SHAREDDOCS 20
284 typedef struct _SHDESCRIPTIONID
285 { DWORD dwDescriptionId;
286 CLSID clsid;
287 } SHDESCRIPTIONID, *LPSHDESCRIPTIONID;
289 HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID pv, int cb);
290 HRESULT WINAPI SHGetDataFromIDListW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID pv, int cb);
291 #define SHGetDataFromIDList WINELIB_NAME_AW(SHGetDataFromIDList)
293 BOOL WINAPI SHGetSpecialFolderPathA (HWND hwndOwner, LPSTR szPath, int nFolder, BOOL bCreate);
294 BOOL WINAPI SHGetSpecialFolderPathW (HWND hwndOwner, LPWSTR szPath, int nFolder, BOOL bCreate);
295 #define SHGetSpecialFolderPath WINELIB_NAME_AW(SHGetSpecialFolderPath)
297 /****************************************************************************
298 * shlview structures
302 * IShellFolderViewCallback Callback
303 * This "callback" is called by the shells default IShellView implementation (that
304 * we got using SHCreateShellViewEx()), to notify us of the various things that
305 * are happening to the shellview (and ask for things too).
307 * You don't have to support anything here - anything you don't want to
308 * handle, the shell will do itself if you just return E_NOTIMPL. This parameters
309 * that the shell passes to this function are entirely undocumented.
311 * HOWEVER, as the cabview sample as originally written used this callback, the
312 * writers implemented the callback mechanism on top of their own IShellView.
313 * Look there for some clues on what to do here.
316 typedef HRESULT (CALLBACK *SHELLVIEWPROC)(DWORD dwUserParam,LPSHELLFOLDER psf,
317 HWND hwnd,UINT uMsg,UINT wParam,LPARAM lParam);
319 /* NF valid values for the "viewmode" item of the SHELLTEMPLATE*/
320 #define NF_INHERITVIEW 0x0000
321 #define NF_LOCALVIEW 0x0001
323 typedef struct _SHELLVIEWDATA /* idl */
324 { DWORD dwSize;
325 LPSHELLFOLDER pShellFolder;
326 DWORD dwUserParam;
327 LPCITEMIDLIST pidl;
328 DWORD v3; /* always 0 */
329 SHELLVIEWPROC pCallBack;
330 DWORD viewmode; /* NF_* enum */
331 } SHELLVIEWDATA, * LPSHELLVIEWDATA;
333 HRESULT WINAPI SHGetMalloc(LPMALLOC *lpmal) ;
335 /**********************************************************************
336 * SHGetSetSettings ()
339 typedef struct
341 BOOL fShowAllObjects : 1;
342 BOOL fShowExtensions : 1;
343 BOOL fNoConfirmRecycle : 1;
345 BOOL fShowSysFiles : 1;
346 BOOL fShowCompColor : 1;
347 BOOL fDoubleClickInWebView : 1;
348 BOOL fDesktopHTML : 1;
349 BOOL fWin95Classic : 1;
350 BOOL fDontPrettyPath : 1;
351 BOOL fShowAttribCol : 1;
352 BOOL fMapNetDrvBtn : 1;
353 BOOL fShowInfoTip : 1;
354 BOOL fHideIcons : 1;
355 BOOL fWebView : 1;
356 BOOL fFilter : 1;
357 BOOL fShowSuperHidden : 1;
358 BOOL fNoNetCrawling : 1;
360 DWORD dwWin95Unused;
361 UINT uWin95Unused;
362 LONG lParamSort;
363 int iSortDirection;
364 UINT version;
365 UINT uNotUsed;
366 BOOL fSepProcess: 1;
367 BOOL fStartPanelOn: 1;
368 BOOL fShowStartPage: 1;
369 UINT fSpareFlags : 13;
370 } SHELLSTATE, *LPSHELLSTATE;
372 /**********************************************************************
373 * SHGetSettings ()
375 typedef struct
376 { BOOL fShowAllObjects : 1;
377 BOOL fShowExtensions : 1;
378 BOOL fNoConfirmRecycle : 1;
379 BOOL fShowSysFiles : 1;
381 BOOL fShowCompColor : 1;
382 BOOL fDoubleClickInWebView : 1;
383 BOOL fDesktopHTML : 1;
384 BOOL fWin95Classic : 1;
386 BOOL fDontPrettyPath : 1;
387 BOOL fShowAttribCol : 1;
388 BOOL fMapNetDrvBtn : 1;
389 BOOL fShowInfoTip : 1;
391 BOOL fHideIcons : 1;
392 UINT fRestFlags : 3;
393 } SHELLFLAGSTATE, * LPSHELLFLAGSTATE;
395 VOID WINAPI SHGetSettings(LPSHELLFLAGSTATE lpsfs, DWORD dwMask);
397 #define SSF_SHOWALLOBJECTS 0x0001
398 #define SSF_SHOWEXTENSIONS 0x0002
399 #define SSF_SHOWCOMPCOLOR 0x0008
400 #define SSF_SHOWSYSFILES 0x0020
401 #define SSF_DOUBLECLICKINWEBVIEW 0x0080
402 #define SSF_SHOWATTRIBCOL 0x0100
403 #define SSF_DESKTOPHTML 0x0200
404 #define SSF_WIN95CLASSIC 0x0400
405 #define SSF_DONTPRETTYPATH 0x0800
406 #define SSF_SHOWINFOTIP 0x2000
407 #define SSF_MAPNETDRVBUTTON 0x1000
408 #define SSF_NOCONFIRMRECYCLE 0x8000
409 #define SSF_HIDEICONS 0x4000
411 /****************************************************************************
412 * SHRestricted API
414 typedef enum RESTRICTIONS
416 REST_NONE = 0x00000000,
417 REST_NORUN = 0x00000001,
418 REST_NOCLOSE = 0x00000002,
419 REST_NOSAVESET = 0x00000004,
420 REST_NOFILEMENU = 0x00000008,
421 REST_NOSETFOLDERS = 0x00000010,
422 REST_NOSETTASKBAR = 0x00000020,
423 REST_NODESKTOP = 0x00000040,
424 REST_NOFIND = 0x00000080,
425 REST_NODRIVES = 0x00000100,
426 REST_NODRIVEAUTORUN = 0x00000200,
427 REST_NODRIVETYPEAUTORUN = 0x00000400,
428 REST_NONETHOOD = 0x00000800,
429 REST_STARTBANNER = 0x00001000,
430 REST_RESTRICTRUN = 0x00002000,
431 REST_NOPRINTERTABS = 0x00004000,
432 REST_NOPRINTERDELETE = 0x00008000,
433 REST_NOPRINTERADD = 0x00010000,
434 REST_NOSTARTMENUSUBFOLDERS = 0x00020000,
435 REST_MYDOCSONNET = 0x00040000,
436 REST_NOEXITTODOS = 0x00080000,
437 REST_ENFORCESHELLEXTSECURITY = 0x00100000,
438 REST_LINKRESOLVEIGNORELINKINFO = 0x00200000,
439 REST_NOCOMMONGROUPS = 0x00400000,
440 REST_SEPARATEDESKTOPPROCESS = 0x00800000,
441 REST_NOWEB = 0x01000000,
442 REST_NOTRAYCONTEXTMENU = 0x02000000,
443 REST_NOVIEWCONTEXTMENU = 0x04000000,
444 REST_NONETCONNECTDISCONNECT = 0x08000000,
445 REST_STARTMENULOGOFF = 0x10000000,
446 REST_NOSETTINGSASSIST = 0x20000000,
447 REST_NOINTERNETICON = 0x40000001,
448 REST_NORECENTDOCSHISTORY,
449 REST_NORECENTDOCSMENU,
450 REST_NOACTIVEDESKTOP,
451 REST_NOACTIVEDESKTOPCHANGES,
452 REST_NOFAVORITESMENU,
453 REST_CLEARRECENTDOCSONEXIT,
454 REST_CLASSICSHELL,
455 REST_NOCUSTOMIZEWEBVIEW,
457 REST_NOHTMLWALLPAPER = 0x40000010,
458 REST_NOCHANGINGWALLPAPER,
459 REST_NODESKCOMP,
460 REST_NOADDDESKCOMP,
461 REST_NODELDESKCOMP,
462 REST_NOCLOSEDESKCOMP,
463 REST_NOCLOSE_DRAGDROPBAND,
464 REST_NOMOVINGBAND,
465 REST_NOEDITDESKCOMP,
466 REST_NORESOLVESEARCH,
467 REST_NORESOLVETRACK,
468 REST_FORCECOPYACLWITHFILE,
469 REST_NOLOGO3CHANNELNOTIFY,
470 REST_NOFORGETSOFTWAREUPDATE,
471 REST_NOSETACTIVEDESKTOP,
472 REST_NOUPDATEWINDOWS,
473 REST_NOCHANGESTARMENU, /* 0x40000020 */
474 REST_NOFOLDEROPTIONS,
475 REST_HASFINDCOMPUTERS,
476 REST_INTELLIMENUS,
477 REST_RUNDLGMEMCHECKBOX,
478 REST_ARP_ShowPostSetup,
479 REST_NOCSC,
480 REST_NOCONTROLPANEL,
481 REST_ENUMWORKGROUP,
482 REST_ARP_NOARP,
483 REST_ARP_NOREMOVEPAGE,
484 REST_ARP_NOADDPAGE,
485 REST_ARP_NOWINSETUPPAGE,
486 REST_GREYMSIADS,
487 REST_NOCHANGEMAPPEDDRIVELABEL,
488 REST_NOCHANGEMAPPEDDRIVECOMMENT,
489 REST_MaxRecentDocs, /* 0x40000030 */
490 REST_NONETWORKCONNECTIONS,
491 REST_FORCESTARTMENULOGOFF,
492 REST_NOWEBVIEW,
493 REST_NOCUSTOMIZETHISFOLDER,
494 REST_NOENCRYPTION,
496 REST_ALLOWFRENCHENCRYPTION, /* not documented */
498 REST_DONTSHOWSUPERHIDDEN,
499 REST_NOSHELLSEARCHBUTTON,
500 REST_NOHARDWARETAB,
501 REST_NORUNASINSTALLPROMPT,
502 REST_PROMPTRUNASINSTALLNETPATH,
503 REST_NOMANAGEMYCOMPUTERVERB,
504 REST_NORECENTDOCSNETHOOD,
505 REST_DISALLOWRUN,
506 REST_NOWELCOMESCREEN,
507 REST_RESTRICTCPL, /* 0x40000040 */
508 REST_DISALLOWCPL,
509 REST_NOSMBALLOONTIP,
510 REST_NOSMHELP,
511 REST_NOWINKEYS,
512 REST_NOENCRYPTONMOVE,
513 REST_NOLOCALMACHINERUN,
514 REST_NOCURRENTUSERRUN,
515 REST_NOLOCALMACHINERUNONCE,
516 REST_NOCURRENTUSERRUNONCE,
517 REST_FORCEACTIVEDESKTOPON,
518 REST_NOCOMPUTERSNEARME,
519 REST_NOVIEWONDRIVE,
520 REST_NONETCRAWL,
521 REST_NOSHAREDDOCUMENTS,
522 REST_NOSMMYDOCS,
523 REST_NOSMMYPICS, /* 0x40000050 */
524 REST_ALLOWBITBUCKDRIVES,
525 REST_NONLEGACYSHELLMODE,
526 REST_NOCONTROLPANELBARRICADE,
527 REST_NOSTARTPAGE,
528 REST_NOAUTOTRAYNOTIFY,
529 REST_NOTASKGROUPING,
530 REST_NOCDBURNING,
531 REST_MYCOMPNOPROP,
532 REST_MYDOCSNOPROP,
533 REST_NOSTARTPANEL,
534 REST_NODISPLAYAPPEARANCEPAGE,
535 REST_NOTHEMESTAB,
536 REST_NOVISUALSTYLECHOICE,
537 REST_NOSIZECHOICE,
538 REST_NOCOLORCHOICE,
539 REST_SETVISUALSTYLE, /* 0x40000060 */
540 REST_STARTRUNNOHOMEPATH,
541 REST_NOUSERNAMEINSTARTPANEL,
542 REST_NOMYCOMPUTERICON,
543 REST_NOSMNETWORKPLACES,
544 REST_NOSMPINNEDLIST,
545 REST_NOSMMYMUSIC,
546 REST_NOSMEJECTPC,
547 REST_NOSMMOREPROGRAMS,
548 REST_NOSMMFUPROGRAMS,
549 REST_NOTRAYITEMSDISPLAY,
550 REST_NOTOOLBARSONTASKBAR,
551 /* 0x4000006C
552 0x4000006D
553 0x4000006E */
554 REST_NOSMCONFIGUREPROGRAMS = 0x4000006F,
555 REST_HIDECLOCK, /* 0x40000070 */
556 REST_NOLOWDISKSPACECHECKS,
557 REST_NOENTIRENETWORK,
558 REST_NODESKTOPCLEANUP,
559 REST_BITBUCKNUKEONDELETE,
560 REST_BITBUCKCONFIRMDELETE,
561 REST_BITBUCKNOPROP,
562 REST_NODISPBACKGROUND,
563 REST_NODISPSCREENSAVEPG,
564 REST_NODISPSETTINGSPG,
565 REST_NODISPSCREENSAVEPREVIEW,
566 REST_NODISPLAYCPL,
567 REST_HIDERUNASVERB,
568 REST_NOTHUMBNAILCACHE,
569 REST_NOSTRCMPLOGICAL,
570 REST_NOPUBLISHWIZARD,
571 REST_NOONLINEPRINTSWIZARD, /* 0x40000080 */
572 REST_NOWEBSERVICES,
573 REST_ALLOWUNHASHEDWEBVIEW,
574 REST_ALLOWLEGACYWEBVIEW,
575 REST_REVERTWEBVIEWSECURITY,
577 REST_INHERITCONSOLEHANDLES = 0x40000086,
579 REST_NODISCONNECT = 0x41000001,
580 REST_NOSECURITY,
581 REST_NOFILEASSOCIATE, /* 0x41000003 */
582 } RESTRICTIONS;
584 DWORD WINAPI SHRestricted(RESTRICTIONS rest);
586 /****************************************************************************
587 * SHChangeNotify API
589 typedef struct _SHChangeNotifyEntry
591 LPCITEMIDLIST pidl;
592 BOOL fRecursive;
593 } SHChangeNotifyEntry;
595 #define SHCNE_RENAMEITEM 0x00000001
596 #define SHCNE_CREATE 0x00000002
597 #define SHCNE_DELETE 0x00000004
598 #define SHCNE_MKDIR 0x00000008
599 #define SHCNE_RMDIR 0x00000010
600 #define SHCNE_MEDIAINSERTED 0x00000020
601 #define SHCNE_MEDIAREMOVED 0x00000040
602 #define SHCNE_DRIVEREMOVED 0x00000080
603 #define SHCNE_DRIVEADD 0x00000100
604 #define SHCNE_NETSHARE 0x00000200
605 #define SHCNE_NETUNSHARE 0x00000400
606 #define SHCNE_ATTRIBUTES 0x00000800
607 #define SHCNE_UPDATEDIR 0x00001000
608 #define SHCNE_UPDATEITEM 0x00002000
609 #define SHCNE_SERVERDISCONNECT 0x00004000
610 #define SHCNE_UPDATEIMAGE 0x00008000
611 #define SHCNE_DRIVEADDGUI 0x00010000
612 #define SHCNE_RENAMEFOLDER 0x00020000
613 #define SHCNE_FREESPACE 0x00040000
615 #define SHCNE_EXTENDED_EVENT 0x04000000
616 #define SHCNE_ASSOCCHANGED 0x08000000
617 #define SHCNE_DISKEVENTS 0x0002381F
618 #define SHCNE_GLOBALEVENTS 0x0C0581E0
619 #define SHCNE_ALLEVENTS 0x7FFFFFFF
620 #define SHCNE_INTERRUPT 0x80000000
622 #define SHCNEE_ORDERCHANGED 0x0002L
623 #define SHCNEE_MSI_CHANGE 0x0004L
624 #define SHCNEE_MSI_UNINSTALL 0x0005L
626 #define SHCNF_IDLIST 0x0000
627 #define SHCNF_PATHA 0x0001
628 #define SHCNF_PRINTERA 0x0002
629 #define SHCNF_DWORD 0x0003
630 #define SHCNF_PATHW 0x0005
631 #define SHCNF_PRINTERW 0x0006
632 #define SHCNF_TYPE 0x00FF
633 #define SHCNF_FLUSH 0x1000
634 #define SHCNF_FLUSHNOWAIT 0x2000
636 #define SHCNF_PATH WINELIB_NAME_AW(SHCNF_PATH)
637 #define SHCNF_PRINTER WINELIB_NAME_AW(SHCNF_PRINTER)
639 void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2);
642 * IShellChangeNotify
644 typedef struct IShellChangeNotify IShellChangeNotify, *LPSHELLCHANGENOTIFY;
646 #define INTERFACE IShellChangeNotify
647 #define IShellChangeNotify_METHODS \
648 IUnknown_METHODS \
649 STDMETHOD(OnChange)(THIS_ LONG lEvent, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
651 ICOM_DEFINE(IShellChangeNotify, IUnknown)
652 #undef INTERFACE
654 #ifdef COBJMACROS
655 /*** IUnknown methods ***/
656 #define IShellChangeNotify_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
657 #define IShellChangeNotify_AddRef(p) (p)->lpVtbl->AddRef(p)
658 #define IShellChangeNotify_Release(p) (p)->lpVtbl->Release(p)
659 /*** IShellChangeNotify methods ***/
660 #define IShellChangeNotify_OnChange(p,a,b,c) (p)->lpVtbl->OnChange(p,a,b,c)
661 #endif
663 typedef struct _SHChangeDWORDAsIDList {
664 USHORT cb;
665 DWORD dwItem1;
666 DWORD dwItem2;
667 USHORT cbZero;
668 } SHChangeDWORDAsIDList, *LPSHChangeDWORDAsIDList;
670 typedef struct _SHChangeProductKeyAsIDList {
671 USHORT cb;
672 WCHAR wszProductKey[39];
673 USHORT cbZero;
674 } SHChangeProductKeyAsIDList, *LPSHChangeProductKeyAsIDList;
676 ULONG WINAPI SHChangeNotifyRegister(HWND hwnd, int fSources, LONG fEvents, UINT wMsg,
677 int cEntries, SHChangeNotifyEntry *pshcne);
678 BOOL WINAPI SHChangeNotifyDeregister(ULONG ulID);
679 HANDLE WINAPI SHChangeNotification_Lock(HANDLE hChangeNotification, DWORD dwProcessId,
680 LPITEMIDLIST **pppidl, LONG *plEvent);
681 BOOL WINAPI SHChangeNotification_Unlock(HANDLE hLock);
683 HRESULT WINAPI SHGetRealIDL(IShellFolder *psf, LPCITEMIDLIST pidlSimple, LPITEMIDLIST * ppidlReal);
685 /****************************************************************************
686 * SHCreateDirectory API
688 DWORD WINAPI SHCreateDirectory(HWND, LPCVOID);
689 DWORD WINAPI SHCreateDirectoryExA(HWND, LPCSTR, LPSECURITY_ATTRIBUTES);
690 DWORD WINAPI SHCreateDirectoryExW(HWND, LPCWSTR, LPSECURITY_ATTRIBUTES);
692 /****************************************************************************
693 * SHGetSpecialFolderLocation API
695 HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, int nFolder, LPITEMIDLIST * ppidl);
696 HRESULT WINAPI SHGetFolderLocation(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwReserved, LPITEMIDLIST *ppidl);
698 /****************************************************************************
699 * SHGetFolderPath API
701 typedef enum {
702 SHGFP_TYPE_CURRENT = 0,
703 SHGFP_TYPE_DEFAULT = 1
704 } SHGFP_TYPE;
706 HRESULT WINAPI SHGetFolderPathA(HWND hwnd, int nFolder, HANDLE hToken, DWORD dwFlags, LPSTR pszPath);
707 HRESULT WINAPI SHGetFolderPathW(HWND hwnd, int nFolder, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath);
708 #define SHGetFolderPath WINELIB_NAME_AW(SHGetFolderPath)
710 #define CSIDL_DESKTOP 0x0000
711 #define CSIDL_INTERNET 0x0001
712 #define CSIDL_PROGRAMS 0x0002
713 #define CSIDL_CONTROLS 0x0003
714 #define CSIDL_PRINTERS 0x0004
715 #define CSIDL_PERSONAL 0x0005
716 #define CSIDL_FAVORITES 0x0006
717 #define CSIDL_STARTUP 0x0007
718 #define CSIDL_RECENT 0x0008
719 #define CSIDL_SENDTO 0x0009
720 #define CSIDL_BITBUCKET 0x000a
721 #define CSIDL_STARTMENU 0x000b
722 #define CSIDL_MYDOCUMENTS 0x000c
723 #define CSIDL_MYMUSIC 0x000d
724 #define CSIDL_MYVIDEO 0x000e
725 #define CSIDL_DESKTOPDIRECTORY 0x0010
726 #define CSIDL_DRIVES 0x0011
727 #define CSIDL_NETWORK 0x0012
728 #define CSIDL_NETHOOD 0x0013
729 #define CSIDL_FONTS 0x0014
730 #define CSIDL_TEMPLATES 0x0015
731 #define CSIDL_COMMON_STARTMENU 0x0016
732 #define CSIDL_COMMON_PROGRAMS 0X0017
733 #define CSIDL_COMMON_STARTUP 0x0018
734 #define CSIDL_COMMON_DESKTOPDIRECTORY 0x0019
735 #define CSIDL_APPDATA 0x001a
736 #define CSIDL_PRINTHOOD 0x001b
737 #define CSIDL_LOCAL_APPDATA 0x001c
738 #define CSIDL_ALTSTARTUP 0x001d
739 #define CSIDL_COMMON_ALTSTARTUP 0x001e
740 #define CSIDL_COMMON_FAVORITES 0x001f
741 #define CSIDL_INTERNET_CACHE 0x0020
742 #define CSIDL_COOKIES 0x0021
743 #define CSIDL_HISTORY 0x0022
744 #define CSIDL_COMMON_APPDATA 0x0023
745 #define CSIDL_WINDOWS 0x0024
746 #define CSIDL_SYSTEM 0x0025
747 #define CSIDL_PROGRAM_FILES 0x0026
748 #define CSIDL_MYPICTURES 0x0027
749 #define CSIDL_PROFILE 0x0028
750 #define CSIDL_SYSTEMX86 0x0029
751 #define CSIDL_PROGRAM_FILESX86 0x002a
752 #define CSIDL_PROGRAM_FILES_COMMON 0x002b
753 #define CSIDL_PROGRAM_FILES_COMMONX86 0x002c
754 #define CSIDL_COMMON_TEMPLATES 0x002d
755 #define CSIDL_COMMON_DOCUMENTS 0x002e
756 #define CSIDL_COMMON_ADMINTOOLS 0x002f
757 #define CSIDL_ADMINTOOLS 0x0030
758 #define CSIDL_CONNECTIONS 0x0031
759 #define CSIDL_COMMON_MUSIC 0x0035
760 #define CSIDL_COMMON_PICTURES 0x0036
761 #define CSIDL_COMMON_VIDEO 0x0037
762 #define CSIDL_RESOURCES 0x0038
763 #define CSIDL_RESOURCES_LOCALIZED 0x0039
764 #define CSIDL_COMMON_OEM_LINKS 0x003a
765 #define CSIDL_CDBURN_AREA 0x003b
766 #define CSIDL_COMPUTERSNEARME 0x003d
767 #define CSIDL_PROFILES 0x003e
768 #define CSIDL_FOLDER_MASK 0x00ff
769 #define CSIDL_FLAG_PER_USER_INIT 0x0800
770 #define CSIDL_FLAG_NO_ALIAS 0x1000
771 #define CSIDL_FLAG_DONT_VERIFY 0x4000
772 #define CSIDL_FLAG_CREATE 0x8000
774 #define CSIDL_FLAG_MASK 0xff00
776 /****************************************************************************
777 * SHGetDesktopFolder API
779 DWORD WINAPI SHGetDesktopFolder(IShellFolder * *);
781 /****************************************************************************
782 * SHBindToParent API
784 HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCITEMIDLIST *ppidlLast);
786 /****************************************************************************
787 * SHDefExtractIcon API
789 HRESULT WINAPI SHDefExtractIconA(LPCSTR pszIconFile, int iIndex, UINT uFlags,
790 HICON* phiconLarge, HICON* phiconSmall, UINT nIconSize);
791 HRESULT WINAPI SHDefExtractIconW(LPCWSTR pszIconFile, int iIndex, UINT uFlags,
792 HICON* phiconLarge, HICON* phiconSmall, UINT nIconSize);
793 #define SHDefExtractIcon WINELIB_NAME_AW(SHDefExtractIcon)
796 * DROPFILES for CF_HDROP and CF_PRINTERS
798 typedef struct _DROPFILES
800 DWORD pFiles;
801 POINT pt;
802 BOOL fNC;
803 BOOL fWide;
804 } DROPFILES, *LPDROPFILES;
807 * Properties of a file in the clipboard
809 typedef struct _FILEDESCRIPTORA {
810 DWORD dwFlags;
811 CLSID clsid;
812 SIZEL sizel;
813 POINTL pointl;
814 DWORD dwFileAttributes;
815 FILETIME ftCreationTime;
816 FILETIME ftLastAccessTime;
817 FILETIME ftLastWriteTime;
818 DWORD nFileSizeHigh;
819 DWORD nFileSizeLow;
820 CHAR cFileName[MAX_PATH];
821 } FILEDESCRIPTORA, *LPFILEDESCRIPTORA;
823 typedef struct _FILEDESCRIPTORW {
824 DWORD dwFlags;
825 CLSID clsid;
826 SIZEL sizel;
827 POINTL pointl;
828 DWORD dwFileAttributes;
829 FILETIME ftCreationTime;
830 FILETIME ftLastAccessTime;
831 FILETIME ftLastWriteTime;
832 DWORD nFileSizeHigh;
833 DWORD nFileSizeLow;
834 WCHAR cFileName[MAX_PATH];
835 } FILEDESCRIPTORW, *LPFILEDESCRIPTORW;
837 DECL_WINELIB_TYPE_AW(FILEDESCRIPTOR)
838 DECL_WINELIB_TYPE_AW(LPFILEDESCRIPTOR)
841 * CF_FILEGROUPDESCRIPTOR clipboard format
843 typedef struct _FILEGROUPDESCRIPTORA {
844 UINT cItems;
845 FILEDESCRIPTORA fgd[1];
846 } FILEGROUPDESCRIPTORA, *LPFILEGROUPDESCRIPTORA;
848 typedef struct _FILEGROUPDESCRIPTORW {
849 UINT cItems;
850 FILEDESCRIPTORW fgd[1];
851 } FILEGROUPDESCRIPTORW, *LPFILEGROUPDESCRIPTORW;
853 DECL_WINELIB_TYPE_AW(FILEGROUPDESCRIPTOR)
854 DECL_WINELIB_TYPE_AW(LPFILEGROUPDESCRIPTOR)
856 /****************************************************************************
857 * Path Manipulation Routines
859 VOID WINAPI PathGetShortPath(LPWSTR pszPath);
861 #include <poppack.h>
863 /*****************************************************************************
864 * IFileSystemBindData interface
866 #ifndef __IFileSystemBindData_FWD_DEFINED__
867 #define __IFileSystemBindData_FWD_DEFINED__
868 typedef struct IFileSystemBindData IFileSystemBindData;
869 #endif
871 typedef IFileSystemBindData *LPFILESYSTEMBINDDATA;
873 #ifndef __IFileSystemBindData_INTERFACE_DEFINED__
874 #define __IFileSystemBindData_INTERFACE_DEFINED__
876 DEFINE_GUID(IID_IFileSystemBindData, 0x01e18d10, 0x4d8b, 0x11d2, 0x85,0x5d, 0x00,0x60,0x08,0x05,0x93,0x67);
877 #if defined(__cplusplus) && !defined(CINTERFACE)
878 struct IFileSystemBindData : public IUnknown
880 virtual HRESULT STDMETHODCALLTYPE GetFindData(
881 WIN32_FIND_DATAW* pfd) = 0;
883 virtual HRESULT STDMETHODCALLTYPE SetFindData(
884 const WIN32_FIND_DATAW* pfd) = 0;
887 #else
888 typedef struct IFileSystemBindDataVtbl IFileSystemBindDataVtbl;
889 struct IFileSystemBindData {
890 const IFileSystemBindDataVtbl* lpVtbl;
892 struct IFileSystemBindDataVtbl {
893 ICOM_MSVTABLE_COMPAT_FIELDS
895 /*** IUnknown methods ***/
896 HRESULT (STDMETHODCALLTYPE *QueryInterface)(
897 IFileSystemBindData* This,
898 REFIID riid,
899 void** ppvObject);
901 ULONG (STDMETHODCALLTYPE *AddRef)(
902 IFileSystemBindData* This);
904 ULONG (STDMETHODCALLTYPE *Release)(
905 IFileSystemBindData* This);
907 /*** IFileSystemBindData methods ***/
908 HRESULT (STDMETHODCALLTYPE *GetFindData)(
909 IFileSystemBindData* This,
910 WIN32_FIND_DATAW* pfd);
912 HRESULT (STDMETHODCALLTYPE *SetFindData)(
913 IFileSystemBindData* This,
914 const WIN32_FIND_DATAW* pfd);
918 /*** IUnknown methods ***/
919 #define IFileSystemBindData_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
920 #define IFileSystemBindData_AddRef(p) (p)->lpVtbl->AddRef(p)
921 #define IFileSystemBindData_Release(p) (p)->lpVtbl->Release(p)
922 /*** IFileSystemBindData methods ***/
923 #define IFileSystemBindData_GetFindData(p,a) (p)->lpVtbl->GetFindData(p,a)
924 #define IFileSystemBindData_SetFindData(p,a) (p)->lpVtbl->SetFindData(p,a)
926 #endif
928 #define IFileSystemBindData_METHODS \
929 ICOM_MSVTABLE_COMPAT_FIELDS \
930 /*** IUnknown methods ***/ \
931 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
932 STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
933 STDMETHOD_(ULONG,Release)(THIS) PURE; \
934 /*** IFileSystemBindData methods ***/ \
935 STDMETHOD_(HRESULT,GetFindData)(THIS_ WIN32_FIND_DATAW* pfd) PURE; \
936 STDMETHOD_(HRESULT,SetFindData)(THIS_ const WIN32_FIND_DATAW* pfd) PURE;
938 #endif /* __IFileSystemBindData_INTERFACE_DEFINED__ */
941 #ifdef __cplusplus
942 } /* extern "C" */
943 #endif /* defined(__cplusplus) */
945 #endif /* __WINE_SHLOBJ_H */