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 /* Removes the browse button */
96 #define RFF_NODEFAULT 0x02 /* No default item selected */
97 #define RFF_CALCDIRECTORY 0x04 /* Calculates the working directory from the file name */
98 #define RFF_NOLABEL 0x08 /* Removes the edit box label */
99 #define RFF_NOSEPARATEMEM 0x20 /* Removes the Separate Memory Space check box (Windows NT only) */
101 /* RunFileFlg notification value and structure */
102 #define RFN_VALIDATE (-510)
103 #if 0 // Deprecated ANSI structure
104 typedef struct _NMRUNFILEDLGA
110 } NMRUNFILEDLGA
, *PNMRUNFILEDLGA
, *LPNMRUNFILEDLGA
;
112 typedef struct _NMRUNFILEDLGW
118 } NMRUNFILEDLGW
, *PNMRUNFILEDLGW
, *LPNMRUNFILEDLGW
;
120 typedef NMRUNFILEDLGW NMRUNFILEDLG
;
121 typedef PNMRUNFILEDLGW PNMRUNFILEDLG
;
122 typedef LPNMRUNFILEDLGW LPNMRUNFILEDLG
;
124 /* RunFileDlg notification return values */
126 #define RF_CANCEL 0x01
127 #define RF_RETRY 0x02
129 void WINAPI
RunFileDlg(
132 LPCWSTR lpstrDirectory
,
134 LPCWSTR lpstrDescription
,
137 int WINAPI
LogoffWindowsDialog(HWND hWndOwner
);
138 void WINAPI
ExitWindowsDialog(HWND hWndOwner
);
140 BOOL WINAPI
SHFindComputer(
141 LPCITEMIDLIST pidlRoot
,
142 LPCITEMIDLIST pidlSavedSearch
);
144 void WINAPI
SHHandleDiskFull(HWND hwndOwner
,
147 int WINAPI
SHOutOfMemoryMessageBox(
152 DWORD WINAPI
SHNetConnectionDialog(
154 LPCWSTR lpstrRemoteName
,
157 /****************************************************************************
158 * Cabinet Window Messages
161 #define CWM_SETPATH (WM_USER + 2)
162 #define CWM_WANTIDLE (WM_USER + 3)
163 #define CWM_GETSETCURRENTINFO (WM_USER + 4)
164 #define CWM_SELECTITEM (WM_USER + 5)
165 #define CWM_SELECTITEMSTR (WM_USER + 6)
166 #define CWM_GETISHELLBROWSER (WM_USER + 7)
167 #define CWM_TESTPATH (WM_USER + 9)
168 #define CWM_STATECHANGE (WM_USER + 10)
169 #define CWM_GETPATH (WM_USER + 12)
171 #define WM_GETISHELLBROWSER CWM_GETISHELLBROWSER
173 /* CWM_TESTPATH types */
174 #define CWTP_ISEQUAL 0
175 #define CWTP_ISCHILD 1
177 /* CWM_TESTPATH structure */
182 } CWTESTPATHSTRUCT
,* LPCWTESTPATHSTRUCT
;
184 /****************************************************************************
185 * System Imagelist Routines
188 int WINAPI
Shell_GetCachedImageIndexA(
193 BOOL WINAPI
Shell_GetImageLists(
194 HIMAGELIST
*lphimlLarge
,
195 HIMAGELIST
*lphimlSmall
);
197 HICON WINAPI
SHGetFileIcon(
200 DWORD dwFileAttributes
,
203 BOOL WINAPI
FileIconInit(BOOL bFullInit
);
205 /****************************************************************************
208 /* FileMenu_Create nSelHeight constants */
209 #define FM_DEFAULT_SELHEIGHT -1
210 #define FM_FULL_SELHEIGHT 0
212 /* FileMenu_Create flags */
213 #define FMF_SMALL_ICONS 0x00
214 #define FMF_LARGE_ICONS 0x08
215 #define FMF_NO_COLUMN_BREAK 0x10
217 HMENU WINAPI
FileMenu_Create(
218 COLORREF crBorderColor
,
224 void WINAPI
FileMenu_Destroy(HMENU hMenu
);
226 /* FileMenu_AppendItem constants */
227 #define FM_SEPARATOR (LPCSTR)1
228 #define FM_BLANK_ICON -1
229 #define FM_DEFAULT_HEIGHT 0
231 BOOL WINAPI
FileMenu_AppendItem(
239 /* FileMenu_InsertUsingPidl flags */
240 #define FMF_NO_EMPTY_ITEM 0x01
241 #define FMF_NO_PROGRAM_GROUPS 0x04
243 /* FileMenu_InsertUsingPidl callback function */
244 typedef void (CALLBACK
*LPFNFMCALLBACK
)(LPCITEMIDLIST pidlFolder
, LPCITEMIDLIST pidlFile
);
246 int WINAPI
FileMenu_InsertUsingPidl(
252 LPFNFMCALLBACK lpfnCallback
);
254 int WINAPI
FileMenu_ReplaceUsingPidl(
259 LPFNFMCALLBACK lpfnCallback
);
261 void WINAPI
FileMenu_Invalidate(HMENU hMenu
);
263 HMENU WINAPI
FileMenu_FindSubMenuByPidl(
267 BOOL WINAPI
FileMenu_TrackPopupMenuEx(
275 BOOL WINAPI
FileMenu_GetLastSelectedItemPidls(
277 LPCITEMIDLIST
*ppidlFolder
,
278 LPCITEMIDLIST
*ppidlItem
);
280 LRESULT WINAPI
FileMenu_MeasureItem(
282 LPMEASUREITEMSTRUCT lpmis
);
284 LRESULT WINAPI
FileMenu_DrawItem(
286 LPDRAWITEMSTRUCT lpdis
);
288 BOOL WINAPI
FileMenu_InitMenuPopup(HMENU hMenu
);
290 void WINAPI
FileMenu_AbortInitMenu(void);
292 LRESULT WINAPI
FileMenu_HandleMenuChar(
296 BOOL WINAPI
FileMenu_DeleteAllItems(HMENU hMenu
);
298 BOOL WINAPI
FileMenu_DeleteItemByCmd(
302 BOOL WINAPI
FileMenu_DeleteItemByIndex(
306 BOOL WINAPI
FileMenu_DeleteMenuItemByFirstID(
310 BOOL WINAPI
FileMenu_DeleteSeparator(HMENU hMenu
);
312 BOOL WINAPI
FileMenu_EnableItemByCmd(
317 DWORD WINAPI
FileMenu_GetItemExtent(
321 int WINAPI
FileMenu_AppendFilesForPidl(
326 int WINAPI
FileMenu_AddFilesForPidl(
333 LPFNFMCALLBACK lpfnCallback
);
335 /****************************************************************************
336 * Drag And Drop Routines
339 HRESULT WINAPI
SHRegisterDragDrop(
341 LPDROPTARGET lpDropTarget
);
343 HRESULT WINAPI
SHRevokeDragDrop(HWND hWnd
);
345 BOOL WINAPI
DAD_DragEnter(HWND hWnd
);
347 BOOL WINAPI
DAD_SetDragImageFromListView(
351 BOOL WINAPI
DAD_ShowDragImage(BOOL bShow
);
353 /****************************************************************************
354 * Path Manipulation Routines
357 BOOL WINAPI
PathAppendAW(LPVOID lpszPath1
, LPCVOID lpszPath2
);
359 LPVOID WINAPI
PathCombineAW(LPVOID szDest
, LPCVOID lpszDir
, LPCVOID lpszFile
);
361 LPVOID WINAPI
PathAddBackslashAW(LPVOID path
);
363 LPVOID WINAPI
PathBuildRootAW(LPVOID lpszPath
, int drive
);
365 LPVOID WINAPI
PathFindExtensionAW(LPCVOID path
);
367 LPVOID WINAPI
PathFindFileNameAW(LPCVOID path
);
369 LPVOID WINAPI
PathGetExtensionAW(LPCVOID lpszPath
, DWORD void1
, DWORD void2
);
371 LPVOID WINAPI
PathGetArgsAW(LPVOID lpszPath
);
373 BOOL WINAPI
PathRemoveFileSpecAW(LPVOID lpszPath
);
375 void WINAPI
PathRemoveBlanksAW(LPVOID lpszPath
);
377 VOID WINAPI
PathQuoteSpacesAW(LPVOID path
);
379 void WINAPI
PathUnquoteSpacesAW(LPVOID lpszPath
);
381 BOOL WINAPI
PathIsUNCAW(LPCVOID lpszPath
);
383 BOOL WINAPI
PathIsRelativeAW(LPCVOID lpszPath
);
385 BOOL WINAPI
PathIsRootAW(LPCVOID x
);
387 BOOL WINAPI
PathIsExeAW(LPCVOID lpszPath
);
389 BOOL WINAPI
PathIsDirectoryAW(LPCVOID lpszPath
);
391 BOOL WINAPI
PathFileExistsAW(LPCVOID lpszPath
);
393 BOOL WINAPI
PathMatchSpecAW(LPVOID lpszPath
, LPVOID lpszSpec
);
395 BOOL WINAPI
PathMakeUniqueNameAW(
398 LPCVOID lpszShortName
,
399 LPCVOID lpszLongName
,
400 LPCVOID lpszPathName
);
402 BOOL WINAPI
PathYetAnotherMakeUniqueName(
404 LPCWSTR lpszPathName
,
405 LPCWSTR lpszShortName
,
406 LPCWSTR lpszLongName
);
408 BOOL WINAPI
PathQualifyAW(LPCVOID path
);
411 /* PathResolve flags */
412 #define PRF_CHECKEXISTANCE 0x01
413 #define PRF_EXECUTABLE 0x02
414 #define PRF_QUALIFYONPATH 0x04
415 #define PRF_WINDOWS31 0x08
417 BOOL WINAPI
PathResolveAW(LPVOID lpszPath
, LPCVOID
*alpszPaths
, DWORD dwFlags
);
419 VOID WINAPI
PathSetDlgItemPathAW(HWND hDlg
, int nIDDlgItem
, LPCVOID lpszPath
);
421 /* PathProcessCommand flags */
422 #define PPCF_QUOTEPATH 0x01 /* implies PPCF_INCLUDEARGS */
423 #define PPCF_INCLUDEARGS 0x02
424 //#define PPCF_NODIRECTORIES 0x10 move to shlobj
425 #define PPCF_DONTRESOLVE 0x20
426 #define PPCF_PATHISRELATIVE 0x40
428 HRESULT WINAPI
PathProcessCommandAW(LPCVOID lpszPath
, LPVOID lpszBuff
,
429 DWORD dwBuffSize
, DWORD dwFlags
);
431 void WINAPI
PathStripPathAW(LPVOID lpszPath
);
433 BOOL WINAPI
PathStripToRootAW(LPVOID lpszPath
);
435 void WINAPI
PathRemoveArgsAW(LPVOID lpszPath
);
437 void WINAPI
PathRemoveExtensionAW(LPVOID lpszPath
);
439 int WINAPI
PathParseIconLocationAW(LPVOID lpszPath
);
441 BOOL WINAPI
PathIsSameRootAW(LPCVOID lpszPath1
, LPCVOID lpszPath2
);
443 BOOL WINAPI
PathFindOnPathAW(LPVOID sFile
, LPCVOID
*sOtherDirs
);
445 /****************************************************************************
446 * Shell File Operations error codes
449 /* Error codes could be pre-Win32 */
450 #define DE_SAMEFILE 0x71
451 #define DE_MANYSRC1DEST 0x72
452 #define DE_DIFFDIR 0x73
453 #define DE_OPCANCELLED 0x75
454 #define DE_DESTSUBTREE 0x76
455 #define DE_INVALIDFILES 0x7C
456 #define DE_DESTSAMETREE 0x7D
457 #define DE_FLDDESTISFILE 0x7E
458 #define DE_FILEDESTISFLD 0x80
460 /****************************************************************************
461 * Shell Namespace Routines
464 /* Generic structure used by several messages */
471 } SFVCBINFO
, * LPSFVCBINFO
;
472 typedef const SFVCBINFO
* LPCSFVCBINFO
;
474 /* SFVCB_SELECTIONCHANGED structure */
481 } SFVSELECTSTATE
, * LPSFVSELECTSTATE
;
482 typedef const SFVSELECTSTATE
* LPCSFVSELECTSTATE
;
484 /* SFVCB_COPYHOOKCALLBACK structure */
494 } SFVCOPYHOOKINFO
, * LPSFVCOPYHOOKINFO
;
495 typedef const SFVCOPYHOOKINFO
* LPCSFVCOPYHOOKINFO
;
497 /* SFVCB_GETDETAILSOF structure */
504 } SFVCOLUMNINFO
, * LPSFVCOLUMNINFO
;
506 /****************************************************************************
510 /* SHWaitForFileToOpen flags */
511 #define SHWFF_ADD 0x01
512 #define SHWFF_REMOVE 0x02
513 #define SHWFF_WAIT 0x04
515 BOOL WINAPI
SHWaitForFileToOpen(
520 WORD WINAPI
ArrangeWindows(
525 CONST HWND
* lpKids
);
527 /* RegisterShellHook types */
528 #define RSH_DEREGISTER 0
529 #define RSH_REGISTER 1
530 #define RSH_REGISTER_PROGMAN 2
531 #define RSH_REGISTER_TASKMAN 3
533 BOOL WINAPI
RegisterShellHook(
537 /* SHCreateDefClassObject callback function */
538 typedef HRESULT (CALLBACK
*LPFNCDCOCALLBACK
)(
543 HRESULT WINAPI
SHCreateDefClassObject(
546 LPFNCDCOCALLBACK lpfnCallback
,
550 void WINAPI
SHFreeUnusedLibraries(void);
552 /* SHCreateLinks flags */
553 #define SHCLF_PREFIXNAME 0x01
554 #define SHCLF_CREATEONDESKTOP 0x02
556 HRESULT WINAPI
SHCreateLinks(
559 LPDATAOBJECT lpDataObject
,
561 LPITEMIDLIST
*lppidlLinks
);
563 DWORD WINAPI
CheckEscapesA(LPSTR string
, DWORD len
);
564 DWORD WINAPI
CheckEscapesW(LPWSTR string
, DWORD len
);
566 /* policy functions */
567 BOOL WINAPI
SHInitRestricted(LPCVOID unused
, LPCVOID inpRegKey
);
569 #define CSIDL_FOLDER_MASK 0x00ff
571 /* Utility functions */
575 INT WINAPI
Shell_GetCachedImageIndex(LPCWSTR szPath
, INT nIndex
, UINT bSimulateDoc
);
577 HRESULT WINAPI
SHGetImageList(int iImageList
, REFIID riid
, void **ppv
);
579 BOOL WINAPI
GUIDFromStringW(
585 Win32DbgPrint(const char *filename
, int line
, const char *lpFormat
, ...)
593 fname
= strrchr(filename
, '\\');
596 fname
= strrchr(filename
, '/');
606 szMsgStart
= szMsg
+ sprintf(szMsg
, "%s:%d: ", fname
, line
);
608 va_start(vl
, lpFormat
);
609 uRet
= (ULONG
) vsprintf(szMsgStart
, lpFormat
, vl
);
612 OutputDebugStringA(szMsg
);
617 #define DbgPrint(fmt, ...) \
618 Win32DbgPrint(__FILE__, __LINE__, fmt, ##__VA_ARGS__)
620 static inline void DbgDumpMenuInternal(HMENU hmenu
, char* padding
, int padlevel
)
624 int count
= GetMenuItemCount(hmenu
);
626 padding
[padlevel
] = '.';
627 padding
[padlevel
+ 1] = '.';
628 padding
[padlevel
+ 2] = 0;
630 for (i
= 0; i
< count
; i
++)
632 MENUITEMINFOW mii
= { 0 };
634 mii
.cbSize
= sizeof(mii
);
635 mii
.fMask
= MIIM_STRING
| MIIM_FTYPE
| MIIM_SUBMENU
| MIIM_STATE
| MIIM_ID
;
636 mii
.dwTypeData
= label
;
637 mii
.cch
= _countof(label
);
639 GetMenuItemInfoW(hmenu
, i
, TRUE
, &mii
);
641 if (mii
.fType
& MFT_BITMAP
)
642 DbgPrint("%s%2d - %08x: BITMAP %08p (state=%d, has submenu=%s)\n", padding
, i
, mii
.wID
, mii
.hbmpItem
, mii
.fState
, mii
.hSubMenu
? "TRUE" : "FALSE");
643 else if (mii
.fType
& MFT_SEPARATOR
)
644 DbgPrint("%s%2d - %08x ---SEPARATOR---\n", padding
, i
, mii
.wID
);
646 DbgPrint("%s%2d - %08x: %S (state=%d, has submenu=%s)\n", padding
, i
, mii
.wID
, mii
.dwTypeData
, mii
.fState
, mii
.hSubMenu
? "TRUE" : "FALSE");
649 DbgDumpMenuInternal(mii
.hSubMenu
, padding
, padlevel
+ 2);
653 padding
[padlevel
] = 0;
656 static __inline
void DbgDumpMenu(HMENU hmenu
)
659 DbgDumpMenuInternal(hmenu
, padding
, 0);
664 void DumpIdList(LPCITEMIDLIST pcidl
)
666 DbgPrint("Begin IDList Dump\n");
668 for (; pcidl
!= NULL
; pcidl
= ILGetNext(pcidl
))
671 int cb
= pcidl
->mkid
.cb
;
672 BYTE
* sh
= (BYTE
*) &(pcidl
->mkid
);
673 if (cb
== 0) // ITEMIDLISTs are terminatedwith a null SHITEMID.
675 DbgPrint("Begin SHITEMID (cb=%d)\n", cb
);
677 DbgPrint(" - WARNING: cb is not a multiple of 4\n");
678 for (i
= 0; (i
+ 4) <= cb
; i
+= 4)
680 DbgPrint(" - abID[%08x]: %02x %02x %02x %02x\n",
692 DbgPrint(" - abID[%08x]: %02x %02x %02x --\n",
700 DbgPrint(" - abID[%08x]: %02x %02x -- --\n",
707 DbgPrint(" - abID[%08x]: %02x -- -- --\n",
712 DbgPrint("End SHITEMID\n");
714 DbgPrint("End IDList Dump.\n");
718 /*****************************************************************************
721 // these resources are in shell32.dll
722 #define IDB_GOBUTTON_NORMAL 0x0e6
723 #define IDB_GOBUTTON_HOT 0x0e7
725 // band ids in internet toolbar
726 #define ITBBID_MENUBAND 1
727 #define ITBBID_BRANDBAND 5
728 #define ITBBID_TOOLSBAND 2
729 #define ITBBID_ADDRESSBAND 4
731 // commands in the CGID_PrivCITCommands command group handled by the internet toolbar
732 // there seems to be some support for hiding the menubar and an auto hide feature that are
733 // unavailable in the UI
734 #define ITID_TEXTLABELS 3
735 #define ITID_TOOLBARBANDSHOWN 4
736 #define ITID_ADDRESSBANDSHOWN 5
737 #define ITID_LINKSBANDSHOWN 6
738 #define ITID_MENUBANDSHOWN 12
739 #define ITID_AUTOHIDEENABLED 13
740 #define ITID_CUSTOMIZEENABLED 20
741 #define ITID_TOOLBARLOCKED 27
743 // commands in the CGID_BrandCmdGroup command group handled by the brand band
744 #define BBID_STARTANIMATION 1
745 #define BBID_STOPANIMATION 2
747 // undocumented flags for IShellMenu::SetShellFolder
748 #define SMSET_UNKNOWN08 0x08
749 #define SMSET_UNKNOWN10 0x10
751 void WINAPI
ShellDDEInit(BOOL bInit
);
752 DWORD WINAPI
WinList_Init(void);
754 IStream
* WINAPI
SHGetViewStream(LPCITEMIDLIST
, DWORD
, LPCTSTR
, LPCTSTR
, LPCTSTR
);
756 EXTERN_C HRESULT WINAPI
SHCreateSessionKey(REGSAM samDesired
, PHKEY phKey
);
758 /*****************************************************************************
761 #include <pshpack1.h>
763 typedef struct tagSHELL_LINK_HEADER
765 /* The size of this structure (always 0x0000004C) */
767 /* CLSID = class identifier (always 00021401-0000-0000-C000-000000000046) */
769 /* Flags (SHELL_LINK_DATA_FLAGS) */
771 /* Informations about the link target: */
772 DWORD dwFileAttributes
;
773 FILETIME ftCreationTime
;
774 FILETIME ftLastAccessTime
;
775 FILETIME ftLastWriteTime
;
776 DWORD nFileSizeLow
; /* only the least significant 32 bits */
777 /* The index of an icon (signed?) */
779 /* The expected window state of an application launched by the link */
781 /* The keystrokes used to launch the application */
783 /* Reserved (must be zero) */
787 } SHELL_LINK_HEADER
, *LPSHELL_LINK_HEADER
;
789 /*****************************************************************************
791 * If cbHeaderSize == 0x0000001C then use SHELL_LINK_INFOA
792 * If cbHeaderSize >= 0x00000024 then use SHELL_LINK_INFOW
794 typedef struct tagSHELL_LINK_INFOA
796 /* Size of the link info data */
798 /* Size of this structure (ANSI: = 0x0000001C) */
800 /* Specifies which fields are present/populated (SLI_*) */
802 /* Offset of the VolumeID field (SHELL_LINK_INFO_VOLUME_ID) */
803 DWORD cbVolumeIDOffset
;
804 /* Offset of the LocalBasePath field (ANSI, NULL-terminated string) */
805 DWORD cbLocalBasePathOffset
;
806 /* Offset of the CommonNetworkRelativeLink field (SHELL_LINK_INFO_CNR_LINK) */
807 DWORD cbCommonNetworkRelativeLinkOffset
;
808 /* Offset of the CommonPathSuffix field (ANSI, NULL-terminated string) */
809 DWORD cbCommonPathSuffixOffset
;
810 } SHELL_LINK_INFOA
, *LPSHELL_LINK_INFOA
;
812 typedef struct tagSHELL_LINK_INFOW
814 /* Size of the link info data */
816 /* Size of this structure (Unicode: >= 0x00000024) */
818 /* Specifies which fields are present/populated (SLI_*) */
820 /* Offset of the VolumeID field (SHELL_LINK_INFO_VOLUME_ID) */
821 DWORD cbVolumeIDOffset
;
822 /* Offset of the LocalBasePath field (ANSI, NULL-terminated string) */
823 DWORD cbLocalBasePathOffset
;
824 /* Offset of the CommonNetworkRelativeLink field (SHELL_LINK_INFO_CNR_LINK) */
825 DWORD cbCommonNetworkRelativeLinkOffset
;
826 /* Offset of the CommonPathSuffix field (ANSI, NULL-terminated string) */
827 DWORD cbCommonPathSuffixOffset
;
828 /* Offset of the LocalBasePathUnicode field (Unicode, NULL-terminated string) */
829 DWORD cbLocalBasePathUnicodeOffset
;
830 /* Offset of the CommonPathSuffixUnicode field (Unicode, NULL-terminated string) */
831 DWORD cbCommonPathSuffixUnicodeOffset
;
832 } SHELL_LINK_INFOW
, *LPSHELL_LINK_INFOW
;
834 /* VolumeID, LocalBasePath, LocalBasePathUnicode(cbHeaderSize >= 0x24) are present */
835 #define SLI_VALID_LOCAL 0x00000001
836 /* CommonNetworkRelativeLink is present */
837 #define SLI_VALID_NETWORK 0x00000002
839 /*****************************************************************************
840 * SHELL_LINK_INFO_VOLUME_IDA/W
841 * If cbVolumeLabelOffset != 0x00000014 (should be 0x00000010) then use
842 * SHELL_LINK_INFO_VOLUME_IDA
843 * If cbVolumeLabelOffset == 0x00000014 then use SHELL_LINK_INFO_VOLUME_IDW
845 typedef struct tagSHELL_LINK_INFO_VOLUME_IDA
847 /* Size of the VolumeID field (> 0x00000010) */
849 /* Drive type of the drive the link target is stored on (DRIVE_*) */
851 /* Serial number of the volume the link target is stored on */
852 DWORD nDriveSerialNumber
;
853 /* Offset of the volume label (ANSI, NULL-terminated string).
854 Must be != 0x00000014 (see tagSHELL_LINK_INFO_VOLUME_IDW) */
855 DWORD cbVolumeLabelOffset
;
856 } SHELL_LINK_INFO_VOLUME_IDA
, *LPSHELL_LINK_INFO_VOLUME_IDA
;
858 typedef struct tagSHELL_LINK_INFO_VOLUME_IDW
860 /* Size of the VolumeID field (> 0x00000010) */
862 /* Drive type of the drive the link target is stored on (DRIVE_*) */
864 /* Serial number of the volume the link target is stored on */
865 DWORD nDriveSerialNumber
;
866 /* Offset of the volume label (ANSI, NULL-terminated string).
867 If the value of this field is 0x00000014, ignore it and use
868 cbVolumeLabelUnicodeOffset! */
869 DWORD cbVolumeLabelOffset
;
870 /* Offset of the volume label (Unicode, NULL-terminated string).
871 If the value of the VolumeLabelOffset field is not 0x00000014,
872 this field must be ignored (==> it doesn't exists ==> ANSI). */
873 DWORD cbVolumeLabelUnicodeOffset
;
874 } SHELL_LINK_INFO_VOLUME_IDW
, *LPSHELL_LINK_INFO_VOLUME_IDW
;
876 /*****************************************************************************
877 * SHELL_LINK_INFO_CNR_LINKA/W (CNR = Common Network Relative)
878 * If cbNetNameOffset == 0x00000014 then use SHELL_LINK_INFO_CNR_LINKA
879 * If cbNetNameOffset > 0x00000014 then use SHELL_LINK_INFO_CNR_LINKW
881 typedef struct tagSHELL_LINK_INFO_CNR_LINKA
883 /* Size of the CommonNetworkRelativeLink field (>= 0x00000014) */
885 /* Specifies which fields are present/populated (SLI_CNR_*) */
887 /* Offset of the NetName field (ANSI, NULL–terminated string) */
888 DWORD cbNetNameOffset
;
889 /* Offset of the DeviceName field (ANSI, NULL–terminated string) */
890 DWORD cbDeviceNameOffset
;
891 /* Type of the network provider (WNNC_NET_* defined in winnetwk.h) */
892 DWORD dwNetworkProviderType
;
893 } SHELL_LINK_INFO_CNR_LINKA
, *LPSHELL_LINK_INFO_CNR_LINKA
;
895 typedef struct tagSHELL_LINK_INFO_CNR_LINKW
897 /* Size of the CommonNetworkRelativeLink field (>= 0x00000014) */
899 /* Specifies which fields are present/populated (SLI_CNR_*) */
901 /* Offset of the NetName field (ANSI, NULL–terminated string) */
902 DWORD cbNetNameOffset
;
903 /* Offset of the DeviceName field (ANSI, NULL–terminated string) */
904 DWORD cbDeviceNameOffset
;
905 /* Type of the network provider (WNNC_NET_* defined in winnetwk.h) */
906 DWORD dwNetworkProviderType
;
907 /* Offset of the NetNameUnicode field (Unicode, NULL–terminated string) */
908 DWORD cbNetNameUnicodeOffset
;
909 /* Offset of the DeviceNameUnicode field (Unicode, NULL–terminated string) */
910 DWORD cbDeviceNameUnicodeOffset
;
911 } SHELL_LINK_INFO_CNR_LINKW
, *LPSHELL_LINK_INFO_CNR_LINKW
;
913 /* DeviceName is present */
914 #define SLI_CNR_VALID_DEVICE 0x00000001
915 /* NetworkProviderType is present */
916 #define SLI_CNR_VALID_NET_TYPE 0x00000002
918 /*****************************************************************************
919 * Shell Link Extra Data (IShellLinkDataList)
921 typedef struct tagEXP_TRACKER
923 /* .cbSize = 0x00000060, .dwSignature = 0xa0000003 */
924 DATABLOCK_HEADER dbh
;
925 /* Length >= 0x00000058 */
927 /* Must be 0x00000000 */
929 /* NetBIOS name (ANSI, unused bytes are set to zero) */
930 CHAR szMachineID
[16]; /* "variable" >= 16 (?) */
931 /* Some GUIDs for the Link Tracking service (from the FS?) */
932 GUID guidDroidVolume
;
933 GUID guidDroidObject
;
934 GUID guidDroidBirthVolume
;
935 GUID guidDroidBirthObject
;
936 } EXP_TRACKER
, *LPEXP_TRACKER
;
938 typedef struct tagEXP_SHIM
940 /* .cbSize >= 0x00000088, .dwSignature = 0xa0000008 */
941 DATABLOCK_HEADER dbh
;
942 /* Name of a shim layer to apply (Unicode, unused bytes are set to zero) */
943 WCHAR szwLayerName
[64]; /* "variable" >= 64 */
944 } EXP_SHIM
, *LPEXP_SHIM
;
946 typedef struct tagEXP_KNOWN_FOLDER
948 /* .cbSize = 0x0000001c, .dwSignature = 0xa000000b */
949 DATABLOCK_HEADER dbh
;
950 /* A GUID value that identifies a known folder */
951 GUID guidKnownFolder
;
952 /* Specifies the location of the ItemID of the first child
953 segment of the IDList specified by guidKnownFolder */
955 } EXP_KNOWN_FOLDER
, *LPEXP_KNOWN_FOLDER
;
957 typedef struct tagEXP_VISTA_ID_LIST
959 /* .cbSize >= 0x0000000a, .dwSignature = 0xa000000c */
960 DATABLOCK_HEADER dbh
;
961 /* Specifies an alternate IDList that can be used instead
962 of the "normal" IDList (SLDF_HAS_ID_LIST) */
963 /* LPITEMIDLIST pIDList; (variable) */
964 } EXP_VISTA_ID_LIST
, *LPEXP_VISTA_ID_LIST
;
966 #define EXP_TRACKER_SIG 0xa0000003
967 #define EXP_SHIM_SIG 0xa0000008
968 #define EXP_KNOWN_FOLDER_SIG 0xa000000b
969 #define EXP_VISTA_ID_LIST_SIG 0xa000000c
975 #endif /* defined(__cplusplus) */
977 #endif /* __WINE_UNDOCSHELL_H */