xref: /reactos/sdk/include/reactos/undocshell.h (revision dad3a093)
1 /*
2  * Copyright 1999, 2000 Juergen Schmied
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_UNDOCSHELL_H
20 #define __WINE_UNDOCSHELL_H
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif /* defined(__cplusplus) */
25 
26 #if (NTDDI_VERSION < NTDDI_LONGHORN)
27 #define DBIMF_NOGRIPPER         0x0800
28 #define DBIMF_ALWAYSGRIPPER     0x1000
29 #define DBIMF_NOMARGINS         0x2000
30 #endif  // NTDDI_LONGHORN
31 
32 #if defined (_SHELLAPI_H) || defined (_INC_SHELLAPI)
33 
34 /****************************************************************************
35  * Taskbar interface WM_COPYDATA structures
36  * See http://www.geoffchappell.com/studies/windows/shell/shell32/api/shlnot/copydata.htm
37  */
38 /* Data structure for Shell_NotifyIcon messages */
39 typedef struct _TRAYNOTIFYDATAW
40 {
41     DWORD dwSignature;
42     DWORD dwMessage;
43     NOTIFYICONDATAW nid; // Always use the latest NOTIFYICONDATAW structure version.
44 } TRAYNOTIFYDATAW, *PTRAYNOTIFYDATAW;
45 // Note: One could also introduce TRAYNOTIFYDATAA
46 
47 #define NI_NOTIFY_SIG 0x34753423 /* TRAYNOTIFYDATA */
48 
49 #endif /* defined (_SHELLAPI_H) || defined (_INC_SHELLAPI) */
50 
51 /****************************************************************************
52  * Taskbar WM_COMMAND identifiers
53  */
54 #define TWM_DOEXITWINDOWS (WM_USER + 342)
55 #define TWM_CYCLEFOCUS (WM_USER + 348)
56 
57 /****************************************************************************
58  * ProgMan messages
59  */
60 #define WM_PROGMAN_OPENSHELLSETTINGS (WM_USER + 22) /* wParam specifies the dialog (and tab page) */
61 #define WM_PROGMAN_SAVESTATE         (WM_USER + 77)
62 
63 /****************************************************************************
64  *  IDList Functions
65  */
66 BOOL WINAPI ILGetDisplayName(
67     LPCITEMIDLIST pidl,
68     LPVOID path);
69 
70 /* type parameter for ILGetDisplayNameEx() */
71 #define ILGDN_FORPARSING  0
72 #define ILGDN_NORMAL      1
73 #define ILGDN_INFOLDER    2
74 
75 BOOL WINAPI ILGetDisplayNameEx(
76     LPSHELLFOLDER psf,
77     LPCITEMIDLIST pidl,
78     LPVOID path,
79     DWORD type);
80 
81 LPITEMIDLIST WINAPI ILGlobalClone(LPCITEMIDLIST pidl);
82 void WINAPI ILGlobalFree(LPITEMIDLIST pidl);
83 LPITEMIDLIST WINAPI SHSimpleIDListFromPathA (LPCSTR lpszPath); //FIXME
84 LPITEMIDLIST WINAPI SHSimpleIDListFromPathW (LPCWSTR lpszPath);
85 
86 HRESULT WINAPI SHILCreateFromPathA (
87     LPCSTR path,
88     LPITEMIDLIST * ppidl,
89     DWORD *attributes);
90 
91 HRESULT WINAPI SHILCreateFromPathW (
92     LPCWSTR path,
93     LPITEMIDLIST * ppidl,
94     DWORD *attributes);
95 
96 HRESULT WINAPI SHInvokeCommand(
97     HWND hWnd,
98     IShellFolder* lpFolder,
99     LPCITEMIDLIST lpApidl,
100     LPCSTR lpVerb);
101 HRESULT WINAPI SHInvokeCommandOnContextMenu(
102     _In_opt_ HWND hWnd,
103     _In_opt_ IUnknown* pUnk,
104     _In_ IContextMenu* pCM,
105     _In_ UINT fCMIC,
106     _In_opt_ LPCSTR pszVerb);
107 BOOL WINAPI IContextMenu_Invoke(
108     _In_ IContextMenu *pContextMenu,
109     _In_ HWND hwnd,
110     _In_ LPCSTR lpVerb,
111     _In_ UINT uFlags);
112 
113 /*
114     string functions
115 */
116 BOOL WINAPI StrRetToStrNA(LPSTR,DWORD,LPSTRRET,const ITEMIDLIST*);
117 BOOL WINAPI StrRetToStrNW(LPWSTR,DWORD,LPSTRRET,const ITEMIDLIST*);
118 
119 /****************************************************************************
120  * SHChangeNotifyRegister API
121  */
122 #define SHCNRF_InterruptLevel       0x0001
123 #define SHCNRF_ShellLevel           0x0002
124 #define SHCNRF_RecursiveInterrupt   0x1000  /* Must be combined with SHCNRF_InterruptLevel */
125 #define SHCNRF_NewDelivery          0x8000  /* Messages use shared memory */
126 
127 /****************************************************************************
128  * SHChangeNotify
129  */
130 
131 typedef struct _SHCNF_PRINTJOB_INFO
132 {
133     DWORD JobId;
134     // More info,,,
135 } SHCNF_PRINTJOB_INFO, *PSHCNF_PRINTJOB_INFO;
136 
137 //
138 // Add missing types for print job notifications.
139 //
140 #define SHCNF_PRINTJOBA 0x0004
141 #define SHCNF_PRINTJOBW 0x0007
142 
143 HRESULT WINAPI SHUpdateRecycleBinIcon(void);
144 
145 /****************************************************************************
146  * Shell Common Dialogs
147  */
148 
149 /* RunFileDlg flags */
150 #define RFF_NOBROWSE        0x01    /* Removes the browse button */
151 #define RFF_NODEFAULT       0x02    /* No default item selected */
152 #define RFF_CALCDIRECTORY   0x04    /* Calculates the working directory from the file name */
153 #define RFF_NOLABEL         0x08    /* Removes the edit box label */
154 #define RFF_NOSEPARATEMEM   0x20    /* Removes the Separate Memory Space check box (Windows NT only) */
155 
156 /* RunFileFlg notification value and structure */
157 #define RFN_VALIDATE    (-510)
158 #if 0 // Deprecated ANSI structure
159 typedef struct _NMRUNFILEDLGA
160 {
161     NMHDR   hdr;
162     LPCSTR  lpFile;
163     LPCSTR  lpDirectory;
164     UINT    nShow;
165 } NMRUNFILEDLGA, *PNMRUNFILEDLGA, *LPNMRUNFILEDLGA;
166 #endif
167 typedef struct _NMRUNFILEDLGW
168 {
169     NMHDR   hdr;
170     LPCWSTR lpFile;
171     LPCWSTR lpDirectory;
172     UINT    nShow;
173 } NMRUNFILEDLGW, *PNMRUNFILEDLGW, *LPNMRUNFILEDLGW;
174 
175 typedef NMRUNFILEDLGW NMRUNFILEDLG;
176 typedef PNMRUNFILEDLGW PNMRUNFILEDLG;
177 typedef LPNMRUNFILEDLGW LPNMRUNFILEDLG;
178 
179 /* RunFileDlg notification return values */
180 #define RF_OK      0x00
181 #define RF_CANCEL  0x01
182 #define RF_RETRY   0x02
183 
184 void WINAPI RunFileDlg(
185     HWND hWndOwner,
186     HICON hIcon,
187     LPCWSTR lpstrDirectory,
188     LPCWSTR lpstrTitle,
189     LPCWSTR lpstrDescription,
190     UINT uFlags);
191 
192 int WINAPI LogoffWindowsDialog(HWND hWndOwner);
193 void WINAPI ExitWindowsDialog(HWND hWndOwner);
194 
195 BOOL WINAPI SHFindComputer(
196     LPCITEMIDLIST pidlRoot,
197     LPCITEMIDLIST pidlSavedSearch);
198 
199 void WINAPI SHHandleDiskFull(HWND hwndOwner,
200     UINT uDrive);
201 
202 int  WINAPI SHOutOfMemoryMessageBox(
203     HWND hwndOwner,
204     LPCSTR lpCaption,
205     UINT uType);
206 
207 HRESULT WINAPI SHShouldShowWizards(_In_ IUnknown *pUnknown);
208 
209 DWORD WINAPI SHNetConnectionDialog(
210     HWND hwndOwner,
211     LPCWSTR lpstrRemoteName,
212     DWORD dwType);
213 
214 BOOL WINAPI SHIsTempDisplayMode(VOID);
215 
216 HRESULT WINAPI
217 SHGetUserDisplayName(
218     _Out_writes_to_(*puSize, *puSize) PWSTR pName,
219     _Inout_ PULONG puSize);
220 
221 /****************************************************************************
222  * Cabinet Window Messages
223  */
224 
225 #define CWM_SETPATH           (WM_USER + 2)
226 #define CWM_WANTIDLE          (WM_USER + 3)
227 #define CWM_GETSETCURRENTINFO (WM_USER + 4)
228 #define CWM_SELECTITEM        (WM_USER + 5)
229 #define CWM_SELECTITEMSTR     (WM_USER + 6)
230 #define CWM_GETISHELLBROWSER  (WM_USER + 7)
231 #define CWM_TESTPATH          (WM_USER + 9)
232 #define CWM_STATECHANGE       (WM_USER + 10)
233 #define CWM_GETPATH           (WM_USER + 12)
234 
235 #define WM_GETISHELLBROWSER CWM_GETISHELLBROWSER
236 
237 /* CWM_TESTPATH types */
238 #define CWTP_ISEQUAL  0
239 #define CWTP_ISCHILD  1
240 
241 /* CWM_TESTPATH structure */
242 typedef struct
243 {
244     DWORD dwType;
245     ITEMIDLIST idl;
246 } CWTESTPATHSTRUCT,* LPCWTESTPATHSTRUCT;
247 
248 /****************************************************************************
249  * System Imagelist Routines
250  */
251 
252 int WINAPI Shell_GetCachedImageIndexA(
253     LPCSTR lpszFileName,
254     int nIconIndex,
255     UINT bSimulateDoc);
256 
257 BOOL WINAPI Shell_GetImageLists(
258     HIMAGELIST *lphimlLarge,
259     HIMAGELIST *lphimlSmall);
260 
261 HICON WINAPI SHGetFileIcon(
262     DWORD dwReserved,
263     LPCSTR lpszPath,
264     DWORD dwFileAttributes,
265     UINT uFlags);
266 
267 BOOL WINAPI FileIconInit(BOOL bFullInit);
268 
269 WORD WINAPI
270 ExtractIconResInfoA(
271     _In_ HANDLE hHandle,
272     _In_ LPCSTR lpFileName,
273     _In_ WORD wIndex,
274     _Out_ LPWORD lpSize,
275     _Out_ LPHANDLE lpIcon);
276 
277 WORD WINAPI
278 ExtractIconResInfoW(
279     _In_ HANDLE hHandle,
280     _In_ LPCWSTR lpFileName,
281     _In_ WORD wIndex,
282     _Out_ LPWORD lpSize,
283     _Out_ LPHANDLE lpIcon);
284 
285 /****************************************************************************
286  * File Menu Routines
287  */
288 
289 /* FileMenu_Create nSelHeight constants */
290 #define FM_DEFAULT_SELHEIGHT  -1
291 #define FM_FULL_SELHEIGHT     0
292 
293 /* FileMenu_Create flags */
294 #define FMF_SMALL_ICONS      0x00
295 #define FMF_LARGE_ICONS      0x08
296 #define FMF_NO_COLUMN_BREAK  0x10
297 
298 HMENU WINAPI FileMenu_Create(
299     COLORREF crBorderColor,
300     int nBorderWidth,
301     HBITMAP hBorderBmp,
302     int nSelHeight,
303     UINT uFlags);
304 
305 void WINAPI FileMenu_Destroy(HMENU hMenu);
306 
307 /* FileMenu_AppendItem constants */
308 #define FM_SEPARATOR       (LPCSTR)1
309 #define FM_BLANK_ICON      -1
310 #define FM_DEFAULT_HEIGHT  0
311 
312 BOOL WINAPI FileMenu_AppendItem(
313     HMENU hMenu,
314     LPCSTR lpszText,
315     UINT uID,
316     int iIcon,
317     HMENU hMenuPopup,
318     int nItemHeight);
319 
320 /* FileMenu_InsertUsingPidl flags */
321 #define FMF_NO_EMPTY_ITEM      0x01
322 #define FMF_NO_PROGRAM_GROUPS  0x04
323 
324 /* FileMenu_InsertUsingPidl callback function */
325 typedef void (CALLBACK *LPFNFMCALLBACK)(LPCITEMIDLIST pidlFolder, LPCITEMIDLIST pidlFile);
326 
327 int WINAPI FileMenu_InsertUsingPidl(
328     HMENU hMenu,
329     UINT uID,
330     LPCITEMIDLIST pidl,
331     UINT uFlags,
332     UINT uEnumFlags,
333     LPFNFMCALLBACK lpfnCallback);
334 
335 int WINAPI FileMenu_ReplaceUsingPidl(
336     HMENU hMenu,
337     UINT uID,
338     LPCITEMIDLIST pidl,
339     UINT uEnumFlags,
340     LPFNFMCALLBACK lpfnCallback);
341 
342 void WINAPI FileMenu_Invalidate(HMENU hMenu);
343 
344 HMENU WINAPI FileMenu_FindSubMenuByPidl(
345     HMENU hMenu,
346     LPCITEMIDLIST pidl);
347 
348 BOOL WINAPI FileMenu_TrackPopupMenuEx(
349     HMENU hMenu,
350     UINT uFlags,
351     int x,
352     int y,
353     HWND hWnd,
354     LPTPMPARAMS lptpm);
355 
356 BOOL WINAPI FileMenu_GetLastSelectedItemPidls(
357     UINT uReserved,
358     LPCITEMIDLIST *ppidlFolder,
359     LPCITEMIDLIST *ppidlItem);
360 
361 LRESULT WINAPI FileMenu_MeasureItem(
362     HWND hWnd,
363     LPMEASUREITEMSTRUCT lpmis);
364 
365 LRESULT WINAPI FileMenu_DrawItem(
366     HWND hWnd,
367     LPDRAWITEMSTRUCT lpdis);
368 
369 BOOL WINAPI FileMenu_InitMenuPopup(HMENU hMenu);
370 
371 void WINAPI FileMenu_AbortInitMenu(void);
372 
373 LRESULT WINAPI FileMenu_HandleMenuChar(
374     HMENU hMenu,
375     WPARAM wParam);
376 
377 BOOL WINAPI FileMenu_DeleteAllItems(HMENU hMenu);
378 
379 BOOL WINAPI FileMenu_DeleteItemByCmd(
380     HMENU hMenu,
381     UINT uID);
382 
383 BOOL WINAPI FileMenu_DeleteItemByIndex(
384     HMENU hMenu,
385     UINT uPos);
386 
387 BOOL WINAPI FileMenu_DeleteMenuItemByFirstID(
388     HMENU hMenu,
389     UINT uID);
390 
391 BOOL WINAPI FileMenu_DeleteSeparator(HMENU hMenu);
392 
393 BOOL WINAPI FileMenu_EnableItemByCmd(
394     HMENU hMenu,
395     UINT uID,
396     BOOL bEnable);
397 
398 DWORD WINAPI FileMenu_GetItemExtent(
399     HMENU hMenu,
400     UINT uPos);
401 
402 int WINAPI FileMenu_AppendFilesForPidl(
403     HMENU hMenu,
404     LPCITEMIDLIST pidl,
405     BOOL bAddSeparator);
406 
407 int WINAPI FileMenu_AddFilesForPidl(
408     HMENU hMenu,
409     UINT uReserved,
410     UINT uID,
411     LPCITEMIDLIST pidl,
412     UINT uFlags,
413     UINT uEnumFlags,
414     LPFNFMCALLBACK lpfnCallback);
415 
416 /****************************************************************************
417  * Drag And Drop Routines
418  */
419 
420 HRESULT WINAPI SHRegisterDragDrop(
421     HWND hWnd,
422     LPDROPTARGET lpDropTarget);
423 
424 HRESULT WINAPI SHRevokeDragDrop(HWND hWnd);
425 
426 BOOL WINAPI DAD_DragEnter(HWND hWnd);
427 
428 BOOL WINAPI DAD_SetDragImageFromListView(
429     HWND hWnd,
430     POINT pt);
431 
432 BOOL WINAPI DAD_ShowDragImage(BOOL bShow);
433 
434 /****************************************************************************
435  * Path Manipulation Routines
436  */
437 
438 BOOL WINAPI PathAppendAW(LPVOID lpszPath1, LPCVOID lpszPath2);
439 
440 LPVOID WINAPI PathCombineAW(LPVOID szDest, LPCVOID lpszDir, LPCVOID lpszFile);
441 
442 LPVOID  WINAPI PathAddBackslashAW(LPVOID path);
443 
444 LPVOID WINAPI PathBuildRootAW(LPVOID lpszPath, int drive);
445 
446 LPVOID WINAPI PathFindExtensionAW(LPCVOID path);
447 
448 LPVOID WINAPI PathFindFileNameAW(LPCVOID path);
449 
450 LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath,  DWORD void1, DWORD void2);
451 
452 LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath);
453 
454 BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath);
455 
456 void WINAPI PathRemoveBlanksAW(LPVOID lpszPath);
457 
458 VOID  WINAPI PathQuoteSpacesAW(LPVOID path);
459 
460 void WINAPI PathUnquoteSpacesAW(LPVOID lpszPath);
461 
462 BOOL WINAPI PathIsUNCAW(LPCVOID lpszPath);
463 
464 BOOL WINAPI PathIsRelativeAW(LPCVOID lpszPath);
465 
466 BOOL WINAPI PathIsRootAW(LPCVOID x);
467 
468 BOOL WINAPI PathIsExeAW(LPCVOID lpszPath);
469 
470 BOOL WINAPI PathIsDirectoryAW(LPCVOID lpszPath);
471 
472 BOOL WINAPI PathFileExistsAW(LPCVOID lpszPath);
473 
474 BOOL WINAPI PathMatchSpecAW(LPVOID lpszPath, LPVOID lpszSpec);
475 
476 BOOL WINAPI PathMakeUniqueNameAW(
477     LPVOID lpszBuffer,
478     DWORD dwBuffSize,
479     LPCVOID lpszShortName,
480     LPCVOID lpszLongName,
481     LPCVOID lpszPathName);
482 
483 BOOL WINAPI PathYetAnotherMakeUniqueName(
484     LPWSTR lpszBuffer,
485     LPCWSTR lpszPathName,
486     LPCWSTR lpszShortName,
487     LPCWSTR lpszLongName);
488 
489 VOID WINAPI PathQualifyA(LPSTR pszPath);
490 VOID WINAPI PathQualifyW(LPWSTR pszPath);
491 VOID WINAPI PathQualifyAW(LPVOID path);
492 
493 /* PathResolve flags */
494 #define PRF_CHECKEXISTANCE  0x01
495 #define PRF_EXECUTABLE      0x02
496 #define PRF_QUALIFYONPATH   0x04
497 #define PRF_WINDOWS31       0x08
498 
499 BOOL WINAPI PathResolveA(LPSTR path, LPCSTR *dirs, DWORD flags);
500 BOOL WINAPI PathResolveW(LPWSTR path, LPCWSTR *dirs, DWORD flags);
501 BOOL WINAPI PathResolveAW(LPVOID lpszPath, LPCVOID *alpszPaths, DWORD dwFlags);
502 
503 VOID WINAPI PathSetDlgItemPathAW(HWND hDlg, int nIDDlgItem, LPCVOID lpszPath);
504 
505 /* PathProcessCommand flags */
506 #define PPCF_QUOTEPATH        0x01 /* implies PPCF_INCLUDEARGS */
507 #define PPCF_INCLUDEARGS      0x02
508 //#define PPCF_NODIRECTORIES    0x10 move to shlobj
509 #define PPCF_DONTRESOLVE      0x20
510 #define PPCF_PATHISRELATIVE   0x40
511 
512 HRESULT WINAPI PathProcessCommandAW(LPCVOID lpszPath, LPVOID lpszBuff,
513                                     DWORD dwBuffSize, DWORD dwFlags);
514 
515 void WINAPI PathStripPathAW(LPVOID lpszPath);
516 
517 BOOL WINAPI PathStripToRootAW(LPVOID lpszPath);
518 
519 void WINAPI PathRemoveArgsAW(LPVOID lpszPath);
520 
521 void WINAPI PathRemoveExtensionAW(LPVOID lpszPath);
522 
523 int WINAPI PathParseIconLocationAW(LPVOID lpszPath);
524 
525 BOOL WINAPI PathIsSameRootAW(LPCVOID lpszPath1, LPCVOID lpszPath2);
526 
527 BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID *sOtherDirs);
528 
529 BOOL WINAPI PathIsEqualOrSubFolder(_In_ LPCWSTR pszFile1OrCSIDL, _In_ LPCWSTR pszFile2);
530 
531 BOOL WINAPI PathIsTemporaryA(_In_ LPCSTR Str);
532 BOOL WINAPI PathIsTemporaryW(_In_ LPCWSTR Str);
533 
534 /****************************************************************************
535  * Shell File Operations error codes - SHFileOperationA/W
536  */
537 
538 /* Error codes could be pre-Win32 */
539 #define DE_SAMEFILE         0x71
540 #define DE_MANYSRC1DEST     0x72
541 #define DE_DIFFDIR          0x73
542 #define DE_ROOTDIR          0x74
543 #define DE_OPCANCELLED      0x75
544 #define DE_DESTSUBTREE      0x76
545 #define DE_ACCESSDENIEDSRC  0x78
546 #define DE_PATHTOODEEP      0x79
547 #define DE_MANYDEST         0x7A
548 #define DE_INVALIDFILES     0x7C
549 #define DE_DESTSAMETREE     0x7D
550 #define DE_FLDDESTISFILE    0x7E
551 #define DE_FILEDESTISFLD    0x80
552 #define DE_FILENAMETOOLONG  0x81
553 #define DE_DEST_IS_CDROM    0x82
554 #define DE_DEST_IS_DVD      0x83
555 #define DE_DEST_IS_CDRECORD 0x84
556 #define DE_FILE_TOO_LARGE   0x85
557 #define DE_SRC_IS_CDROM     0x86
558 #define DE_SRC_IS_DVD       0x87
559 #define DE_SRC_IS_CDRECORD  0x88
560 // #define DE_ERROR_MAX
561 #define ERRORONDEST         0x10000
562 
563 /****************************************************************************
564  * Shell settings
565  */
566 
567 typedef struct _REGSHELLSTATE
568 {
569     DWORD dwSize;
570     SHELLSTATE ss;
571 } REGSHELLSTATE, *PREGSHELLSTATE;
572 #define REGSHELLSTATE_SIZE 0x24
573 #define REGSHELLSTATE_VERSION 0xD
574 C_ASSERT(sizeof(REGSHELLSTATE) == REGSHELLSTATE_SIZE);
575 
576 /****************************************************************************
577  * Shell Namespace Routines
578  */
579 
580 /* Generic structure used by several messages */
581 typedef struct
582 {
583   DWORD          dwReserved;
584   DWORD          dwReserved2;
585   LPCITEMIDLIST  pidl;
586   LPDWORD        lpdwUser;
587 } SFVCBINFO, * LPSFVCBINFO;
588 typedef const SFVCBINFO * LPCSFVCBINFO;
589 
590 /* SFVCB_SELECTIONCHANGED structure */
591 typedef struct
592 {
593   UINT           uOldState;
594   UINT           uNewState;
595   LPCITEMIDLIST  pidl;
596   LPDWORD        lpdwUser;
597 } SFVSELECTSTATE, * LPSFVSELECTSTATE;
598 typedef const SFVSELECTSTATE * LPCSFVSELECTSTATE;
599 
600 /* SFVCB_COPYHOOKCALLBACK structure */
601 typedef struct
602 {
603   HWND    hwnd;
604   UINT    wFunc;
605   UINT    wFlags;
606   LPCSTR  pszSrcFile;
607   DWORD   dwSrcAttribs;
608   LPCSTR  pszDestFile;
609   DWORD   dwDestAttribs;
610 } SFVCOPYHOOKINFO, * LPSFVCOPYHOOKINFO;
611 typedef const SFVCOPYHOOKINFO * LPCSFVCOPYHOOKINFO;
612 
613 /* SFVCB_GETDETAILSOF structure */
614 typedef struct
615 {
616   LPCITEMIDLIST  pidl;
617   int            fmt;
618   int            cx;
619   STRRET         lpText;
620 } SFVCOLUMNINFO, * LPSFVCOLUMNINFO;
621 
622 /****************************************************************************
623  * Misc Stuff
624  */
625 
626 BOOL WINAPI
627 RegenerateUserEnvironment(LPVOID *lpEnvironment, BOOL bUpdateSelf);
628 
629 /* SHWaitForFileToOpen flags */
630 #define SHWFF_ADD     0x01
631 #define SHWFF_REMOVE  0x02
632 #define SHWFF_WAIT    0x04
633 
634 BOOL WINAPI SHWaitForFileToOpen(
635     LPCITEMIDLIST pidl,
636     DWORD dwFlags,
637     DWORD dwTimeout);
638 
639 WORD WINAPI ArrangeWindows(
640     HWND hwndParent,
641     DWORD dwReserved,
642     LPCRECT lpRect,
643     WORD cKids,
644     CONST HWND * lpKids);
645 
646 /* Flags for ShellExecCmdLine */
647 #define SECL_NO_UI          0x2
648 #define SECL_LOG_USAGE      0x8
649 #define SECL_USE_IDLIST     0x10
650 #define SECL_ALLOW_NONEXE   0x20
651 #define SECL_RUNAS          0x40
652 
653 HRESULT WINAPI ShellExecCmdLine(
654     HWND hwnd,
655     LPCWSTR pwszCommand,
656     LPCWSTR pwszStartDir,
657     int nShow,
658     LPVOID pUnused,
659     DWORD dwSeclFlags);
660 
661 HINSTANCE WINAPI
662 RealShellExecuteA(
663     _In_opt_ HWND hwnd,
664     _In_opt_ LPCSTR lpOperation,
665     _In_opt_ LPCSTR lpFile,
666     _In_opt_ LPCSTR lpParameters,
667     _In_opt_ LPCSTR lpDirectory,
668     _In_opt_ LPSTR lpReturn,
669     _In_opt_ LPCSTR lpTitle,
670     _In_opt_ LPVOID lpReserved,
671     _In_ INT nCmdShow,
672     _Out_opt_ PHANDLE lphProcess);
673 
674 HINSTANCE WINAPI
675 RealShellExecuteW(
676     _In_opt_ HWND hwnd,
677     _In_opt_ LPCWSTR lpOperation,
678     _In_opt_ LPCWSTR lpFile,
679     _In_opt_ LPCWSTR lpParameters,
680     _In_opt_ LPCWSTR lpDirectory,
681     _In_opt_ LPWSTR lpReturn,
682     _In_opt_ LPCWSTR lpTitle,
683     _In_opt_ LPVOID lpReserved,
684     _In_ INT nCmdShow,
685     _Out_opt_ PHANDLE lphProcess);
686 
687 HINSTANCE WINAPI
688 RealShellExecuteExA(
689     _In_opt_ HWND hwnd,
690     _In_opt_ LPCSTR lpOperation,
691     _In_opt_ LPCSTR lpFile,
692     _In_opt_ LPCSTR lpParameters,
693     _In_opt_ LPCSTR lpDirectory,
694     _In_opt_ LPSTR lpReturn,
695     _In_opt_ LPCSTR lpTitle,
696     _In_opt_ LPVOID lpReserved,
697     _In_ INT nCmdShow,
698     _Out_opt_ PHANDLE lphProcess,
699     _In_ DWORD dwFlags);
700 
701 HINSTANCE WINAPI
702 RealShellExecuteExW(
703     _In_opt_ HWND hwnd,
704     _In_opt_ LPCWSTR lpOperation,
705     _In_opt_ LPCWSTR lpFile,
706     _In_opt_ LPCWSTR lpParameters,
707     _In_opt_ LPCWSTR lpDirectory,
708     _In_opt_ LPWSTR lpReturn,
709     _In_opt_ LPCWSTR lpTitle,
710     _In_opt_ LPVOID lpReserved,
711     _In_ INT nCmdShow,
712     _Out_opt_ PHANDLE lphProcess,
713     _In_ DWORD dwFlags);
714 
715 VOID WINAPI
716 ShellExec_RunDLL(
717     _In_opt_ HWND hwnd,
718     _In_opt_ HINSTANCE hInstance,
719     _In_ PCSTR pszCmdLine,
720     _In_ INT nCmdShow);
721 
722 VOID WINAPI
723 ShellExec_RunDLLA(
724     _In_opt_ HWND hwnd,
725     _In_opt_ HINSTANCE hInstance,
726     _In_ PCSTR pszCmdLine,
727     _In_ INT nCmdShow);
728 
729 VOID WINAPI
730 ShellExec_RunDLLW(
731     _In_opt_ HWND hwnd,
732     _In_opt_ HINSTANCE hInstance,
733     _In_ PCWSTR pszCmdLine,
734     _In_ INT nCmdShow);
735 
736 /* RegisterShellHook types */
737 #define RSH_DEREGISTER        0
738 #define RSH_REGISTER          1
739 #define RSH_REGISTER_PROGMAN  2
740 #define RSH_REGISTER_TASKMAN  3
741 
742 BOOL WINAPI RegisterShellHook(
743     HWND hWnd,
744     DWORD dwType);
745 
746 /* SHCreateDefClassObject callback function */
747 typedef HRESULT (CALLBACK *LPFNCDCOCALLBACK)(
748     LPUNKNOWN pUnkOuter,
749     REFIID riidObject,
750     LPVOID *ppvObject);
751 
752 HRESULT WINAPI SHCreateDefClassObject(
753     REFIID riidFactory,
754     LPVOID *ppvFactory,
755     LPFNCDCOCALLBACK lpfnCallback,
756     LPDWORD lpdwUsage,
757     REFIID riidObject);
758 
759 void WINAPI SHFreeUnusedLibraries(void);
760 
761 /* SHCreateLinks flags */
762 #define SHCLF_PREFIXNAME       0x01
763 #define SHCLF_CREATEONDESKTOP  0x02
764 
765 HRESULT WINAPI SHCreateLinks(
766     HWND hWnd,
767     LPCSTR lpszDir,
768     LPDATAOBJECT lpDataObject,
769     UINT uFlags,
770     LPITEMIDLIST *lppidlLinks);
771 
772 VOID WINAPI CheckEscapesA(LPSTR string, DWORD len);
773 VOID WINAPI CheckEscapesW(LPWSTR string, DWORD len);
774 
775 /* policy functions */
776 BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey);
777 
778 #define CSIDL_FOLDER_MASK   0x00ff
779 
780 /* Utility functions */
781 #include <stdio.h>
782 
783 #define SMC_EXEC 4
784 INT WINAPI Shell_GetCachedImageIndex(LPCWSTR szPath, INT nIndex, UINT bSimulateDoc);
785 
786 HRESULT WINAPI SHCreatePropertyBag(_In_ REFIID riid, _Out_ void **ppvObj);
787 HRESULT WINAPI SHLimitInputCombo(HWND hWnd, IShellFolder *psf);
788 HRESULT WINAPI SHGetImageList(int iImageList, REFIID riid, void **ppv);
789 
790 BOOL WINAPI GUIDFromStringA(
791     _In_   PCSTR psz,
792     _Out_  LPGUID pguid);
793 BOOL WINAPI GUIDFromStringW(
794     _In_   PCWSTR psz,
795     _Out_  LPGUID pguid);
796 
797 LPSTR WINAPI SheRemoveQuotesA(LPSTR psz);
798 LPWSTR WINAPI SheRemoveQuotesW(LPWSTR psz);
799 
800 /* Flags for Int64ToString and LargeIntegerToString */
801 #define FMT_USE_NUMDIGITS 0x01
802 #define FMT_USE_LEADZERO  0x02
803 #define FMT_USE_GROUPING  0x04
804 #define FMT_USE_DECIMAL   0x08
805 #define FMT_USE_THOUSAND  0x10
806 #define FMT_USE_NEGNUMBER 0x20
807 
808 INT WINAPI
809 Int64ToString(
810     _In_ LONGLONG llValue,
811     _Out_writes_z_(cchOut) LPWSTR pszOut,
812     _In_ UINT cchOut,
813     _In_ BOOL bUseFormat,
814     _In_opt_ const NUMBERFMTW *pNumberFormat,
815     _In_ DWORD dwNumberFlags);
816 
817 INT WINAPI
818 LargeIntegerToString(
819     _In_ const LARGE_INTEGER *pLargeInt,
820     _Out_writes_z_(cchOut) LPWSTR pszOut,
821     _In_ UINT cchOut,
822     _In_ BOOL bUseFormat,
823     _In_opt_ const NUMBERFMTW *pNumberFormat,
824     _In_ DWORD dwNumberFlags);
825 
826 LPWSTR WINAPI
827 ShortSizeFormatW(
828     _In_ DWORD dwNumber,
829     _Out_writes_(0x8FFF) LPWSTR pszBuffer);
830 
831 BOOL WINAPI SHOpenEffectiveToken(_Out_ LPHANDLE phToken);
832 DWORD WINAPI SHGetUserSessionId(_In_opt_ HANDLE hToken);
833 
834 typedef HRESULT (CALLBACK *PRIVILEGED_FUNCTION)(LPARAM lParam);
835 
836 HRESULT WINAPI
837 SHInvokePrivilegedFunctionW(
838     _In_z_ LPCWSTR pszName,
839     _In_ PRIVILEGED_FUNCTION fn,
840     _In_opt_ LPARAM lParam);
841 
842 BOOL WINAPI
843 SHTestTokenPrivilegeW(_In_opt_ HANDLE hToken, _In_z_ LPCWSTR lpName);
844 BOOL WINAPI IsSuspendAllowed(VOID);
845 
846 BOOL WINAPI
847 Activate_RunDLL(
848     _In_ HWND hwnd,
849     _In_ HINSTANCE hinst,
850     _In_ LPCWSTR cmdline,
851     _In_ INT cmdshow);
852 
853 BOOL WINAPI SHSettingsChanged(LPCVOID unused, LPCWSTR pszKey);
854 
855 /*****************************************************************************
856  * Shell32 resources
857  */
858 // these resources are in shell32.dll
859 #define IDB_GOBUTTON_NORMAL         0x0e6
860 #define IDB_GOBUTTON_HOT            0x0e7
861 
862 // band ids in internet toolbar
863 #define ITBBID_MENUBAND             1
864 #define ITBBID_BRANDBAND            5
865 #define ITBBID_TOOLSBAND            2
866 #define ITBBID_ADDRESSBAND          4
867 
868 // commands in the CGID_PrivCITCommands command group handled by the internet toolbar
869 // there seems to be some support for hiding the menubar and an auto hide feature that are
870 // unavailable in the UI
871 #define ITID_TEXTLABELS             3
872 #define ITID_TOOLBARBANDSHOWN       4
873 #define ITID_ADDRESSBANDSHOWN       5
874 #define ITID_LINKSBANDSHOWN         6
875 #define ITID_MENUBANDSHOWN          12
876 #define ITID_AUTOHIDEENABLED        13
877 #define ITID_CUSTOMIZEENABLED       20
878 #define ITID_TOOLBARLOCKED          27
879 
880 // commands in the CGID_BrandCmdGroup command group handled by the brand band
881 #define BBID_STARTANIMATION         1
882 #define BBID_STOPANIMATION          2
883 
884 // undocumented flags for IShellMenu::SetShellFolder
885 #define SMSET_UNKNOWN08             0x08
886 #define SMSET_UNKNOWN10             0x10
887 
888 // explorer tray commands
889 #define TRAYCMD_STARTMENU           305
890 #define TRAYCMD_RUN_DIALOG          401
891 #define TRAYCMD_LOGOFF_DIALOG       402
892 #define TRAYCMD_CASCADE             403
893 #define TRAYCMD_TILE_H              404
894 #define TRAYCMD_TILE_V              405
895 #define TRAYCMD_TOGGLE_DESKTOP      407
896 #define TRAYCMD_DATE_AND_TIME       408
897 #define TRAYCMD_TASKBAR_PROPERTIES  413
898 #define TRAYCMD_MINIMIZE_ALL        415
899 #define TRAYCMD_RESTORE_ALL         416
900 #define TRAYCMD_SHOW_DESKTOP        419
901 #define TRAYCMD_SHOW_TASK_MGR       420
902 #define TRAYCMD_CUSTOMIZE_TASKBAR   421
903 #define TRAYCMD_LOCK_TASKBAR        424
904 #define TRAYCMD_HELP_AND_SUPPORT    503
905 #define TRAYCMD_CONTROL_PANEL       505
906 #define TRAYCMD_SHUTDOWN_DIALOG     506
907 #define TRAYCMD_PRINTERS_AND_FAXES  510
908 #define TRAYCMD_LOCK_DESKTOP        517
909 #define TRAYCMD_SWITCH_USER_DIALOG  5000
910 #define TRAYCMD_SEARCH_FILES        41093
911 #define TRAYCMD_SEARCH_COMPUTERS    41094
912 
913 // Explorer Tray Application Bar Data Message Commands
914 #define TABDMC_APPBAR     0
915 #define TABDMC_NOTIFY     1
916 #define TABDMC_LOADINPROC 2
917 
918 void WINAPI ShellDDEInit(BOOL bInit);
919 DWORD WINAPI WinList_Init(void);
920 
921 IStream* WINAPI SHGetViewStream(LPCITEMIDLIST, DWORD, LPCTSTR, LPCTSTR, LPCTSTR);
922 
923 HRESULT WINAPI SHCreateSessionKey(REGSAM samDesired, PHKEY phKey);
924 
925 LONG WINAPI SHRegQueryValueExA(
926     HKEY hkey,
927     LPCSTR lpValueName,
928     LPDWORD lpReserved,
929     LPDWORD lpType,
930     LPBYTE lpData,
931     LPDWORD lpcbData);
932 LONG WINAPI SHRegQueryValueExW(
933     HKEY hkey,
934     LPCWSTR pszValue,
935     LPDWORD pdwReserved,
936     LPDWORD pdwType,
937     LPVOID pvData,
938     LPDWORD pcbData);
939 #ifdef UNICODE
940     #define SHRegQueryValueEx SHRegQueryValueExW
941 #else
942     #define SHRegQueryValueEx SHRegQueryValueExA
943 #endif
944 
945 HRESULT WINAPI
946 CopyStreamUI(
947     _In_ IStream *pSrc,
948     _Out_ IStream *pDst,
949     _Inout_opt_ IProgressDialog *pProgress,
950     _In_opt_ DWORDLONG dwlSize);
951 
952 /*****************************************************************************
953  * INVALID_FILETITLE_CHARACTERS
954  */
955 
956 #define INVALID_FILETITLE_CHARACTERSA "\\/:*?\"<>|"
957 #define INVALID_FILETITLE_CHARACTERSW L"\\/:*?\"<>|"
958 
959 #ifdef UNICODE
960     #define INVALID_FILETITLE_CHARACTERS INVALID_FILETITLE_CHARACTERSW
961 #else
962     #define INVALID_FILETITLE_CHARACTERS INVALID_FILETITLE_CHARACTERSA
963 #endif
964 
965 /*****************************************************************************
966  * Shell Link
967  */
968 #include <pshpack1.h>
969 
970 typedef struct tagSHELL_LINK_HEADER
971 {
972     /* The size of this structure (always 0x0000004C) */
973     DWORD dwSize;
974     /* CLSID = class identifier (always 00021401-0000-0000-C000-000000000046) */
975     CLSID clsid;
976     /* Flags (SHELL_LINK_DATA_FLAGS) */
977     DWORD dwFlags;
978     /* Informations about the link target: */
979     DWORD dwFileAttributes;
980     FILETIME ftCreationTime;
981     FILETIME ftLastAccessTime;
982     FILETIME ftLastWriteTime;
983     DWORD nFileSizeLow; /* only the least significant 32 bits */
984     /* The index of an icon (signed?) */
985     DWORD nIconIndex;
986     /* The expected window state of an application launched by the link */
987     DWORD nShowCommand;
988     /* The keystrokes used to launch the application */
989     WORD wHotKey;
990     /* Reserved (must be zero) */
991     WORD wReserved1;
992     DWORD dwReserved2;
993     DWORD dwReserved3;
994 } SHELL_LINK_HEADER, *LPSHELL_LINK_HEADER;
995 
996 /*****************************************************************************
997  * SHELL_LINK_INFOA/W
998  * If cbHeaderSize == 0x0000001C then use SHELL_LINK_INFOA
999  * If cbHeaderSize >= 0x00000024 then use SHELL_LINK_INFOW
1000  */
1001 typedef struct tagSHELL_LINK_INFOA
1002 {
1003     /* Size of the link info data */
1004     DWORD cbSize;
1005     /* Size of this structure (ANSI: = 0x0000001C) */
1006     DWORD cbHeaderSize;
1007     /* Specifies which fields are present/populated (SLI_*) */
1008     DWORD dwFlags;
1009     /* Offset of the VolumeID field (SHELL_LINK_INFO_VOLUME_ID) */
1010     DWORD cbVolumeIDOffset;
1011     /* Offset of the LocalBasePath field (ANSI, NULL-terminated string) */
1012     DWORD cbLocalBasePathOffset;
1013     /* Offset of the CommonNetworkRelativeLink field (SHELL_LINK_INFO_CNR_LINK) */
1014     DWORD cbCommonNetworkRelativeLinkOffset;
1015     /* Offset of the CommonPathSuffix field (ANSI, NULL-terminated string) */
1016     DWORD cbCommonPathSuffixOffset;
1017 } SHELL_LINK_INFOA, *LPSHELL_LINK_INFOA;
1018 
1019 typedef struct tagSHELL_LINK_INFOW
1020 {
1021     /* Size of the link info data */
1022     DWORD cbSize;
1023     /* Size of this structure (Unicode: >= 0x00000024) */
1024     DWORD cbHeaderSize;
1025     /* Specifies which fields are present/populated (SLI_*) */
1026     DWORD dwFlags;
1027     /* Offset of the VolumeID field (SHELL_LINK_INFO_VOLUME_ID) */
1028     DWORD cbVolumeIDOffset;
1029     /* Offset of the LocalBasePath field (ANSI, NULL-terminated string) */
1030     DWORD cbLocalBasePathOffset;
1031     /* Offset of the CommonNetworkRelativeLink field (SHELL_LINK_INFO_CNR_LINK) */
1032     DWORD cbCommonNetworkRelativeLinkOffset;
1033     /* Offset of the CommonPathSuffix field (ANSI, NULL-terminated string) */
1034     DWORD cbCommonPathSuffixOffset;
1035     /* Offset of the LocalBasePathUnicode field (Unicode, NULL-terminated string) */
1036     DWORD cbLocalBasePathUnicodeOffset;
1037     /* Offset of the CommonPathSuffixUnicode field (Unicode, NULL-terminated string) */
1038     DWORD cbCommonPathSuffixUnicodeOffset;
1039 } SHELL_LINK_INFOW, *LPSHELL_LINK_INFOW;
1040 
1041 /* VolumeID, LocalBasePath, LocalBasePathUnicode(cbHeaderSize >= 0x24) are present */
1042 #define SLI_VALID_LOCAL   0x00000001
1043 /* CommonNetworkRelativeLink is present */
1044 #define SLI_VALID_NETWORK 0x00000002
1045 
1046 /*****************************************************************************
1047  * SHELL_LINK_INFO_VOLUME_IDA/W
1048  * If cbVolumeLabelOffset != 0x00000014 (should be 0x00000010) then use
1049  * SHELL_LINK_INFO_VOLUME_IDA
1050  * If cbVolumeLabelOffset == 0x00000014 then use SHELL_LINK_INFO_VOLUME_IDW
1051  */
1052 typedef struct tagSHELL_LINK_INFO_VOLUME_IDA
1053 {
1054     /* Size of the VolumeID field (> 0x00000010) */
1055     DWORD cbSize;
1056     /* Drive type of the drive the link target is stored on (DRIVE_*) */
1057     DWORD dwDriveType;
1058     /* Serial number of the volume the link target is stored on */
1059     DWORD nDriveSerialNumber;
1060     /* Offset of the volume label (ANSI, NULL-terminated string).
1061        Must be != 0x00000014 (see tagSHELL_LINK_INFO_VOLUME_IDW) */
1062     DWORD cbVolumeLabelOffset;
1063 } SHELL_LINK_INFO_VOLUME_IDA, *LPSHELL_LINK_INFO_VOLUME_IDA;
1064 
1065 typedef struct tagSHELL_LINK_INFO_VOLUME_IDW
1066 {
1067     /* Size of the VolumeID field (> 0x00000010) */
1068     DWORD cbSize;
1069     /* Drive type of the drive the link target is stored on (DRIVE_*) */
1070     DWORD dwDriveType;
1071     /* Serial number of the volume the link target is stored on */
1072     DWORD nDriveSerialNumber;
1073     /* Offset of the volume label (ANSI, NULL-terminated string).
1074        If the value of this field is 0x00000014, ignore it and use
1075        cbVolumeLabelUnicodeOffset! */
1076     DWORD cbVolumeLabelOffset;
1077     /* Offset of the volume label (Unicode, NULL-terminated string).
1078        If the value of the VolumeLabelOffset field is not 0x00000014,
1079        this field must be ignored (==> it doesn't exists ==> ANSI). */
1080     DWORD cbVolumeLabelUnicodeOffset;
1081 } SHELL_LINK_INFO_VOLUME_IDW, *LPSHELL_LINK_INFO_VOLUME_IDW;
1082 
1083 /*****************************************************************************
1084  * SHELL_LINK_INFO_CNR_LINKA/W (CNR = Common Network Relative)
1085  * If cbNetNameOffset == 0x00000014 then use SHELL_LINK_INFO_CNR_LINKA
1086  * If cbNetNameOffset > 0x00000014 then use SHELL_LINK_INFO_CNR_LINKW
1087  */
1088 typedef struct tagSHELL_LINK_INFO_CNR_LINKA
1089 {
1090     /* Size of the CommonNetworkRelativeLink field (>= 0x00000014) */
1091     DWORD cbSize;
1092     /* Specifies which fields are present/populated (SLI_CNR_*) */
1093     DWORD dwFlags;
1094     /* Offset of the NetName field (ANSI, NULL–terminated string) */
1095     DWORD cbNetNameOffset;
1096     /* Offset of the DeviceName field (ANSI, NULL–terminated string) */
1097     DWORD cbDeviceNameOffset;
1098     /* Type of the network provider (WNNC_NET_* defined in winnetwk.h) */
1099     DWORD dwNetworkProviderType;
1100 } SHELL_LINK_INFO_CNR_LINKA, *LPSHELL_LINK_INFO_CNR_LINKA;
1101 
1102 typedef struct tagSHELL_LINK_INFO_CNR_LINKW
1103 {
1104     /* Size of the CommonNetworkRelativeLink field (>= 0x00000014) */
1105     DWORD cbSize;
1106     /* Specifies which fields are present/populated (SLI_CNR_*) */
1107     DWORD dwFlags;
1108     /* Offset of the NetName field (ANSI, NULL–terminated string) */
1109     DWORD cbNetNameOffset;
1110     /* Offset of the DeviceName field (ANSI, NULL–terminated string) */
1111     DWORD cbDeviceNameOffset;
1112     /* Type of the network provider (WNNC_NET_* defined in winnetwk.h) */
1113     DWORD dwNetworkProviderType;
1114     /* Offset of the NetNameUnicode field (Unicode, NULL–terminated string) */
1115     DWORD cbNetNameUnicodeOffset;
1116     /* Offset of the DeviceNameUnicode field (Unicode, NULL–terminated string) */
1117     DWORD cbDeviceNameUnicodeOffset;
1118 } SHELL_LINK_INFO_CNR_LINKW, *LPSHELL_LINK_INFO_CNR_LINKW;
1119 
1120 /* DeviceName is present */
1121 #define SLI_CNR_VALID_DEVICE   0x00000001
1122 /* NetworkProviderType is present */
1123 #define SLI_CNR_VALID_NET_TYPE 0x00000002
1124 
1125 /*****************************************************************************
1126  * Shell Link Extra Data (IShellLinkDataList)
1127  */
1128 typedef struct tagEXP_TRACKER
1129 {
1130     /* .cbSize = 0x00000060, .dwSignature = 0xa0000003 */
1131     DATABLOCK_HEADER dbh;
1132     /* Length >= 0x00000058 */
1133     DWORD nLength;
1134     /* Must be 0x00000000 */
1135     DWORD nVersion;
1136     /* NetBIOS name (ANSI, unused bytes are set to zero) */
1137     CHAR szMachineID[16]; /* "variable" >= 16 (?) */
1138     /* Some GUIDs for the Link Tracking service (from the FS?) */
1139     GUID guidDroidVolume;
1140     GUID guidDroidObject;
1141     GUID guidDroidBirthVolume;
1142     GUID guidDroidBirthObject;
1143 } EXP_TRACKER, *LPEXP_TRACKER;
1144 
1145 typedef struct tagEXP_SHIM
1146 {
1147     /* .cbSize >= 0x00000088, .dwSignature = 0xa0000008 */
1148     DATABLOCK_HEADER dbh;
1149     /* Name of a shim layer to apply (Unicode, unused bytes are set to zero) */
1150     WCHAR szwLayerName[64]; /* "variable" >= 64 */
1151 } EXP_SHIM, *LPEXP_SHIM;
1152 
1153 typedef struct tagEXP_KNOWN_FOLDER
1154 {
1155     /* .cbSize = 0x0000001c, .dwSignature = 0xa000000b */
1156     DATABLOCK_HEADER dbh;
1157     /* A GUID value that identifies a known folder */
1158     GUID guidKnownFolder;
1159     /* Specifies the location of the ItemID of the first child
1160        segment of the IDList specified by guidKnownFolder */
1161     DWORD cbOffset;
1162 } EXP_KNOWN_FOLDER, *LPEXP_KNOWN_FOLDER;
1163 
1164 typedef struct tagEXP_VISTA_ID_LIST
1165 {
1166     /* .cbSize >= 0x0000000a, .dwSignature = 0xa000000c */
1167     DATABLOCK_HEADER dbh;
1168     /* Specifies an alternate IDList that can be used instead
1169        of the "normal" IDList (SLDF_HAS_ID_LIST) */
1170     /* LPITEMIDLIST pIDList; (variable) */
1171 } EXP_VISTA_ID_LIST, *LPEXP_VISTA_ID_LIST;
1172 
1173 #define EXP_TRACKER_SIG       0xa0000003
1174 #define EXP_SHIM_SIG          0xa0000008
1175 #define EXP_KNOWN_FOLDER_SIG  0xa000000b
1176 #define EXP_VISTA_ID_LIST_SIG 0xa000000c
1177 
1178 /* Not compatible yet */
1179 typedef struct SFVM_CUSTOMVIEWINFO_DATA
1180 {
1181     ULONG cbSize;
1182     HBITMAP hbmBack;
1183     COLORREF clrText;
1184     COLORREF clrTextBack;
1185 } SFVM_CUSTOMVIEWINFO_DATA, *LPSFVM_CUSTOMVIEWINFO_DATA;
1186 
1187 #include <poppack.h>
1188 
1189 #ifdef __cplusplus
1190 } /* extern "C" */
1191 #endif /* defined(__cplusplus) */
1192 
1193 #endif /* __WINE_UNDOCSHELL_H */
1194