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 /****************************************************************************
34 * Taskbar WM_COMMAND identifiers
37 #define TWM_DOEXITWINDOWS (WM_USER + 342)
38 #define TWM_CYCLEFOCUS (WM_USER + 348)
41 /****************************************************************************
44 BOOL WINAPI
ILGetDisplayName(
48 /* type parameter for ILGetDisplayNameEx() */
49 #define ILGDN_FORPARSING 0
50 #define ILGDN_NORMAL 1
51 #define ILGDN_INFOLDER 2
53 BOOL WINAPI
ILGetDisplayNameEx(
59 LPITEMIDLIST WINAPI
ILGlobalClone(LPCITEMIDLIST pidl
);
60 void WINAPI
ILGlobalFree(LPITEMIDLIST pidl
);
61 LPITEMIDLIST WINAPI
SHSimpleIDListFromPathA (LPCSTR lpszPath
); //FIXME
62 LPITEMIDLIST WINAPI
SHSimpleIDListFromPathW (LPCWSTR lpszPath
);
64 HRESULT WINAPI
SHILCreateFromPathA (
69 HRESULT WINAPI
SHILCreateFromPathW (
77 BOOL WINAPI
StrRetToStrNA(LPSTR
,DWORD
,LPSTRRET
,const ITEMIDLIST
*);
78 BOOL WINAPI
StrRetToStrNW(LPWSTR
,DWORD
,LPSTRRET
,const ITEMIDLIST
*);
81 /****************************************************************************
82 * SHChangeNotifyRegister API
84 #define SHCNRF_InterruptLevel 0x0001
85 #define SHCNRF_ShellLevel 0x0002
86 #define SHCNRF_RecursiveInterrupt 0x1000 /* Must be combined with SHCNRF_InterruptLevel */
87 #define SHCNRF_NewDelivery 0x8000 /* Messages use shared memory */
90 /****************************************************************************
91 * Shell Common Dialogs
94 /* RunFileDlg flags */
95 #define RFF_NOBROWSE 0x01
96 #define RFF_NODEFAULT 0x02
97 #define RFF_CALCDIRECTORY 0x04
98 #define RFF_NOLABEL 0x08
99 #define RFF_NOSEPARATEMEM 0x20 /* NT only */
101 #define DE_SAMEFILE 0x71
102 #define DE_DESTSAMETREE 0x7D
104 /* RunFileFlg notification structure */
111 } NM_RUNFILEDLG
, * LPNM_RUNFILEDLG
;
113 /* RunFileDlg notification return values */
115 #define RF_CANCEL 0x01
116 #define RF_RETRY 0x02
118 void WINAPI
RunFileDlg(
121 LPCWSTR lpstrDirectory
,
123 LPCWSTR lpstrDescription
,
126 int WINAPI
LogoffWindowsDialog(HWND hwndOwner
);
127 void WINAPI
ExitWindowsDialog(HWND hwndOwner
);
129 BOOL WINAPI
SHFindComputer(
130 LPCITEMIDLIST pidlRoot
,
131 LPCITEMIDLIST pidlSavedSearch
);
133 void WINAPI
SHHandleDiskFull(HWND hwndOwner
,
136 int WINAPI
SHOutOfMemoryMessageBox(
141 DWORD WINAPI
SHNetConnectionDialog(
143 LPCWSTR lpstrRemoteName
,
146 /****************************************************************************
147 * Cabinet Window Messages
150 #define CWM_SETPATH (WM_USER + 2)
151 #define CWM_WANTIDLE (WM_USER + 3)
152 #define CWM_GETSETCURRENTINFO (WM_USER + 4)
153 #define CWM_SELECTITEM (WM_USER + 5)
154 #define CWM_SELECTITEMSTR (WM_USER + 6)
155 #define CWM_GETISHELLBROWSER (WM_USER + 7)
156 #define CWM_TESTPATH (WM_USER + 9)
157 #define CWM_STATECHANGE (WM_USER + 10)
158 #define CWM_GETPATH (WM_USER + 12)
160 #define WM_GETISHELLBROWSER CWM_GETISHELLBROWSER
162 /* CWM_TESTPATH types */
163 #define CWTP_ISEQUAL 0
164 #define CWTP_ISCHILD 1
166 /* CWM_TESTPATH structure */
171 } CWTESTPATHSTRUCT
,* LPCWTESTPATHSTRUCT
;
173 /****************************************************************************
174 * System Imagelist Routines
177 int WINAPI
Shell_GetCachedImageIndexA(
182 BOOL WINAPI
Shell_GetImageLists(
183 HIMAGELIST
*lphimlLarge
,
184 HIMAGELIST
*lphimlSmall
);
186 HICON WINAPI
SHGetFileIcon(
189 DWORD dwFileAttributes
,
192 BOOL WINAPI
FileIconInit(BOOL bFullInit
);
194 /****************************************************************************
197 /* FileMenu_Create nSelHeight constants */
198 #define FM_DEFAULT_SELHEIGHT -1
199 #define FM_FULL_SELHEIGHT 0
201 /* FileMenu_Create flags */
202 #define FMF_SMALL_ICONS 0x00
203 #define FMF_LARGE_ICONS 0x08
204 #define FMF_NO_COLUMN_BREAK 0x10
206 HMENU WINAPI
FileMenu_Create(
207 COLORREF crBorderColor
,
213 void WINAPI
FileMenu_Destroy(HMENU hMenu
);
215 /* FileMenu_AppendItem constants */
216 #define FM_SEPARATOR (LPCSTR)1
217 #define FM_BLANK_ICON -1
218 #define FM_DEFAULT_HEIGHT 0
220 BOOL WINAPI
FileMenu_AppendItem(
228 /* FileMenu_InsertUsingPidl flags */
229 #define FMF_NO_EMPTY_ITEM 0x01
230 #define FMF_NO_PROGRAM_GROUPS 0x04
232 /* FileMenu_InsertUsingPidl callback function */
233 typedef void (CALLBACK
*LPFNFMCALLBACK
)(LPCITEMIDLIST pidlFolder
, LPCITEMIDLIST pidlFile
);
235 int WINAPI
FileMenu_InsertUsingPidl(
241 LPFNFMCALLBACK lpfnCallback
);
243 int WINAPI
FileMenu_ReplaceUsingPidl(
248 LPFNFMCALLBACK lpfnCallback
);
250 void WINAPI
FileMenu_Invalidate(HMENU hMenu
);
252 HMENU WINAPI
FileMenu_FindSubMenuByPidl(
256 BOOL WINAPI
FileMenu_TrackPopupMenuEx(
264 BOOL WINAPI
FileMenu_GetLastSelectedItemPidls(
266 LPCITEMIDLIST
*ppidlFolder
,
267 LPCITEMIDLIST
*ppidlItem
);
269 LRESULT WINAPI
FileMenu_MeasureItem(
271 LPMEASUREITEMSTRUCT lpmis
);
273 LRESULT WINAPI
FileMenu_DrawItem(
275 LPDRAWITEMSTRUCT lpdis
);
277 BOOL WINAPI
FileMenu_InitMenuPopup(HMENU hMenu
);
279 void WINAPI
FileMenu_AbortInitMenu(void);
281 LRESULT WINAPI
FileMenu_HandleMenuChar(
285 BOOL WINAPI
FileMenu_DeleteAllItems(HMENU hMenu
);
287 BOOL WINAPI
FileMenu_DeleteItemByCmd(
291 BOOL WINAPI
FileMenu_DeleteItemByIndex(
295 BOOL WINAPI
FileMenu_DeleteMenuItemByFirstID(
299 BOOL WINAPI
FileMenu_DeleteSeparator(HMENU hMenu
);
301 BOOL WINAPI
FileMenu_EnableItemByCmd(
306 DWORD WINAPI
FileMenu_GetItemExtent(
310 int WINAPI
FileMenu_AppendFilesForPidl(
315 int WINAPI
FileMenu_AddFilesForPidl(
322 LPFNFMCALLBACK lpfnCallback
);
324 /****************************************************************************
325 * Drag And Drop Routines
328 HRESULT WINAPI
SHRegisterDragDrop(
330 LPDROPTARGET lpDropTarget
);
332 HRESULT WINAPI
SHRevokeDragDrop(HWND hWnd
);
334 BOOL WINAPI
DAD_DragEnter(HWND hWnd
);
336 BOOL WINAPI
DAD_SetDragImageFromListView(
340 BOOL WINAPI
DAD_ShowDragImage(BOOL bShow
);
342 /****************************************************************************
343 * Path Manipulation Routines
346 BOOL WINAPI
PathAppendAW(LPVOID lpszPath1
, LPCVOID lpszPath2
);
348 LPVOID WINAPI
PathCombineAW(LPVOID szDest
, LPCVOID lpszDir
, LPCVOID lpszFile
);
350 LPVOID WINAPI
PathAddBackslashAW(LPVOID path
);
352 LPVOID WINAPI
PathBuildRootAW(LPVOID lpszPath
, int drive
);
354 LPVOID WINAPI
PathFindExtensionAW(LPCVOID path
);
356 LPVOID WINAPI
PathFindFileNameAW(LPCVOID path
);
358 LPVOID WINAPI
PathGetExtensionAW(LPCVOID lpszPath
, DWORD void1
, DWORD void2
);
360 LPVOID WINAPI
PathGetArgsAW(LPVOID lpszPath
);
362 BOOL WINAPI
PathRemoveFileSpecAW(LPVOID lpszPath
);
364 void WINAPI
PathRemoveBlanksAW(LPVOID lpszPath
);
366 VOID WINAPI
PathQuoteSpacesAW(LPVOID path
);
368 void WINAPI
PathUnquoteSpacesAW(LPVOID lpszPath
);
370 BOOL WINAPI
PathIsUNCAW(LPCVOID lpszPath
);
372 BOOL WINAPI
PathIsRelativeAW(LPCVOID lpszPath
);
374 BOOL WINAPI
PathIsRootAW(LPCVOID x
);
376 BOOL WINAPI
PathIsExeAW(LPCVOID lpszPath
);
378 BOOL WINAPI
PathIsDirectoryAW(LPCVOID lpszPath
);
380 BOOL WINAPI
PathFileExistsAW(LPCVOID lpszPath
);
382 BOOL WINAPI
PathMatchSpecAW(LPVOID lpszPath
, LPVOID lpszSpec
);
384 BOOL WINAPI
PathMakeUniqueNameAW(
387 LPCVOID lpszShortName
,
388 LPCVOID lpszLongName
,
389 LPCVOID lpszPathName
);
391 BOOL WINAPI
PathYetAnotherMakeUniqueName(
393 LPCWSTR lpszPathName
,
394 LPCWSTR lpszShortName
,
395 LPCWSTR lpszLongName
);
397 BOOL WINAPI
PathQualifyAW(LPCVOID path
);
400 /* PathResolve flags */
401 #define PRF_CHECKEXISTANCE 0x01
402 #define PRF_EXECUTABLE 0x02
403 #define PRF_QUALIFYONPATH 0x04
404 #define PRF_WINDOWS31 0x08
406 BOOL WINAPI
PathResolveAW(LPVOID lpszPath
, LPCVOID
*alpszPaths
, DWORD dwFlags
);
408 VOID WINAPI
PathSetDlgItemPathAW(HWND hDlg
, int nIDDlgItem
, LPCVOID lpszPath
);
410 /* PathProcessCommand flags */
411 #define PPCF_QUOTEPATH 0x01 /* implies PPCF_INCLUDEARGS */
412 #define PPCF_INCLUDEARGS 0x02
413 //#define PPCF_NODIRECTORIES 0x10 move to shlobj
414 #define PPCF_DONTRESOLVE 0x20
415 #define PPCF_PATHISRELATIVE 0x40
417 HRESULT WINAPI
PathProcessCommandAW(LPCVOID lpszPath
, LPVOID lpszBuff
,
418 DWORD dwBuffSize
, DWORD dwFlags
);
420 void WINAPI
PathStripPathAW(LPVOID lpszPath
);
422 BOOL WINAPI
PathStripToRootAW(LPVOID lpszPath
);
424 void WINAPI
PathRemoveArgsAW(LPVOID lpszPath
);
426 void WINAPI
PathRemoveExtensionAW(LPVOID lpszPath
);
428 int WINAPI
PathParseIconLocationAW(LPVOID lpszPath
);
430 BOOL WINAPI
PathIsSameRootAW(LPCVOID lpszPath1
, LPCVOID lpszPath2
);
432 BOOL WINAPI
PathFindOnPathAW(LPVOID sFile
, LPCVOID
*sOtherDirs
);
434 /****************************************************************************
435 * Shell Namespace Routines
438 /* Generic structure used by several messages */
445 } SFVCBINFO
, * LPSFVCBINFO
;
446 typedef const SFVCBINFO
* LPCSFVCBINFO
;
448 /* SFVCB_SELECTIONCHANGED structure */
455 } SFVSELECTSTATE
, * LPSFVSELECTSTATE
;
456 typedef const SFVSELECTSTATE
* LPCSFVSELECTSTATE
;
458 /* SFVCB_COPYHOOKCALLBACK structure */
468 } SFVCOPYHOOKINFO
, * LPSFVCOPYHOOKINFO
;
469 typedef const SFVCOPYHOOKINFO
* LPCSFVCOPYHOOKINFO
;
471 /* SFVCB_GETDETAILSOF structure */
478 } SFVCOLUMNINFO
, * LPSFVCOLUMNINFO
;
480 /****************************************************************************
484 /* SHWaitForFileToOpen flags */
485 #define SHWFF_ADD 0x01
486 #define SHWFF_REMOVE 0x02
487 #define SHWFF_WAIT 0x04
489 BOOL WINAPI
SHWaitForFileToOpen(
494 WORD WINAPI
ArrangeWindows(
499 CONST HWND
* lpKids
);
501 /* RegisterShellHook types */
502 #define RSH_DEREGISTER 0
503 #define RSH_REGISTER 1
504 #define RSH_REGISTER_PROGMAN 2
505 #define RSH_REGISTER_TASKMAN 3
507 BOOL WINAPI
RegisterShellHook(
511 /* SHCreateDefClassObject callback function */
512 typedef HRESULT (CALLBACK
*LPFNCDCOCALLBACK
)(
517 HRESULT WINAPI
SHCreateDefClassObject(
520 LPFNCDCOCALLBACK lpfnCallback
,
524 void WINAPI
SHFreeUnusedLibraries(void);
526 /* SHCreateLinks flags */
527 #define SHCLF_PREFIXNAME 0x01
528 #define SHCLF_CREATEONDESKTOP 0x02
530 HRESULT WINAPI
SHCreateLinks(
533 LPDATAOBJECT lpDataObject
,
535 LPITEMIDLIST
*lppidlLinks
);
537 DWORD WINAPI
CheckEscapesA(LPSTR string
, DWORD len
);
538 DWORD WINAPI
CheckEscapesW(LPWSTR string
, DWORD len
);
540 /* policy functions */
541 BOOL WINAPI
SHInitRestricted(LPCVOID unused
, LPCVOID inpRegKey
);
543 #define CSIDL_FOLDER_MASK 0x00ff
545 /* Utility functions */
549 INT WINAPI
Shell_GetCachedImageIndex(LPCWSTR szPath
, INT nIndex
, UINT bSimulateDoc
);
551 HRESULT WINAPI
SHGetImageList(int iImageList
, REFIID riid
, void **ppv
);
554 Win32DbgPrint(const char *filename
, int line
, const char *lpFormat
, ...)
562 fname
= strrchr(filename
, '\\');
565 fname
= strrchr(filename
, '/');
575 szMsgStart
= szMsg
+ sprintf(szMsg
, "%s:%d: ", fname
, line
);
577 va_start(vl
, lpFormat
);
578 uRet
= (ULONG
) vsprintf(szMsgStart
, lpFormat
, vl
);
581 OutputDebugStringA(szMsg
);
586 #define DbgPrint(fmt, ...) \
587 Win32DbgPrint(__FILE__, __LINE__, fmt, ##__VA_ARGS__)
589 static inline void DbgDumpMenuInternal(HMENU hmenu
, char* padding
, int padlevel
)
593 int count
= GetMenuItemCount(hmenu
);
595 padding
[padlevel
] = '.';
596 padding
[padlevel
+ 1] = '.';
597 padding
[padlevel
+ 2] = 0;
599 for (i
= 0; i
< count
; i
++)
601 MENUITEMINFOW mii
= { 0 };
603 mii
.cbSize
= sizeof(mii
);
604 mii
.fMask
= MIIM_STRING
| MIIM_FTYPE
| MIIM_SUBMENU
| MIIM_STATE
| MIIM_ID
;
605 mii
.dwTypeData
= label
;
606 mii
.cch
= _countof(label
);
608 GetMenuItemInfo(hmenu
, i
, TRUE
, &mii
);
610 if (mii
.fType
& MFT_BITMAP
)
611 DbgPrint("%s%2d - %08x: BITMAP %08p (state=%d, has submenu=%s)\n", padding
, i
, mii
.wID
, mii
.hbmpItem
, mii
.fState
, mii
.hSubMenu
? "TRUE" : "FALSE");
612 else if (mii
.fType
& MFT_SEPARATOR
)
613 DbgPrint("%s%2d - %08x ---SEPARATOR---\n", padding
, i
, mii
.wID
);
615 DbgPrint("%s%2d - %08x: %S (state=%d, has submenu=%s)\n", padding
, i
, mii
.wID
, mii
.dwTypeData
, mii
.fState
, mii
.hSubMenu
? "TRUE" : "FALSE");
618 DbgDumpMenuInternal(mii
.hSubMenu
, padding
, padlevel
+ 2);
622 padding
[padlevel
] = 0;
625 static __inline
void DbgDumpMenu(HMENU hmenu
)
628 DbgDumpMenuInternal(hmenu
, padding
, 0);
633 void DumpIdList(LPCITEMIDLIST pcidl
)
635 DbgPrint("Begin IDList Dump\n");
637 for (; pcidl
!= NULL
; pcidl
= ILGetNext(pcidl
))
640 int cb
= pcidl
->mkid
.cb
;
641 BYTE
* sh
= (BYTE
*) &(pcidl
->mkid
);
642 if (cb
== 0) // ITEMIDLISTs are terminatedwith a null SHITEMID.
644 DbgPrint("Begin SHITEMID (cb=%d)\n", cb
);
646 DbgPrint(" - WARNING: cb is not a multiple of 4\n");
647 for (i
= 0; (i
+ 4) <= cb
; i
+= 4)
649 DbgPrint(" - abID[%08x]: %02x %02x %02x %02x\n",
661 DbgPrint(" - abID[%08x]: %02x %02x %02x --\n",
669 DbgPrint(" - abID[%08x]: %02x %02x -- --\n",
676 DbgPrint(" - abID[%08x]: %02x -- -- --\n",
681 DbgPrint("End SHITEMID\n");
683 DbgPrint("End IDList Dump.\n");
687 /*****************************************************************************
690 // these resources are in shell32.dll
691 #define IDB_GOBUTTON_NORMAL 0x0e6
692 #define IDB_GOBUTTON_HOT 0x0e7
694 // band ids in internet toolbar
695 #define ITBBID_MENUBAND 1
696 #define ITBBID_BRANDBAND 5
697 #define ITBBID_TOOLSBAND 2
698 #define ITBBID_ADDRESSBAND 4
700 // commands in the CGID_PrivCITCommands command group handled by the internet toolbar
701 // there seems to be some support for hiding the menubar and an auto hide feature that are
702 // unavailable in the UI
703 #define ITID_TEXTLABELS 3
704 #define ITID_TOOLBARBANDSHOWN 4
705 #define ITID_ADDRESSBANDSHOWN 5
706 #define ITID_LINKSBANDSHOWN 6
707 #define ITID_MENUBANDSHOWN 12
708 #define ITID_AUTOHIDEENABLED 13
709 #define ITID_CUSTOMIZEENABLED 20
710 #define ITID_TOOLBARLOCKED 27
712 // commands in the CGID_BrandCmdGroup command group handled by the brand band
713 #define BBID_STARTANIMATION 1
714 #define BBID_STOPANIMATION 2
716 // undocumented flags for IShellMenu::SetShellFolder
717 #define SMSET_UNKNOWN08 0x08
718 #define SMSET_UNKNOWN10 0x10
720 void WINAPI
ShellDDEInit(BOOL bInit
);
721 DWORD WINAPI
WinList_Init(void);
723 IStream
* WINAPI
SHGetViewStream(LPCITEMIDLIST
, DWORD
, LPCTSTR
, LPCTSTR
, LPCTSTR
);
725 EXTERN_C HRESULT WINAPI
SHCreateSessionKey(REGSAM samDesired
, PHKEY phKey
);
727 /*****************************************************************************
730 #include <pshpack1.h>
732 typedef struct tagSHELL_LINK_HEADER
734 /* The size of this structure (always 0x0000004C) */
736 /* CLSID = class identifier (always 00021401-0000-0000-C000-000000000046) */
738 /* Flags (SHELL_LINK_DATA_FLAGS) */
740 /* Informations about the link target: */
741 DWORD dwFileAttributes
;
742 FILETIME ftCreationTime
;
743 FILETIME ftLastAccessTime
;
744 FILETIME ftLastWriteTime
;
745 DWORD nFileSizeLow
; /* only the least significant 32 bits */
746 /* The index of an icon (signed?) */
748 /* The expected window state of an application launched by the link */
750 /* The keystrokes used to launch the application */
752 /* Reserved (must be zero) */
756 } SHELL_LINK_HEADER
, *LPSHELL_LINK_HEADER
;
758 /*****************************************************************************
760 * If cbHeaderSize == 0x0000001C then use SHELL_LINK_INFOA
761 * If cbHeaderSize >= 0x00000024 then use SHELL_LINK_INFOW
763 typedef struct tagSHELL_LINK_INFOA
765 /* Size of the link info data */
767 /* Size of this structure (ANSI: = 0x0000001C) */
769 /* Specifies which fields are present/populated (SLI_*) */
771 /* Offset of the VolumeID field (SHELL_LINK_INFO_VOLUME_ID) */
772 DWORD cbVolumeIDOffset
;
773 /* Offset of the LocalBasePath field (ANSI, NULL-terminated string) */
774 DWORD cbLocalBasePathOffset
;
775 /* Offset of the CommonNetworkRelativeLink field (SHELL_LINK_INFO_CNR_LINK) */
776 DWORD cbCommonNetworkRelativeLinkOffset
;
777 /* Offset of the CommonPathSuffix field (ANSI, NULL-terminated string) */
778 DWORD cbCommonPathSuffixOffset
;
779 } SHELL_LINK_INFOA
, *LPSHELL_LINK_INFOA
;
781 typedef struct tagSHELL_LINK_INFOW
783 /* Size of the link info data */
785 /* Size of this structure (Unicode: >= 0x00000024) */
787 /* Specifies which fields are present/populated (SLI_*) */
789 /* Offset of the VolumeID field (SHELL_LINK_INFO_VOLUME_ID) */
790 DWORD cbVolumeIDOffset
;
791 /* Offset of the LocalBasePath field (ANSI, NULL-terminated string) */
792 DWORD cbLocalBasePathOffset
;
793 /* Offset of the CommonNetworkRelativeLink field (SHELL_LINK_INFO_CNR_LINK) */
794 DWORD cbCommonNetworkRelativeLinkOffset
;
795 /* Offset of the CommonPathSuffix field (ANSI, NULL-terminated string) */
796 DWORD cbCommonPathSuffixOffset
;
797 /* Offset of the LocalBasePathUnicode field (Unicode, NULL-terminated string) */
798 DWORD cbLocalBasePathUnicodeOffset
;
799 /* Offset of the CommonPathSuffixUnicode field (Unicode, NULL-terminated string) */
800 DWORD cbCommonPathSuffixUnicodeOffset
;
801 } SHELL_LINK_INFOW
, *LPSHELL_LINK_INFOW
;
803 /* VolumeID, LocalBasePath, LocalBasePathUnicode(cbHeaderSize >= 0x24) are present */
804 #define SLI_VALID_LOCAL 0x00000001
805 /* CommonNetworkRelativeLink is present */
806 #define SLI_VALID_NETWORK 0x00000002
808 /*****************************************************************************
809 * SHELL_LINK_INFO_VOLUME_IDA/W
810 * If cbVolumeLabelOffset != 0x00000014 (should be 0x00000010) then use
811 * SHELL_LINK_INFO_VOLUME_IDA
812 * If cbVolumeLabelOffset == 0x00000014 then use SHELL_LINK_INFO_VOLUME_IDW
814 typedef struct tagSHELL_LINK_INFO_VOLUME_IDA
816 /* Size of the VolumeID field (> 0x00000010) */
818 /* Drive type of the drive the link target is stored on (DRIVE_*) */
820 /* Serial number of the volume the link target is stored on */
821 DWORD nDriveSerialNumber
;
822 /* Offset of the volume label (ANSI, NULL-terminated string).
823 Must be != 0x00000014 (see tagSHELL_LINK_INFO_VOLUME_IDW) */
824 DWORD cbVolumeLabelOffset
;
825 } SHELL_LINK_INFO_VOLUME_IDA
, *LPSHELL_LINK_INFO_VOLUME_IDA
;
827 typedef struct tagSHELL_LINK_INFO_VOLUME_IDW
829 /* Size of the VolumeID field (> 0x00000010) */
831 /* Drive type of the drive the link target is stored on (DRIVE_*) */
833 /* Serial number of the volume the link target is stored on */
834 DWORD nDriveSerialNumber
;
835 /* Offset of the volume label (ANSI, NULL-terminated string).
836 If the value of this field is 0x00000014, ignore it and use
837 cbVolumeLabelUnicodeOffset! */
838 DWORD cbVolumeLabelOffset
;
839 /* Offset of the volume label (Unicode, NULL-terminated string).
840 If the value of the VolumeLabelOffset field is not 0x00000014,
841 this field must be ignored (==> it doesn't exists ==> ANSI). */
842 DWORD cbVolumeLabelUnicodeOffset
;
843 } SHELL_LINK_INFO_VOLUME_IDW
, *LPSHELL_LINK_INFO_VOLUME_IDW
;
845 /*****************************************************************************
846 * SHELL_LINK_INFO_CNR_LINKA/W (CNR = Common Network Relative)
847 * If cbNetNameOffset == 0x00000014 then use SHELL_LINK_INFO_CNR_LINKA
848 * If cbNetNameOffset > 0x00000014 then use SHELL_LINK_INFO_CNR_LINKW
850 typedef struct tagSHELL_LINK_INFO_CNR_LINKA
852 /* Size of the CommonNetworkRelativeLink field (>= 0x00000014) */
854 /* Specifies which fields are present/populated (SLI_CNR_*) */
856 /* Offset of the NetName field (ANSI, NULL–terminated string) */
857 DWORD cbNetNameOffset
;
858 /* Offset of the DeviceName field (ANSI, NULL–terminated string) */
859 DWORD cbDeviceNameOffset
;
860 /* Type of the network provider (WNNC_NET_* defined in winnetwk.h) */
861 DWORD dwNetworkProviderType
;
862 } SHELL_LINK_INFO_CNR_LINKA
, *LPSHELL_LINK_INFO_CNR_LINKA
;
864 typedef struct tagSHELL_LINK_INFO_CNR_LINKW
866 /* Size of the CommonNetworkRelativeLink field (>= 0x00000014) */
868 /* Specifies which fields are present/populated (SLI_CNR_*) */
870 /* Offset of the NetName field (ANSI, NULL–terminated string) */
871 DWORD cbNetNameOffset
;
872 /* Offset of the DeviceName field (ANSI, NULL–terminated string) */
873 DWORD cbDeviceNameOffset
;
874 /* Type of the network provider (WNNC_NET_* defined in winnetwk.h) */
875 DWORD dwNetworkProviderType
;
876 /* Offset of the NetNameUnicode field (Unicode, NULL–terminated string) */
877 DWORD cbNetNameUnicodeOffset
;
878 /* Offset of the DeviceNameUnicode field (Unicode, NULL–terminated string) */
879 DWORD cbDeviceNameUnicodeOffset
;
880 } SHELL_LINK_INFO_CNR_LINKW
, *LPSHELL_LINK_INFO_CNR_LINKW
;
882 /* DeviceName is present */
883 #define SLI_CNR_VALID_DEVICE 0x00000001
884 /* NetworkProviderType is present */
885 #define SLI_CNR_VALID_NET_TYPE 0x00000002
887 /*****************************************************************************
888 * Shell Link Extra Data (IShellLinkDataList)
890 typedef struct tagEXP_TRACKER
892 /* .cbSize = 0x00000060, .dwSignature = 0xa0000003 */
893 DATABLOCK_HEADER dbh
;
894 /* Length >= 0x00000058 */
896 /* Must be 0x00000000 */
898 /* NetBIOS name (ANSI, unused bytes are set to zero) */
899 CHAR szMachineID
[16]; /* "variable" >= 16 (?) */
900 /* Some GUIDs for the Link Tracking service (from the FS?) */
901 GUID guidDroidVolume
;
902 GUID guidDroidObject
;
903 GUID guidDroidBirthVolume
;
904 GUID guidDroidBirthObject
;
905 } EXP_TRACKER
, *LPEXP_TRACKER
;
907 typedef struct tagEXP_SHIM
909 /* .cbSize >= 0x00000088, .dwSignature = 0xa0000008 */
910 DATABLOCK_HEADER dbh
;
911 /* Name of a shim layer to apply (Unicode, unused bytes are set to zero) */
912 WCHAR szwLayerName
[64]; /* "variable" >= 64 */
913 } EXP_SHIM
, *LPEXP_SHIM
;
915 typedef struct tagEXP_KNOWN_FOLDER
917 /* .cbSize = 0x0000001c, .dwSignature = 0xa000000b */
918 DATABLOCK_HEADER dbh
;
919 /* A GUID value that identifies a known folder */
920 GUID guidKnownFolder
;
921 /* Specifies the location of the ItemID of the first child
922 segment of the IDList specified by guidKnownFolder */
924 } EXP_KNOWN_FOLDER
, *LPEXP_KNOWN_FOLDER
;
926 typedef struct tagEXP_VISTA_ID_LIST
928 /* .cbSize >= 0x0000000a, .dwSignature = 0xa000000c */
929 DATABLOCK_HEADER dbh
;
930 /* Specifies an alternate IDList that can be used instead
931 of the "normal" IDList (SLDF_HAS_ID_LIST) */
932 /* LPITEMIDLIST pIDList; (variable) */
933 } EXP_VISTA_ID_LIST
, *LPEXP_VISTA_ID_LIST
;
935 #define EXP_TRACKER_SIG 0xa0000003
936 #define EXP_SHIM_SIG 0xa0000008
937 #define EXP_KNOWN_FOLDER_SIG 0xa000000b
938 #define EXP_VISTA_ID_LIST_SIG 0xa000000c
944 #endif /* defined(__cplusplus) */
946 #endif /* __WINE_UNDOCSHELL_H */