A first stab at wcstod().
[wine/hacks.git] / include / shlobj.h
blobcdc98dabbcbc0d1c3c8243c147988bae52a243a6
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>
37 BOOL WINAPI SHGetPathFromIDListA (LPCITEMIDLIST pidl,LPSTR pszPath);
38 BOOL WINAPI SHGetPathFromIDListW (LPCITEMIDLIST pidl,LPWSTR pszPath);
39 #define SHGetPathFromIDList WINELIB_NAME_AW(SHGetPathFromIDList)
41 /*****************************************************************************
42 * Predeclare interfaces
44 typedef struct IShellIcon IShellIcon, *LPSHELLICON;
47 /*****************************************************************************
48 * IContextMenu interface
52 /* DATAOBJECT_InitShellIDList*/
53 #define CFSTR_SHELLIDLIST "Shell IDList Array" /* CF_IDLIST */
55 extern UINT cfShellIDList;
57 typedef struct
58 { UINT cidl;
59 UINT aoffset[1];
60 } CIDA, *LPIDA;
62 #define CFSTR_SHELLIDLISTOFFSET "Shell Object Offsets" /* CF_OBJECTPOSITIONS */
63 #define CFSTR_NETRESOURCES "Net Resource" /* CF_NETRESOURCE */
65 /* DATAOBJECT_InitFileGroupDesc */
66 #define CFSTR_FILEDESCRIPTORA "FileGroupDescriptor" /* CF_FILEGROUPDESCRIPTORA */
67 extern UINT cfFileGroupDesc;
69 #define CFSTR_FILEDESCRIPTORW "FileGroupDescriptorW" /* CF_FILEGROUPDESCRIPTORW */
71 /* DATAOBJECT_InitFileContents*/
72 #define CFSTR_FILECONTENTS "FileContents" /* CF_FILECONTENTS */
73 extern UINT cfFileContents;
75 #define CFSTR_FILENAMEA "FileName" /* CF_FILENAMEA */
76 #define CFSTR_FILENAMEW "FileNameW" /* CF_FILENAMEW */
77 #define CFSTR_PRINTERGROUP "PrinterFriendlyName" /* CF_PRINTERS */
78 #define CFSTR_FILENAMEMAPA "FileNameMap" /* CF_FILENAMEMAPA */
79 #define CFSTR_FILENAMEMAPW "FileNameMapW" /* CF_FILENAMEMAPW */
80 #define CFSTR_SHELLURL "UniformResourceLocator"
81 #define CFSTR_PREFERREDDROPEFFECT "Preferred DropEffect"
82 #define CFSTR_PERFORMEDDROPEFFECT "Performed DropEffect"
83 #define CFSTR_PASTESUCCEEDED "Paste Succeeded"
84 #define CFSTR_INDRAGLOOP "InShellDragLoop"
86 #define CFSTR_FILENAME WINELIB_NAME_AW(CFSTR_FILENAME)
89 /************************************************************************
90 * IShellView interface
93 typedef GUID SHELLVIEWID;
94 #define SV_CLASS_NAME ("SHELLDLL_DefView")
96 #define FCIDM_SHVIEWFIRST 0x0000
97 /* undocumented */
98 #define FCIDM_SHVIEW_ARRANGE 0x7001
99 #define FCIDM_SHVIEW_DELETE 0x7011
100 #define FCIDM_SHVIEW_PROPERTIES 0x7013
101 #define FCIDM_SHVIEW_CUT 0x7018
102 #define FCIDM_SHVIEW_COPY 0x7019
103 #define FCIDM_SHVIEW_INSERT 0x701A
104 #define FCIDM_SHVIEW_UNDO 0x701B
105 #define FCIDM_SHVIEW_INSERTLINK 0x701C
106 #define FCIDM_SHVIEW_SELECTALL 0x7021
107 #define FCIDM_SHVIEW_INVERTSELECTION 0x7022
109 #define FCIDM_SHVIEW_BIGICON 0x7029
110 #define FCIDM_SHVIEW_SMALLICON 0x702A
111 #define FCIDM_SHVIEW_LISTVIEW 0x702B
112 #define FCIDM_SHVIEW_REPORTVIEW 0x702C
113 /* 0x7030-0x703f are used by the shellbrowser */
114 #define FCIDM_SHVIEW_AUTOARRANGE 0x7031
115 #define FCIDM_SHVIEW_SNAPTOGRID 0x7032
117 #define FCIDM_SHVIEW_HELP 0x7041
118 #define FCIDM_SHVIEW_RENAME 0x7050
119 #define FCIDM_SHVIEW_CREATELINK 0x7051
120 #define FCIDM_SHVIEW_NEWLINK 0x7052
121 #define FCIDM_SHVIEW_NEWFOLDER 0x7053
123 #define FCIDM_SHVIEW_REFRESH 0x7100 /* FIXME */
124 #define FCIDM_SHVIEW_EXPLORE 0x7101 /* FIXME */
125 #define FCIDM_SHVIEW_OPEN 0x7102 /* FIXME */
127 #define FCIDM_SHVIEWLAST 0x7fff
128 #define FCIDM_BROWSERFIRST 0xA000
129 /* undocumented toolbar items from stddlg's*/
130 #define FCIDM_TB_UPFOLDER 0xA001
131 #define FCIDM_TB_NEWFOLDER 0xA002
132 #define FCIDM_TB_SMALLICON 0xA003
133 #define FCIDM_TB_REPORTVIEW 0xA004
134 #define FCIDM_TB_DESKTOP 0xA005 /* FIXME */
136 #define FCIDM_BROWSERLAST 0xbf00
137 #define FCIDM_GLOBALFIRST 0x8000
138 #define FCIDM_GLOBALLAST 0x9fff
141 * Global submenu IDs and separator IDs
143 #define FCIDM_MENU_FILE (FCIDM_GLOBALFIRST+0x0000)
144 #define FCIDM_MENU_EDIT (FCIDM_GLOBALFIRST+0x0040)
145 #define FCIDM_MENU_VIEW (FCIDM_GLOBALFIRST+0x0080)
146 #define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081)
147 #define FCIDM_MENU_TOOLS (FCIDM_GLOBALFIRST+0x00c0)
148 #define FCIDM_MENU_TOOLS_SEP_GOTO (FCIDM_GLOBALFIRST+0x00c1)
149 #define FCIDM_MENU_HELP (FCIDM_GLOBALFIRST+0x0100)
150 #define FCIDM_MENU_FIND (FCIDM_GLOBALFIRST+0x0140)
151 #define FCIDM_MENU_EXPLORE (FCIDM_GLOBALFIRST+0x0150)
152 #define FCIDM_MENU_FAVORITES (FCIDM_GLOBALFIRST+0x0170)
154 /* control IDs known to the view */
155 #define FCIDM_TOOLBAR (FCIDM_BROWSERFIRST + 0)
156 #define FCIDM_STATUS (FCIDM_BROWSERFIRST + 1)
159 /****************************************************************************
160 * IShellIcon interface
163 #define INTERFACE IShellIcon
164 #define IShellIcon_METHODS \
165 IUnknown_METHODS \
166 STDMETHOD(GetIconOf)(THIS_ LPCITEMIDLIST pidl, UINT flags, LPINT lpIconIndex) PURE;
167 ICOM_DEFINE(IShellIcon, IUnknown)
168 #undef INTERFACE
170 #ifdef COBJMACROS
171 /*** IUnknown methods ***/
172 #define IShellIcon_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
173 #define IShellIcon_AddRef(p) (p)->lpVtbl->AddRef(p)
174 #define IShellIcon_Release(p) (p)->lpVtbl->Release(p)
175 /*** IShellIcon methods ***/
176 #define IShellIcon_GetIconOf(p,a,b,c) (p)->lpVtbl->GetIconOf(p,a,b,c)
177 #endif
179 /****************************************************************************
180 * SHAddToRecentDocs API
182 #define SHARD_PIDL 0x00000001L
183 #define SHARD_PATHA 0x00000002L
184 #define SHARD_PATHW 0x00000003L
185 #define SHARD_PATH WINELIB_NAME_AW(SHARD_PATH)
187 DWORD WINAPI SHAddToRecentDocs(UINT uFlags, LPCVOID pv);
189 /****************************************************************************
190 * Shell Execute API
192 #define SE_ERR_FNF 2 /* file not found */
193 #define SE_ERR_PNF 3 /* path not found */
194 #define SE_ERR_ACCESSDENIED 5 /* access denied */
195 #define SE_ERR_OOM 8 /* out of memory */
196 #define SE_ERR_DLLNOTFOUND 32
197 #define SE_ERR_SHARE 26
198 #define SE_ERR_ASSOCINCOMPLETE 27
199 #define SE_ERR_DDETIMEOUT 28
200 #define SE_ERR_DDEFAIL 29
201 #define SE_ERR_DDEBUSY 30
202 #define SE_ERR_NOASSOC 31
204 #define SEE_MASK_CLASSNAME 0x00000001
205 #define SEE_MASK_CLASSKEY 0x00000003
206 #define SEE_MASK_IDLIST 0x00000004
207 #define SEE_MASK_INVOKEIDLIST 0x0000000c
208 #define SEE_MASK_ICON 0x00000010
209 #define SEE_MASK_HOTKEY 0x00000020
210 #define SEE_MASK_NOCLOSEPROCESS 0x00000040
211 #define SEE_MASK_CONNECTNETDRV 0x00000080
212 #define SEE_MASK_FLAG_DDEWAIT 0x00000100
213 #define SEE_MASK_DOENVSUBST 0x00000200
214 #define SEE_MASK_FLAG_NO_UI 0x00000400
215 #define SEE_MASK_UNICODE 0x00004000
216 #define SEE_MASK_NO_CONSOLE 0x00008000
217 #define SEE_MASK_ASYNCOK 0x00100000
218 #define SEE_MASK_HMONITOR 0x00200000
220 typedef struct _SHELLEXECUTEINFOA
221 { DWORD cbSize;
222 ULONG fMask;
223 HWND hwnd;
224 LPCSTR lpVerb;
225 LPCSTR lpFile;
226 LPCSTR lpParameters;
227 LPCSTR lpDirectory;
228 INT nShow;
229 HINSTANCE hInstApp;
230 /* Optional fields */
231 LPVOID lpIDList;
232 LPCSTR lpClass;
233 HKEY hkeyClass;
234 DWORD dwHotKey;
235 union
236 { HANDLE hIcon;
237 HANDLE hMonitor;
238 } DUMMYUNIONNAME;
239 HANDLE hProcess;
240 } SHELLEXECUTEINFOA, *LPSHELLEXECUTEINFOA;
242 typedef struct _SHELLEXECUTEINFOW
243 { DWORD cbSize;
244 ULONG fMask;
245 HWND hwnd;
246 LPCWSTR lpVerb;
247 LPCWSTR lpFile;
248 LPCWSTR lpParameters;
249 LPCWSTR lpDirectory;
250 INT nShow;
251 HINSTANCE hInstApp;
252 /* Optional fields*/
253 LPVOID lpIDList;
254 LPCWSTR lpClass;
255 HKEY hkeyClass;
256 DWORD dwHotKey;
257 union
258 { HANDLE hIcon;
259 HANDLE hMonitor;
260 } DUMMYUNIONNAME;
261 HANDLE hProcess;
262 } SHELLEXECUTEINFOW, *LPSHELLEXECUTEINFOW;
264 #define SHELLEXECUTEINFO WINELIB_NAME_AW(SHELLEXECUTEINFO)
265 #define LPSHELLEXECUTEINFO WINELIB_NAME_AW(LPSHELLEXECUTEINFO)
267 BOOL WINAPI ShellExecuteExA(LPSHELLEXECUTEINFOA lpExecInfo);
268 BOOL WINAPI ShellExecuteExW(LPSHELLEXECUTEINFOW lpExecInfo);
269 #define ShellExecuteEx WINELIB_NAME_AW(ShellExecuteEx)
271 void WINAPI WinExecErrorA(HWND hwnd,INT error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
272 void WINAPI WinExecErrorW(HWND hwnd,INT error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle);
273 #define WinExecError WINELIB_NAME_AW(WinExecError)
277 /****************************************************************************
278 * SHBrowseForFolder API
280 typedef INT (CALLBACK *BFFCALLBACK)(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData);
282 typedef struct tagBROWSEINFOA {
283 HWND hwndOwner;
284 LPCITEMIDLIST pidlRoot;
285 LPSTR pszDisplayName;
286 LPCSTR lpszTitle;
287 UINT ulFlags;
288 BFFCALLBACK lpfn;
289 LPARAM lParam;
290 INT iImage;
291 } BROWSEINFOA, *PBROWSEINFOA, *LPBROWSEINFOA;
293 typedef struct tagBROWSEINFOW {
294 HWND hwndOwner;
295 LPCITEMIDLIST pidlRoot;
296 LPWSTR pszDisplayName;
297 LPCWSTR lpszTitle;
298 UINT ulFlags;
299 BFFCALLBACK lpfn;
300 LPARAM lParam;
301 INT iImage;
302 } BROWSEINFOW, *PBROWSEINFOW, *LPBROWSEINFOW;
304 #define BROWSEINFO WINELIB_NAME_AW(BROWSEINFO)
305 #define PBROWSEINFO WINELIB_NAME_AW(PBROWSEINFO)
306 #define LPBROWSEINFO WINELIB_NAME_AW(LPBROWSEINFO)
308 /* Browsing for directory. */
309 #define BIF_RETURNONLYFSDIRS 0x0001
310 #define BIF_DONTGOBELOWDOMAIN 0x0002
311 #define BIF_STATUSTEXT 0x0004
312 #define BIF_RETURNFSANCESTORS 0x0008
313 #define BIF_EDITBOX 0x0010
314 #define BIF_VALIDATE 0x0020
315 #define BIF_NEWDIALOGSTYLE 0x0040
317 #define BIF_BROWSEFORCOMPUTER 0x1000
318 #define BIF_BROWSEFORPRINTER 0x2000
319 #define BIF_BROWSEINCLUDEFILES 0x4000
321 /* message from browser */
322 #define BFFM_INITIALIZED 1
323 #define BFFM_SELCHANGED 2
324 #define BFFM_VALIDATEFAILEDA 3 /* lParam:szPath ret:1(cont),0(EndDialog) */
325 #define BFFM_VALIDATEFAILEDW 4 /* lParam:wzPath ret:1(cont),0(EndDialog) */
327 /* messages to browser */
328 #define BFFM_SETSTATUSTEXTA (WM_USER+100)
329 #define BFFM_ENABLEOK (WM_USER+101)
330 #define BFFM_SETSELECTIONA (WM_USER+102)
331 #define BFFM_SETSELECTIONW (WM_USER+103)
332 #define BFFM_SETSTATUSTEXTW (WM_USER+104)
333 #define BFFM_SETOKTEXT (WM_USER+105)
334 #define BFFM_SETEXPANDED (WM_USER+106)
336 LPITEMIDLIST WINAPI SHBrowseForFolderA(LPBROWSEINFOA lpbi);
337 LPITEMIDLIST WINAPI SHBrowseForFolderW(LPBROWSEINFOW lpbi);
338 #define SHBrowseForFolder WINELIB_NAME_AW(SHBrowseForFolder)
339 #define BFFM_SETSTATUSTEXT WINELIB_NAME_AW(BFFM_SETSTATUSTEXT)
340 #define BFFM_SETSELECTION WINELIB_NAME_AW(BFFM_SETSELECTION)
341 #define BFFM_VALIDATEFAILED WINELIB_NAME_AW(BFFM_VALIDATEFAILED)
343 /****************************************************************************
344 * SHGetDataFromIDList API
346 #define SHGDFIL_FINDDATA 1
347 #define SHGDFIL_NETRESOURCE 2
348 #define SHGDFIL_DESCRIPTIONID 3
350 #define SHDID_ROOT_REGITEM 1
351 #define SHDID_FS_FILE 2
352 #define SHDID_FS_DIRECTORY 3
353 #define SHDID_FS_OTHER 4
354 #define SHDID_COMPUTER_DRIVE35 5
355 #define SHDID_COMPUTER_DRIVE525 6
356 #define SHDID_COMPUTER_REMOVABLE 7
357 #define SHDID_COMPUTER_FIXED 8
358 #define SHDID_COMPUTER_NETDRIVE 9
359 #define SHDID_COMPUTER_CDROM 10
360 #define SHDID_COMPUTER_RAMDISK 11
361 #define SHDID_COMPUTER_OTHER 12
362 #define SHDID_NET_DOMAIN 13
363 #define SHDID_NET_SERVER 14
364 #define SHDID_NET_SHARE 15
365 #define SHDID_NET_RESTOFNET 16
366 #define SHDID_NET_OTHER 17
367 #define SHDID_COMPUTER_IMAGING 18
368 #define SHDID_COMPUTER_AUDIO 19
369 #define SHDID_COMPUTER_SHAREDDOCS 20
371 typedef struct _SHDESCRIPTIONID
372 { DWORD dwDescriptionId;
373 CLSID clsid;
374 } SHDESCRIPTIONID, *LPSHDESCRIPTIONID;
376 HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID pv, int cb);
377 HRESULT WINAPI SHGetDataFromIDListW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID pv, int cb);
378 #define SHGetDataFromIDList WINELIB_NAME_AW(SHGetDataFromIDList)
380 BOOL WINAPI SHGetSpecialFolderPathA (HWND hwndOwner, LPSTR szPath, int nFolder, BOOL bCreate);
381 BOOL WINAPI SHGetSpecialFolderPathW (HWND hwndOwner, LPWSTR szPath, int nFolder, BOOL bCreate);
382 #define SHGetSpecialFolderPath WINELIB_NAME_AW(SHGetSpecialFolderPath)
384 /****************************************************************************
385 * shlview structures
389 * IShellFolderViewCallback Callback
390 * This "callback" is called by the shells default IShellView implementation (that
391 * we got using SHCreateShellViewEx()), to notify us of the various things that
392 * are happening to the shellview (and ask for things too).
394 * You don't have to support anything here - anything you don't want to
395 * handle, the shell will do itself if you just return E_NOTIMPL. This parameters
396 * that the shell passes to this function are entirely undocumented.
398 * HOWEVER, as the cabview sample as originally written used this callback, the
399 * writers implemented the callback mechanism on top of their own IShellView.
400 * Look there for some clues on what to do here.
403 typedef HRESULT (CALLBACK *SHELLVIEWPROC)(DWORD dwUserParam,LPSHELLFOLDER psf,
404 HWND hwnd,UINT uMsg,UINT wParam,LPARAM lParam);
406 /* NF valid values for the "viewmode" item of the SHELLTEMPLATE*/
407 #define NF_INHERITVIEW 0x0000
408 #define NF_LOCALVIEW 0x0001
410 typedef struct _SHELLVIEWDATA /* idl */
411 { DWORD dwSize;
412 LPSHELLFOLDER pShellFolder;
413 DWORD dwUserParam;
414 LPCITEMIDLIST pidl;
415 DWORD v3; /* always 0 */
416 SHELLVIEWPROC pCallBack;
417 DWORD viewmode; /* NF_* enum */
418 } SHELLVIEWDATA, * LPSHELLVIEWDATA;
420 HRESULT WINAPI SHGetMalloc(LPMALLOC *lpmal) ;
422 /**********************************************************************
423 * SHGetSetSettings ()
426 typedef struct
428 BOOL fShowAllObjects : 1;
429 BOOL fShowExtensions : 1;
430 BOOL fNoConfirmRecycle : 1;
432 BOOL fShowSysFiles : 1;
433 BOOL fShowCompColor : 1;
434 BOOL fDoubleClickInWebView : 1;
435 BOOL fDesktopHTML : 1;
436 BOOL fWin95Classic : 1;
437 BOOL fDontPrettyPath : 1;
438 BOOL fShowAttribCol : 1;
439 BOOL fMapNetDrvBtn : 1;
440 BOOL fShowInfoTip : 1;
441 BOOL fHideIcons : 1;
442 BOOL fWebView : 1;
443 BOOL fFilter : 1;
444 BOOL fShowSuperHidden : 1;
445 BOOL fNoNetCrawling : 1;
447 DWORD dwWin95Unused;
448 UINT uWin95Unused;
449 LONG lParamSort;
450 int iSortDirection;
451 UINT version;
452 UINT uNotUsed;
453 BOOL fSepProcess: 1;
454 BOOL fStartPanelOn: 1;
455 BOOL fShowStartPage: 1;
456 UINT fSpareFlags : 13;
457 } SHELLSTATE, *LPSHELLSTATE;
459 /**********************************************************************
460 * SHGetSettings ()
462 typedef struct
463 { BOOL fShowAllObjects : 1;
464 BOOL fShowExtensions : 1;
465 BOOL fNoConfirmRecycle : 1;
466 BOOL fShowSysFiles : 1;
468 BOOL fShowCompColor : 1;
469 BOOL fDoubleClickInWebView : 1;
470 BOOL fDesktopHTML : 1;
471 BOOL fWin95Classic : 1;
473 BOOL fDontPrettyPath : 1;
474 BOOL fShowAttribCol : 1;
475 BOOL fMapNetDrvBtn : 1;
476 BOOL fShowInfoTip : 1;
478 BOOL fHideIcons : 1;
479 UINT fRestFlags : 3;
480 } SHELLFLAGSTATE, * LPSHELLFLAGSTATE;
482 VOID WINAPI SHGetSettings(LPSHELLFLAGSTATE lpsfs, DWORD dwMask);
484 #define SSF_SHOWALLOBJECTS 0x0001
485 #define SSF_SHOWEXTENSIONS 0x0002
486 #define SSF_SHOWCOMPCOLOR 0x0008
487 #define SSF_SHOWSYSFILES 0x0020
488 #define SSF_DOUBLECLICKINWEBVIEW 0x0080
489 #define SSF_SHOWATTRIBCOL 0x0100
490 #define SSF_DESKTOPHTML 0x0200
491 #define SSF_WIN95CLASSIC 0x0400
492 #define SSF_DONTPRETTYPATH 0x0800
493 #define SSF_SHOWINFOTIP 0x2000
494 #define SSF_MAPNETDRVBUTTON 0x1000
495 #define SSF_NOCONFIRMRECYCLE 0x8000
496 #define SSF_HIDEICONS 0x4000
498 /****************************************************************************
499 * SHChangeNotify API
501 typedef struct _SHChangeNotifyEntry
503 LPCITEMIDLIST pidl;
504 BOOL fRecursive;
505 } SHChangeNotifyEntry;
507 #define SHCNE_RENAMEITEM 0x00000001
508 #define SHCNE_CREATE 0x00000002
509 #define SHCNE_DELETE 0x00000004
510 #define SHCNE_MKDIR 0x00000008
511 #define SHCNE_RMDIR 0x00000010
512 #define SHCNE_MEDIAINSERTED 0x00000020
513 #define SHCNE_MEDIAREMOVED 0x00000040
514 #define SHCNE_DRIVEREMOVED 0x00000080
515 #define SHCNE_DRIVEADD 0x00000100
516 #define SHCNE_NETSHARE 0x00000200
517 #define SHCNE_NETUNSHARE 0x00000400
518 #define SHCNE_ATTRIBUTES 0x00000800
519 #define SHCNE_UPDATEDIR 0x00001000
520 #define SHCNE_UPDATEITEM 0x00002000
521 #define SHCNE_SERVERDISCONNECT 0x00004000
522 #define SHCNE_UPDATEIMAGE 0x00008000
523 #define SHCNE_DRIVEADDGUI 0x00010000
524 #define SHCNE_RENAMEFOLDER 0x00020000
525 #define SHCNE_FREESPACE 0x00040000
527 #define SHCNE_EXTENDED_EVENT 0x04000000
528 #define SHCNE_ASSOCCHANGED 0x08000000
529 #define SHCNE_DISKEVENTS 0x0002381F
530 #define SHCNE_GLOBALEVENTS 0x0C0581E0
531 #define SHCNE_ALLEVENTS 0x7FFFFFFF
532 #define SHCNE_INTERRUPT 0x80000000
534 #define SHCNEE_ORDERCHANGED 0x0002L
535 #define SHCNEE_MSI_CHANGE 0x0004L
536 #define SHCNEE_MSI_UNINSTALL 0x0005L
538 #define SHCNF_IDLIST 0x0000
539 #define SHCNF_PATHA 0x0001
540 #define SHCNF_PRINTERA 0x0002
541 #define SHCNF_DWORD 0x0003
542 #define SHCNF_PATHW 0x0005
543 #define SHCNF_PRINTERW 0x0006
544 #define SHCNF_TYPE 0x00FF
545 #define SHCNF_FLUSH 0x1000
546 #define SHCNF_FLUSHNOWAIT 0x2000
548 #define SHCNF_PATH WINELIB_NAME_AW(SHCNF_PATH)
549 #define SHCNF_PRINTER WINELIB_NAME_AW(SHCNF_PRINTER)
551 void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2);
554 * IShellChangeNotify
556 typedef struct IShellChangeNotify IShellChangeNotify, *LPSHELLCHANGENOTIFY;
558 #define INTERFACE IShellChangeNotify
559 #define IShellChangeNotify_METHODS \
560 IUnknown_METHODS \
561 STDMETHOD(OnChange)(THIS_ LONG lEvent, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
563 ICOM_DEFINE(IShellChangeNotify, IUnknown)
564 #undef INTERFACE
566 #ifdef COBJMACROS
567 /*** IUnknown methods ***/
568 #define IShellChangeNotify_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
569 #define IShellChangeNotify_AddRef(p) (p)->lpVtbl->AddRef(p)
570 #define IShellChangeNotify_Release(p) (p)->lpVtbl->Release(p)
571 /*** IShellChangeNotify methods ***/
572 #define IShellChangeNotify_OnChange(p,a,b,c) (p)->lpVtbl->OnChange(p,a,b,c)
573 #endif
575 typedef struct _SHChangeDWORDAsIDList {
576 USHORT cb;
577 DWORD dwItem1;
578 DWORD dwItem2;
579 USHORT cbZero;
580 } SHChangeDWORDAsIDList, *LPSHChangeDWORDAsIDList;
582 typedef struct _SHChangeProductKeyAsIDList {
583 USHORT cb;
584 WCHAR wszProductKey[39];
585 USHORT cbZero;
586 } SHChangeProductKeyAsIDList, *LPSHChangeProductKeyAsIDList;
588 ULONG WINAPI SHChangeNotifyRegister(HWND hwnd, int fSources, LONG fEvents, UINT wMsg,
589 int cEntries, SHChangeNotifyEntry *pshcne);
590 BOOL WINAPI SHChangeNotifyDeregister(ULONG ulID);
591 HANDLE WINAPI SHChangeNotification_Lock(HANDLE hChangeNotification, DWORD dwProcessId,
592 LPITEMIDLIST **pppidl, LONG *plEvent);
593 BOOL WINAPI SHChangeNotification_Unlock(HANDLE hLock);
595 HRESULT WINAPI SHGetRealIDL(IShellFolder *psf, LPCITEMIDLIST pidlSimple, LPITEMIDLIST * ppidlReal);
597 /****************************************************************************
598 * SHCreateDirectory API
600 DWORD WINAPI SHCreateDirectory(HWND, LPCVOID);
601 DWORD WINAPI SHCreateDirectoryExA(HWND, LPCSTR, LPSECURITY_ATTRIBUTES);
602 DWORD WINAPI SHCreateDirectoryExW(HWND, LPCWSTR, LPSECURITY_ATTRIBUTES);
604 /****************************************************************************
605 * SHGetSpecialFolderLocation API
607 HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, int nFolder, LPITEMIDLIST * ppidl);
608 HRESULT WINAPI SHGetFolderLocation(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwReserved, LPITEMIDLIST *ppidl);
610 #define CSIDL_DESKTOP 0x0000
611 #define CSIDL_INTERNET 0x0001
612 #define CSIDL_PROGRAMS 0x0002
613 #define CSIDL_CONTROLS 0x0003
614 #define CSIDL_PRINTERS 0x0004
615 #define CSIDL_PERSONAL 0x0005
616 #define CSIDL_FAVORITES 0x0006
617 #define CSIDL_STARTUP 0x0007
618 #define CSIDL_RECENT 0x0008
619 #define CSIDL_SENDTO 0x0009
620 #define CSIDL_BITBUCKET 0x000a
621 #define CSIDL_STARTMENU 0x000b
622 #define CSIDL_MYDOCUMENTS 0x000c
623 #define CSIDL_MYMUSIC 0x000d
624 #define CSIDL_MYVIDEO 0x000e
625 #define CSIDL_DESKTOPDIRECTORY 0x0010
626 #define CSIDL_DRIVES 0x0011
627 #define CSIDL_NETWORK 0x0012
628 #define CSIDL_NETHOOD 0x0013
629 #define CSIDL_FONTS 0x0014
630 #define CSIDL_TEMPLATES 0x0015
631 #define CSIDL_COMMON_STARTMENU 0x0016
632 #define CSIDL_COMMON_PROGRAMS 0X0017
633 #define CSIDL_COMMON_STARTUP 0x0018
634 #define CSIDL_COMMON_DESKTOPDIRECTORY 0x0019
635 #define CSIDL_APPDATA 0x001a
636 #define CSIDL_PRINTHOOD 0x001b
637 #define CSIDL_LOCAL_APPDATA 0x001c
638 #define CSIDL_ALTSTARTUP 0x001d
639 #define CSIDL_COMMON_ALTSTARTUP 0x001e
640 #define CSIDL_COMMON_FAVORITES 0x001f
641 #define CSIDL_INTERNET_CACHE 0x0020
642 #define CSIDL_COOKIES 0x0021
643 #define CSIDL_HISTORY 0x0022
644 #define CSIDL_COMMON_APPDATA 0x0023
645 #define CSIDL_WINDOWS 0x0024
646 #define CSIDL_SYSTEM 0x0025
647 #define CSIDL_PROGRAM_FILES 0x0026
648 #define CSIDL_MYPICTURES 0x0027
649 #define CSIDL_PROFILE 0x0028
650 #define CSIDL_SYSTEMX86 0x0029
651 #define CSIDL_PROGRAM_FILESX86 0x002a
652 #define CSIDL_PROGRAM_FILES_COMMON 0x002b
653 #define CSIDL_PROGRAM_FILES_COMMONX86 0x002c
654 #define CSIDL_COMMON_TEMPLATES 0x002d
655 #define CSIDL_COMMON_DOCUMENTS 0x002e
656 #define CSIDL_COMMON_ADMINTOOLS 0x002f
657 #define CSIDL_ADMINTOOLS 0x0030
658 #define CSIDL_CONNECTIONS 0x0031
659 #define CSIDL_COMMON_MUSIC 0x0035
660 #define CSIDL_COMMON_PICTURES 0x0036
661 #define CSIDL_COMMON_VIDEO 0x0037
662 #define CSIDL_RESOURCES 0x0038
663 #define CSIDL_RESOURCES_LOCALIZED 0x0039
664 #define CSIDL_COMMON_OEM_LINKS 0x003a
665 #define CSIDL_CDBURN_AREA 0x003b
666 #define CSIDL_COMPUTERSNEARME 0x003d
667 #define CSIDL_PROFILES 0x003e
668 #define CSIDL_FOLDER_MASK 0x00ff
669 #define CSIDL_FLAG_PER_USER_INIT 0x0800
670 #define CSIDL_FLAG_NO_ALIAS 0x1000
671 #define CSIDL_FLAG_DONT_VERIFY 0x4000
672 #define CSIDL_FLAG_CREATE 0x8000
674 #define CSIDL_FLAG_MASK 0xff00
676 /****************************************************************************
677 * SHGetDesktopFolder API
679 DWORD WINAPI SHGetDesktopFolder(IShellFolder * *);
681 /****************************************************************************
682 * SHBindToParent API
684 HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCITEMIDLIST *ppidlLast);
686 /****************************************************************************
687 * SHDefExtractIcon API
689 HRESULT WINAPI SHDefExtractIconA(LPCSTR pszIconFile, int iIndex, UINT uFlags,
690 HICON* phiconLarge, HICON* phiconSmall, UINT nIconSize);
691 HRESULT WINAPI SHDefExtractIconW(LPCWSTR pszIconFile, int iIndex, UINT uFlags,
692 HICON* phiconLarge, HICON* phiconSmall, UINT nIconSize);
693 #define SHDefExtractIcon WINELIB_NAME_AW(SHDefExtractIcon)
696 * DROPFILES for CF_HDROP and CF_PRINTERS
698 typedef struct _DROPFILES
700 DWORD pFiles;
701 POINT pt;
702 BOOL fNC;
703 BOOL fWide;
704 } DROPFILES, *LPDROPFILES;
706 #include <poppack.h>
708 /*****************************************************************************
709 * IFileSystemBindData interface
711 #ifndef __IFileSystemBindData_FWD_DEFINED__
712 #define __IFileSystemBindData_FWD_DEFINED__
713 typedef struct IFileSystemBindData IFileSystemBindData;
714 #endif
716 typedef IFileSystemBindData *LPFILESYSTEMBINDDATA;
718 #ifndef __IFileSystemBindData_INTERFACE_DEFINED__
719 #define __IFileSystemBindData_INTERFACE_DEFINED__
721 DEFINE_GUID(IID_IFileSystemBindData, 0x01e18d10, 0x4d8b, 0x11d2, 0x85,0x5d, 0x00,0x60,0x08,0x05,0x93,0x67);
722 #if defined(__cplusplus) && !defined(CINTERFACE)
723 struct IFileSystemBindData : public IUnknown
725 virtual HRESULT STDMETHODCALLTYPE GetFindData(
726 WIN32_FIND_DATAW* pfd) = 0;
728 virtual HRESULT STDMETHODCALLTYPE SetFindData(
729 const WIN32_FIND_DATAW* pfd) = 0;
732 #else
733 typedef struct IFileSystemBindDataVtbl IFileSystemBindDataVtbl;
734 struct IFileSystemBindData {
735 const IFileSystemBindDataVtbl* lpVtbl;
737 struct IFileSystemBindDataVtbl {
738 ICOM_MSVTABLE_COMPAT_FIELDS
740 /*** IUnknown methods ***/
741 HRESULT (STDMETHODCALLTYPE *QueryInterface)(
742 IFileSystemBindData* This,
743 REFIID riid,
744 void** ppvObject);
746 ULONG (STDMETHODCALLTYPE *AddRef)(
747 IFileSystemBindData* This);
749 ULONG (STDMETHODCALLTYPE *Release)(
750 IFileSystemBindData* This);
752 /*** IFileSystemBindData methods ***/
753 HRESULT (STDMETHODCALLTYPE *GetFindData)(
754 IFileSystemBindData* This,
755 WIN32_FIND_DATAW* pfd);
757 HRESULT (STDMETHODCALLTYPE *SetFindData)(
758 IFileSystemBindData* This,
759 const WIN32_FIND_DATAW* pfd);
763 /*** IUnknown methods ***/
764 #define IFileSystemBindData_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
765 #define IFileSystemBindData_AddRef(p) (p)->lpVtbl->AddRef(p)
766 #define IFileSystemBindData_Release(p) (p)->lpVtbl->Release(p)
767 /*** IFileSystemBindData methods ***/
768 #define IFileSystemBindData_GetFindData(p,a) (p)->lpVtbl->GetFindData(p,a)
769 #define IFileSystemBindData_SetFindData(p,a) (p)->lpVtbl->SetFindData(p,a)
771 #endif
773 #define IFileSystemBindData_METHODS \
774 ICOM_MSVTABLE_COMPAT_FIELDS \
775 /*** IUnknown methods ***/ \
776 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
777 STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
778 STDMETHOD_(ULONG,Release)(THIS) PURE; \
779 /*** IFileSystemBindData methods ***/ \
780 STDMETHOD_(HRESULT,GetFindData)(THIS_ WIN32_FIND_DATAW* pfd) PURE; \
781 STDMETHOD_(HRESULT,SetFindData)(THIS_ const WIN32_FIND_DATAW* pfd) PURE;
783 #endif /* __IFileSystemBindData_INTERFACE_DEFINED__ */
786 #ifdef __cplusplus
787 } /* extern "C" */
788 #endif /* defined(__cplusplus) */
790 #endif /* __WINE_SHLOBJ_H */