2 * Copyright 1999, 2000 Juergen Schmied
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_UNDOCSHELL_H
20 #define __WINE_UNDOCSHELL_H
24 #endif /* defined(__cplusplus) */
27 #if (NTDDI_VERSION < NTDDI_LONGHORN)
28 #define DBIMF_NOGRIPPER 0x0800
29 #define DBIMF_ALWAYSGRIPPER 0x1000
30 #define DBIMF_NOMARGINS 0x2000
31 #endif // NTDDI_LONGHORN
33 #if defined (_SHELLAPI_H) || defined (_INC_SHELLAPI)
35 /****************************************************************************
36 * Taskbar interface WM_COPYDATA structures
37 * See http://www.geoffchappell.com/studies/windows/shell/shell32/api/shlnot/copydata.htm
39 /* Data structure for Shell_NotifyIcon messages */
40 typedef struct _TRAYNOTIFYDATAW
44 NOTIFYICONDATAW nid
; // Always use the latest NOTIFYICONDATAW structure version.
45 } TRAYNOTIFYDATAW
, *PTRAYNOTIFYDATAW
;
46 // Note: One could also introduce TRAYNOTIFYDATAA
48 #define NI_NOTIFY_SIG 0x34753423 /* TRAYNOTIFYDATA */
50 #endif /* defined (_SHELLAPI_H) || defined (_INC_SHELLAPI) */
53 /****************************************************************************
54 * Taskbar WM_COMMAND identifiers
56 #define TWM_DOEXITWINDOWS (WM_USER + 342)
57 #define TWM_CYCLEFOCUS (WM_USER + 348)
60 /****************************************************************************
63 BOOL WINAPI
ILGetDisplayName(
67 /* type parameter for ILGetDisplayNameEx() */
68 #define ILGDN_FORPARSING 0
69 #define ILGDN_NORMAL 1
70 #define ILGDN_INFOLDER 2
72 BOOL WINAPI
ILGetDisplayNameEx(
78 LPITEMIDLIST WINAPI
ILGlobalClone(LPCITEMIDLIST pidl
);
79 void WINAPI
ILGlobalFree(LPITEMIDLIST pidl
);
80 LPITEMIDLIST WINAPI
SHSimpleIDListFromPathA (LPCSTR lpszPath
); //FIXME
81 LPITEMIDLIST WINAPI
SHSimpleIDListFromPathW (LPCWSTR lpszPath
);
83 HRESULT WINAPI
SHILCreateFromPathA (
88 HRESULT WINAPI
SHILCreateFromPathW (
96 BOOL WINAPI
StrRetToStrNA(LPSTR
,DWORD
,LPSTRRET
,const ITEMIDLIST
*);
97 BOOL WINAPI
StrRetToStrNW(LPWSTR
,DWORD
,LPSTRRET
,const ITEMIDLIST
*);
100 /****************************************************************************
101 * SHChangeNotifyRegister API
103 #define SHCNRF_InterruptLevel 0x0001
104 #define SHCNRF_ShellLevel 0x0002
105 #define SHCNRF_RecursiveInterrupt 0x1000 /* Must be combined with SHCNRF_InterruptLevel */
106 #define SHCNRF_NewDelivery 0x8000 /* Messages use shared memory */
109 /****************************************************************************
110 * Shell Common Dialogs
113 /* RunFileDlg flags */
114 #define RFF_NOBROWSE 0x01 /* Removes the browse button */
115 #define RFF_NODEFAULT 0x02 /* No default item selected */
116 #define RFF_CALCDIRECTORY 0x04 /* Calculates the working directory from the file name */
117 #define RFF_NOLABEL 0x08 /* Removes the edit box label */
118 #define RFF_NOSEPARATEMEM 0x20 /* Removes the Separate Memory Space check box (Windows NT only) */
120 /* RunFileFlg notification value and structure */
121 #define RFN_VALIDATE (-510)
122 #if 0 // Deprecated ANSI structure
123 typedef struct _NMRUNFILEDLGA
129 } NMRUNFILEDLGA
, *PNMRUNFILEDLGA
, *LPNMRUNFILEDLGA
;
131 typedef struct _NMRUNFILEDLGW
137 } NMRUNFILEDLGW
, *PNMRUNFILEDLGW
, *LPNMRUNFILEDLGW
;
139 typedef NMRUNFILEDLGW NMRUNFILEDLG
;
140 typedef PNMRUNFILEDLGW PNMRUNFILEDLG
;
141 typedef LPNMRUNFILEDLGW LPNMRUNFILEDLG
;
143 /* RunFileDlg notification return values */
145 #define RF_CANCEL 0x01
146 #define RF_RETRY 0x02
148 void WINAPI
RunFileDlg(
151 LPCWSTR lpstrDirectory
,
153 LPCWSTR lpstrDescription
,
156 int WINAPI
LogoffWindowsDialog(HWND hWndOwner
);
157 void WINAPI
ExitWindowsDialog(HWND hWndOwner
);
159 BOOL WINAPI
SHFindComputer(
160 LPCITEMIDLIST pidlRoot
,
161 LPCITEMIDLIST pidlSavedSearch
);
163 void WINAPI
SHHandleDiskFull(HWND hwndOwner
,
166 int WINAPI
SHOutOfMemoryMessageBox(
171 DWORD WINAPI
SHNetConnectionDialog(
173 LPCWSTR lpstrRemoteName
,
176 /****************************************************************************
177 * Cabinet Window Messages
180 #define CWM_SETPATH (WM_USER + 2)
181 #define CWM_WANTIDLE (WM_USER + 3)
182 #define CWM_GETSETCURRENTINFO (WM_USER + 4)
183 #define CWM_SELECTITEM (WM_USER + 5)
184 #define CWM_SELECTITEMSTR (WM_USER + 6)
185 #define CWM_GETISHELLBROWSER (WM_USER + 7)
186 #define CWM_TESTPATH (WM_USER + 9)
187 #define CWM_STATECHANGE (WM_USER + 10)
188 #define CWM_GETPATH (WM_USER + 12)
190 #define WM_GETISHELLBROWSER CWM_GETISHELLBROWSER
192 /* CWM_TESTPATH types */
193 #define CWTP_ISEQUAL 0
194 #define CWTP_ISCHILD 1
196 /* CWM_TESTPATH structure */
201 } CWTESTPATHSTRUCT
,* LPCWTESTPATHSTRUCT
;
203 /****************************************************************************
204 * System Imagelist Routines
207 int WINAPI
Shell_GetCachedImageIndexA(
212 BOOL WINAPI
Shell_GetImageLists(
213 HIMAGELIST
*lphimlLarge
,
214 HIMAGELIST
*lphimlSmall
);
216 HICON WINAPI
SHGetFileIcon(
219 DWORD dwFileAttributes
,
222 BOOL WINAPI
FileIconInit(BOOL bFullInit
);
224 /****************************************************************************
227 /* FileMenu_Create nSelHeight constants */
228 #define FM_DEFAULT_SELHEIGHT -1
229 #define FM_FULL_SELHEIGHT 0
231 /* FileMenu_Create flags */
232 #define FMF_SMALL_ICONS 0x00
233 #define FMF_LARGE_ICONS 0x08
234 #define FMF_NO_COLUMN_BREAK 0x10
236 HMENU WINAPI
FileMenu_Create(
237 COLORREF crBorderColor
,
243 void WINAPI
FileMenu_Destroy(HMENU hMenu
);
245 /* FileMenu_AppendItem constants */
246 #define FM_SEPARATOR (LPCSTR)1
247 #define FM_BLANK_ICON -1
248 #define FM_DEFAULT_HEIGHT 0
250 BOOL WINAPI
FileMenu_AppendItem(
258 /* FileMenu_InsertUsingPidl flags */
259 #define FMF_NO_EMPTY_ITEM 0x01
260 #define FMF_NO_PROGRAM_GROUPS 0x04
262 /* FileMenu_InsertUsingPidl callback function */
263 typedef void (CALLBACK
*LPFNFMCALLBACK
)(LPCITEMIDLIST pidlFolder
, LPCITEMIDLIST pidlFile
);
265 int WINAPI
FileMenu_InsertUsingPidl(
271 LPFNFMCALLBACK lpfnCallback
);
273 int WINAPI
FileMenu_ReplaceUsingPidl(
278 LPFNFMCALLBACK lpfnCallback
);
280 void WINAPI
FileMenu_Invalidate(HMENU hMenu
);
282 HMENU WINAPI
FileMenu_FindSubMenuByPidl(
286 BOOL WINAPI
FileMenu_TrackPopupMenuEx(
294 BOOL WINAPI
FileMenu_GetLastSelectedItemPidls(
296 LPCITEMIDLIST
*ppidlFolder
,
297 LPCITEMIDLIST
*ppidlItem
);
299 LRESULT WINAPI
FileMenu_MeasureItem(
301 LPMEASUREITEMSTRUCT lpmis
);
303 LRESULT WINAPI
FileMenu_DrawItem(
305 LPDRAWITEMSTRUCT lpdis
);
307 BOOL WINAPI
FileMenu_InitMenuPopup(HMENU hMenu
);
309 void WINAPI
FileMenu_AbortInitMenu(void);
311 LRESULT WINAPI
FileMenu_HandleMenuChar(
315 BOOL WINAPI
FileMenu_DeleteAllItems(HMENU hMenu
);
317 BOOL WINAPI
FileMenu_DeleteItemByCmd(
321 BOOL WINAPI
FileMenu_DeleteItemByIndex(
325 BOOL WINAPI
FileMenu_DeleteMenuItemByFirstID(
329 BOOL WINAPI
FileMenu_DeleteSeparator(HMENU hMenu
);
331 BOOL WINAPI
FileMenu_EnableItemByCmd(
336 DWORD WINAPI
FileMenu_GetItemExtent(
340 int WINAPI
FileMenu_AppendFilesForPidl(
345 int WINAPI
FileMenu_AddFilesForPidl(
352 LPFNFMCALLBACK lpfnCallback
);
354 /****************************************************************************
355 * Drag And Drop Routines
358 HRESULT WINAPI
SHRegisterDragDrop(
360 LPDROPTARGET lpDropTarget
);
362 HRESULT WINAPI
SHRevokeDragDrop(HWND hWnd
);
364 BOOL WINAPI
DAD_DragEnter(HWND hWnd
);
366 BOOL WINAPI
DAD_SetDragImageFromListView(
370 BOOL WINAPI
DAD_ShowDragImage(BOOL bShow
);
372 /****************************************************************************
373 * Path Manipulation Routines
376 BOOL WINAPI
PathAppendAW(LPVOID lpszPath1
, LPCVOID lpszPath2
);
378 LPVOID WINAPI
PathCombineAW(LPVOID szDest
, LPCVOID lpszDir
, LPCVOID lpszFile
);
380 LPVOID WINAPI
PathAddBackslashAW(LPVOID path
);
382 LPVOID WINAPI
PathBuildRootAW(LPVOID lpszPath
, int drive
);
384 LPVOID WINAPI
PathFindExtensionAW(LPCVOID path
);
386 LPVOID WINAPI
PathFindFileNameAW(LPCVOID path
);
388 LPVOID WINAPI
PathGetExtensionAW(LPCVOID lpszPath
, DWORD void1
, DWORD void2
);
390 LPVOID WINAPI
PathGetArgsAW(LPVOID lpszPath
);
392 BOOL WINAPI
PathRemoveFileSpecAW(LPVOID lpszPath
);
394 void WINAPI
PathRemoveBlanksAW(LPVOID lpszPath
);
396 VOID WINAPI
PathQuoteSpacesAW(LPVOID path
);
398 void WINAPI
PathUnquoteSpacesAW(LPVOID lpszPath
);
400 BOOL WINAPI
PathIsUNCAW(LPCVOID lpszPath
);
402 BOOL WINAPI
PathIsRelativeAW(LPCVOID lpszPath
);
404 BOOL WINAPI
PathIsRootAW(LPCVOID x
);
406 BOOL WINAPI
PathIsExeAW(LPCVOID lpszPath
);
408 BOOL WINAPI
PathIsDirectoryAW(LPCVOID lpszPath
);
410 BOOL WINAPI
PathFileExistsAW(LPCVOID lpszPath
);
412 BOOL WINAPI
PathMatchSpecAW(LPVOID lpszPath
, LPVOID lpszSpec
);
414 BOOL WINAPI
PathMakeUniqueNameAW(
417 LPCVOID lpszShortName
,
418 LPCVOID lpszLongName
,
419 LPCVOID lpszPathName
);
421 BOOL WINAPI
PathYetAnotherMakeUniqueName(
423 LPCWSTR lpszPathName
,
424 LPCWSTR lpszShortName
,
425 LPCWSTR lpszLongName
);
427 BOOL WINAPI
PathQualifyAW(LPCVOID path
);
430 /* PathResolve flags */
431 #define PRF_CHECKEXISTANCE 0x01
432 #define PRF_EXECUTABLE 0x02
433 #define PRF_QUALIFYONPATH 0x04
434 #define PRF_WINDOWS31 0x08
436 BOOL WINAPI
PathResolveAW(LPVOID lpszPath
, LPCVOID
*alpszPaths
, DWORD dwFlags
);
438 VOID WINAPI
PathSetDlgItemPathAW(HWND hDlg
, int nIDDlgItem
, LPCVOID lpszPath
);
440 /* PathProcessCommand flags */
441 #define PPCF_QUOTEPATH 0x01 /* implies PPCF_INCLUDEARGS */
442 #define PPCF_INCLUDEARGS 0x02
443 //#define PPCF_NODIRECTORIES 0x10 move to shlobj
444 #define PPCF_DONTRESOLVE 0x20
445 #define PPCF_PATHISRELATIVE 0x40
447 HRESULT WINAPI
PathProcessCommandAW(LPCVOID lpszPath
, LPVOID lpszBuff
,
448 DWORD dwBuffSize
, DWORD dwFlags
);
450 void WINAPI
PathStripPathAW(LPVOID lpszPath
);
452 BOOL WINAPI
PathStripToRootAW(LPVOID lpszPath
);
454 void WINAPI
PathRemoveArgsAW(LPVOID lpszPath
);
456 void WINAPI
PathRemoveExtensionAW(LPVOID lpszPath
);
458 int WINAPI
PathParseIconLocationAW(LPVOID lpszPath
);
460 BOOL WINAPI
PathIsSameRootAW(LPCVOID lpszPath1
, LPCVOID lpszPath2
);
462 BOOL WINAPI
PathFindOnPathAW(LPVOID sFile
, LPCVOID
*sOtherDirs
);
464 /****************************************************************************
465 * Shell File Operations error codes
468 /* Error codes could be pre-Win32 */
469 #define DE_SAMEFILE 0x71
470 #define DE_MANYSRC1DEST 0x72
471 #define DE_DIFFDIR 0x73
472 #define DE_OPCANCELLED 0x75
473 #define DE_DESTSUBTREE 0x76
474 #define DE_INVALIDFILES 0x7C
475 #define DE_DESTSAMETREE 0x7D
476 #define DE_FLDDESTISFILE 0x7E
477 #define DE_FILEDESTISFLD 0x80
479 /****************************************************************************
480 * Shell Namespace Routines
483 /* Generic structure used by several messages */
490 } SFVCBINFO
, * LPSFVCBINFO
;
491 typedef const SFVCBINFO
* LPCSFVCBINFO
;
493 /* SFVCB_SELECTIONCHANGED structure */
500 } SFVSELECTSTATE
, * LPSFVSELECTSTATE
;
501 typedef const SFVSELECTSTATE
* LPCSFVSELECTSTATE
;
503 /* SFVCB_COPYHOOKCALLBACK structure */
513 } SFVCOPYHOOKINFO
, * LPSFVCOPYHOOKINFO
;
514 typedef const SFVCOPYHOOKINFO
* LPCSFVCOPYHOOKINFO
;
516 /* SFVCB_GETDETAILSOF structure */
523 } SFVCOLUMNINFO
, * LPSFVCOLUMNINFO
;
525 /****************************************************************************
530 RegenerateUserEnvironment(LPVOID
*lpEnvironment
, BOOL bUpdateSelf
);
532 /* SHWaitForFileToOpen flags */
533 #define SHWFF_ADD 0x01
534 #define SHWFF_REMOVE 0x02
535 #define SHWFF_WAIT 0x04
537 BOOL WINAPI
SHWaitForFileToOpen(
542 WORD WINAPI
ArrangeWindows(
547 CONST HWND
* lpKids
);
549 /* Flags for ShellExecCmdLine */
550 #define SECL_NO_UI 0x2
551 #define SECL_LOG_USAGE 0x8
552 #define SECL_USE_IDLIST 0x10
553 #define SECL_ALLOW_NONEXE 0x20
554 #define SECL_RUNAS 0x40
556 HRESULT WINAPI
ShellExecCmdLine(
559 LPCWSTR pwszStartDir
,
564 /* RegisterShellHook types */
565 #define RSH_DEREGISTER 0
566 #define RSH_REGISTER 1
567 #define RSH_REGISTER_PROGMAN 2
568 #define RSH_REGISTER_TASKMAN 3
570 BOOL WINAPI
RegisterShellHook(
574 /* SHCreateDefClassObject callback function */
575 typedef HRESULT (CALLBACK
*LPFNCDCOCALLBACK
)(
580 HRESULT WINAPI
SHCreateDefClassObject(
583 LPFNCDCOCALLBACK lpfnCallback
,
587 void WINAPI
SHFreeUnusedLibraries(void);
589 /* SHCreateLinks flags */
590 #define SHCLF_PREFIXNAME 0x01
591 #define SHCLF_CREATEONDESKTOP 0x02
593 HRESULT WINAPI
SHCreateLinks(
596 LPDATAOBJECT lpDataObject
,
598 LPITEMIDLIST
*lppidlLinks
);
600 DWORD WINAPI
CheckEscapesA(LPSTR string
, DWORD len
);
601 DWORD WINAPI
CheckEscapesW(LPWSTR string
, DWORD len
);
603 /* policy functions */
604 BOOL WINAPI
SHInitRestricted(LPCVOID unused
, LPCVOID inpRegKey
);
606 #define CSIDL_FOLDER_MASK 0x00ff
608 /* Utility functions */
612 INT WINAPI
Shell_GetCachedImageIndex(LPCWSTR szPath
, INT nIndex
, UINT bSimulateDoc
);
614 HRESULT WINAPI
SHGetImageList(int iImageList
, REFIID riid
, void **ppv
);
616 BOOL WINAPI
GUIDFromStringW(
622 Win32DbgPrint(const char *filename
, int line
, const char *lpFormat
, ...)
630 fname
= strrchr(filename
, '\\');
633 fname
= strrchr(filename
, '/');
643 szMsgStart
= szMsg
+ sprintf(szMsg
, "%s:%d: ", fname
, line
);
645 va_start(vl
, lpFormat
);
646 uRet
= (ULONG
) vsprintf(szMsgStart
, lpFormat
, vl
);
649 OutputDebugStringA(szMsg
);
654 #define DbgPrint(fmt, ...) \
655 Win32DbgPrint(__FILE__, __LINE__, fmt, ##__VA_ARGS__)
657 static inline void DbgDumpMenuInternal(HMENU hmenu
, char* padding
, int padlevel
)
661 int count
= GetMenuItemCount(hmenu
);
663 padding
[padlevel
] = '.';
664 padding
[padlevel
+ 1] = '.';
665 padding
[padlevel
+ 2] = 0;
667 for (i
= 0; i
< count
; i
++)
669 MENUITEMINFOW mii
= { 0 };
671 mii
.cbSize
= sizeof(mii
);
672 mii
.fMask
= MIIM_STRING
| MIIM_FTYPE
| MIIM_SUBMENU
| MIIM_STATE
| MIIM_ID
;
673 mii
.dwTypeData
= label
;
674 mii
.cch
= _countof(label
);
676 GetMenuItemInfoW(hmenu
, i
, TRUE
, &mii
);
678 if (mii
.fType
& MFT_BITMAP
)
679 DbgPrint("%s%2d - %08x: BITMAP %08p (state=%d, has submenu=%s)\n", padding
, i
, mii
.wID
, mii
.hbmpItem
, mii
.fState
, mii
.hSubMenu
? "TRUE" : "FALSE");
680 else if (mii
.fType
& MFT_SEPARATOR
)
681 DbgPrint("%s%2d - %08x ---SEPARATOR---\n", padding
, i
, mii
.wID
);
683 DbgPrint("%s%2d - %08x: %S (state=%d, has submenu=%s)\n", padding
, i
, mii
.wID
, mii
.dwTypeData
, mii
.fState
, mii
.hSubMenu
? "TRUE" : "FALSE");
686 DbgDumpMenuInternal(mii
.hSubMenu
, padding
, padlevel
+ 2);
690 padding
[padlevel
] = 0;
693 static __inline
void DbgDumpMenu(HMENU hmenu
)
696 DbgDumpMenuInternal(hmenu
, padding
, 0);
701 void DumpIdList(LPCITEMIDLIST pcidl
)
703 DbgPrint("Begin IDList Dump\n");
705 for (; pcidl
!= NULL
; pcidl
= ILGetNext(pcidl
))
708 int cb
= pcidl
->mkid
.cb
;
709 BYTE
* sh
= (BYTE
*) &(pcidl
->mkid
);
710 if (cb
== 0) // ITEMIDLISTs are terminatedwith a null SHITEMID.
712 DbgPrint("Begin SHITEMID (cb=%d)\n", cb
);
714 DbgPrint(" - WARNING: cb is not a multiple of 4\n");
715 for (i
= 0; (i
+ 4) <= cb
; i
+= 4)
717 DbgPrint(" - abID[%08x]: %02x %02x %02x %02x\n",
729 DbgPrint(" - abID[%08x]: %02x %02x %02x --\n",
737 DbgPrint(" - abID[%08x]: %02x %02x -- --\n",
744 DbgPrint(" - abID[%08x]: %02x -- -- --\n",
749 DbgPrint("End SHITEMID\n");
751 DbgPrint("End IDList Dump.\n");
755 /*****************************************************************************
758 // these resources are in shell32.dll
759 #define IDB_GOBUTTON_NORMAL 0x0e6
760 #define IDB_GOBUTTON_HOT 0x0e7
762 // band ids in internet toolbar
763 #define ITBBID_MENUBAND 1
764 #define ITBBID_BRANDBAND 5
765 #define ITBBID_TOOLSBAND 2
766 #define ITBBID_ADDRESSBAND 4
768 // commands in the CGID_PrivCITCommands command group handled by the internet toolbar
769 // there seems to be some support for hiding the menubar and an auto hide feature that are
770 // unavailable in the UI
771 #define ITID_TEXTLABELS 3
772 #define ITID_TOOLBARBANDSHOWN 4
773 #define ITID_ADDRESSBANDSHOWN 5
774 #define ITID_LINKSBANDSHOWN 6
775 #define ITID_MENUBANDSHOWN 12
776 #define ITID_AUTOHIDEENABLED 13
777 #define ITID_CUSTOMIZEENABLED 20
778 #define ITID_TOOLBARLOCKED 27
780 // commands in the CGID_BrandCmdGroup command group handled by the brand band
781 #define BBID_STARTANIMATION 1
782 #define BBID_STOPANIMATION 2
784 // undocumented flags for IShellMenu::SetShellFolder
785 #define SMSET_UNKNOWN08 0x08
786 #define SMSET_UNKNOWN10 0x10
788 void WINAPI
ShellDDEInit(BOOL bInit
);
789 DWORD WINAPI
WinList_Init(void);
791 IStream
* WINAPI
SHGetViewStream(LPCITEMIDLIST
, DWORD
, LPCTSTR
, LPCTSTR
, LPCTSTR
);
793 EXTERN_C HRESULT WINAPI
SHCreateSessionKey(REGSAM samDesired
, PHKEY phKey
);
795 /*****************************************************************************
798 #include <pshpack1.h>
800 typedef struct tagSHELL_LINK_HEADER
802 /* The size of this structure (always 0x0000004C) */
804 /* CLSID = class identifier (always 00021401-0000-0000-C000-000000000046) */
806 /* Flags (SHELL_LINK_DATA_FLAGS) */
808 /* Informations about the link target: */
809 DWORD dwFileAttributes
;
810 FILETIME ftCreationTime
;
811 FILETIME ftLastAccessTime
;
812 FILETIME ftLastWriteTime
;
813 DWORD nFileSizeLow
; /* only the least significant 32 bits */
814 /* The index of an icon (signed?) */
816 /* The expected window state of an application launched by the link */
818 /* The keystrokes used to launch the application */
820 /* Reserved (must be zero) */
824 } SHELL_LINK_HEADER
, *LPSHELL_LINK_HEADER
;
826 /*****************************************************************************
828 * If cbHeaderSize == 0x0000001C then use SHELL_LINK_INFOA
829 * If cbHeaderSize >= 0x00000024 then use SHELL_LINK_INFOW
831 typedef struct tagSHELL_LINK_INFOA
833 /* Size of the link info data */
835 /* Size of this structure (ANSI: = 0x0000001C) */
837 /* Specifies which fields are present/populated (SLI_*) */
839 /* Offset of the VolumeID field (SHELL_LINK_INFO_VOLUME_ID) */
840 DWORD cbVolumeIDOffset
;
841 /* Offset of the LocalBasePath field (ANSI, NULL-terminated string) */
842 DWORD cbLocalBasePathOffset
;
843 /* Offset of the CommonNetworkRelativeLink field (SHELL_LINK_INFO_CNR_LINK) */
844 DWORD cbCommonNetworkRelativeLinkOffset
;
845 /* Offset of the CommonPathSuffix field (ANSI, NULL-terminated string) */
846 DWORD cbCommonPathSuffixOffset
;
847 } SHELL_LINK_INFOA
, *LPSHELL_LINK_INFOA
;
849 typedef struct tagSHELL_LINK_INFOW
851 /* Size of the link info data */
853 /* Size of this structure (Unicode: >= 0x00000024) */
855 /* Specifies which fields are present/populated (SLI_*) */
857 /* Offset of the VolumeID field (SHELL_LINK_INFO_VOLUME_ID) */
858 DWORD cbVolumeIDOffset
;
859 /* Offset of the LocalBasePath field (ANSI, NULL-terminated string) */
860 DWORD cbLocalBasePathOffset
;
861 /* Offset of the CommonNetworkRelativeLink field (SHELL_LINK_INFO_CNR_LINK) */
862 DWORD cbCommonNetworkRelativeLinkOffset
;
863 /* Offset of the CommonPathSuffix field (ANSI, NULL-terminated string) */
864 DWORD cbCommonPathSuffixOffset
;
865 /* Offset of the LocalBasePathUnicode field (Unicode, NULL-terminated string) */
866 DWORD cbLocalBasePathUnicodeOffset
;
867 /* Offset of the CommonPathSuffixUnicode field (Unicode, NULL-terminated string) */
868 DWORD cbCommonPathSuffixUnicodeOffset
;
869 } SHELL_LINK_INFOW
, *LPSHELL_LINK_INFOW
;
871 /* VolumeID, LocalBasePath, LocalBasePathUnicode(cbHeaderSize >= 0x24) are present */
872 #define SLI_VALID_LOCAL 0x00000001
873 /* CommonNetworkRelativeLink is present */
874 #define SLI_VALID_NETWORK 0x00000002
876 /*****************************************************************************
877 * SHELL_LINK_INFO_VOLUME_IDA/W
878 * If cbVolumeLabelOffset != 0x00000014 (should be 0x00000010) then use
879 * SHELL_LINK_INFO_VOLUME_IDA
880 * If cbVolumeLabelOffset == 0x00000014 then use SHELL_LINK_INFO_VOLUME_IDW
882 typedef struct tagSHELL_LINK_INFO_VOLUME_IDA
884 /* Size of the VolumeID field (> 0x00000010) */
886 /* Drive type of the drive the link target is stored on (DRIVE_*) */
888 /* Serial number of the volume the link target is stored on */
889 DWORD nDriveSerialNumber
;
890 /* Offset of the volume label (ANSI, NULL-terminated string).
891 Must be != 0x00000014 (see tagSHELL_LINK_INFO_VOLUME_IDW) */
892 DWORD cbVolumeLabelOffset
;
893 } SHELL_LINK_INFO_VOLUME_IDA
, *LPSHELL_LINK_INFO_VOLUME_IDA
;
895 typedef struct tagSHELL_LINK_INFO_VOLUME_IDW
897 /* Size of the VolumeID field (> 0x00000010) */
899 /* Drive type of the drive the link target is stored on (DRIVE_*) */
901 /* Serial number of the volume the link target is stored on */
902 DWORD nDriveSerialNumber
;
903 /* Offset of the volume label (ANSI, NULL-terminated string).
904 If the value of this field is 0x00000014, ignore it and use
905 cbVolumeLabelUnicodeOffset! */
906 DWORD cbVolumeLabelOffset
;
907 /* Offset of the volume label (Unicode, NULL-terminated string).
908 If the value of the VolumeLabelOffset field is not 0x00000014,
909 this field must be ignored (==> it doesn't exists ==> ANSI). */
910 DWORD cbVolumeLabelUnicodeOffset
;
911 } SHELL_LINK_INFO_VOLUME_IDW
, *LPSHELL_LINK_INFO_VOLUME_IDW
;
913 /*****************************************************************************
914 * SHELL_LINK_INFO_CNR_LINKA/W (CNR = Common Network Relative)
915 * If cbNetNameOffset == 0x00000014 then use SHELL_LINK_INFO_CNR_LINKA
916 * If cbNetNameOffset > 0x00000014 then use SHELL_LINK_INFO_CNR_LINKW
918 typedef struct tagSHELL_LINK_INFO_CNR_LINKA
920 /* Size of the CommonNetworkRelativeLink field (>= 0x00000014) */
922 /* Specifies which fields are present/populated (SLI_CNR_*) */
924 /* Offset of the NetName field (ANSI, NULL–terminated string) */
925 DWORD cbNetNameOffset
;
926 /* Offset of the DeviceName field (ANSI, NULL–terminated string) */
927 DWORD cbDeviceNameOffset
;
928 /* Type of the network provider (WNNC_NET_* defined in winnetwk.h) */
929 DWORD dwNetworkProviderType
;
930 } SHELL_LINK_INFO_CNR_LINKA
, *LPSHELL_LINK_INFO_CNR_LINKA
;
932 typedef struct tagSHELL_LINK_INFO_CNR_LINKW
934 /* Size of the CommonNetworkRelativeLink field (>= 0x00000014) */
936 /* Specifies which fields are present/populated (SLI_CNR_*) */
938 /* Offset of the NetName field (ANSI, NULL–terminated string) */
939 DWORD cbNetNameOffset
;
940 /* Offset of the DeviceName field (ANSI, NULL–terminated string) */
941 DWORD cbDeviceNameOffset
;
942 /* Type of the network provider (WNNC_NET_* defined in winnetwk.h) */
943 DWORD dwNetworkProviderType
;
944 /* Offset of the NetNameUnicode field (Unicode, NULL–terminated string) */
945 DWORD cbNetNameUnicodeOffset
;
946 /* Offset of the DeviceNameUnicode field (Unicode, NULL–terminated string) */
947 DWORD cbDeviceNameUnicodeOffset
;
948 } SHELL_LINK_INFO_CNR_LINKW
, *LPSHELL_LINK_INFO_CNR_LINKW
;
950 /* DeviceName is present */
951 #define SLI_CNR_VALID_DEVICE 0x00000001
952 /* NetworkProviderType is present */
953 #define SLI_CNR_VALID_NET_TYPE 0x00000002
955 /*****************************************************************************
956 * Shell Link Extra Data (IShellLinkDataList)
958 typedef struct tagEXP_TRACKER
960 /* .cbSize = 0x00000060, .dwSignature = 0xa0000003 */
961 DATABLOCK_HEADER dbh
;
962 /* Length >= 0x00000058 */
964 /* Must be 0x00000000 */
966 /* NetBIOS name (ANSI, unused bytes are set to zero) */
967 CHAR szMachineID
[16]; /* "variable" >= 16 (?) */
968 /* Some GUIDs for the Link Tracking service (from the FS?) */
969 GUID guidDroidVolume
;
970 GUID guidDroidObject
;
971 GUID guidDroidBirthVolume
;
972 GUID guidDroidBirthObject
;
973 } EXP_TRACKER
, *LPEXP_TRACKER
;
975 typedef struct tagEXP_SHIM
977 /* .cbSize >= 0x00000088, .dwSignature = 0xa0000008 */
978 DATABLOCK_HEADER dbh
;
979 /* Name of a shim layer to apply (Unicode, unused bytes are set to zero) */
980 WCHAR szwLayerName
[64]; /* "variable" >= 64 */
981 } EXP_SHIM
, *LPEXP_SHIM
;
983 typedef struct tagEXP_KNOWN_FOLDER
985 /* .cbSize = 0x0000001c, .dwSignature = 0xa000000b */
986 DATABLOCK_HEADER dbh
;
987 /* A GUID value that identifies a known folder */
988 GUID guidKnownFolder
;
989 /* Specifies the location of the ItemID of the first child
990 segment of the IDList specified by guidKnownFolder */
992 } EXP_KNOWN_FOLDER
, *LPEXP_KNOWN_FOLDER
;
994 typedef struct tagEXP_VISTA_ID_LIST
996 /* .cbSize >= 0x0000000a, .dwSignature = 0xa000000c */
997 DATABLOCK_HEADER dbh
;
998 /* Specifies an alternate IDList that can be used instead
999 of the "normal" IDList (SLDF_HAS_ID_LIST) */
1000 /* LPITEMIDLIST pIDList; (variable) */
1001 } EXP_VISTA_ID_LIST
, *LPEXP_VISTA_ID_LIST
;
1003 #define EXP_TRACKER_SIG 0xa0000003
1004 #define EXP_SHIM_SIG 0xa0000008
1005 #define EXP_KNOWN_FOLDER_SIG 0xa000000b
1006 #define EXP_VISTA_ID_LIST_SIG 0xa000000c
1008 #include <poppack.h>
1012 #endif /* defined(__cplusplus) */
1014 #endif /* __WINE_UNDOCSHELL_H */