From 800947d692df1f99dbd0c2d8ada3d3d48a0e2da8 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Sat, 4 May 2013 20:43:16 +0000 Subject: [PATCH] [PSDK] * Add NT_CONSOLE_PROPS and NT_FE_CONSOLE_PROPS and fix EXP_SZ_LINK. * Add SHELL_LINK_INFO_* and some Shell Link Extra Data structures (for IShellLinkDataList). [USERINIT][CPLS][DLLS] * Add the now necessary wincon.h inclusion. * Brought to you by Dominik Hornung. CORE-7162 #resolve #comment Committed in r58930. Danke ! svn path=/trunk/; revision=58930 --- .../applications/mscutils/servman/precomp.h | 1 + reactos/base/applications/mstsc/precomp.h | 1 + reactos/base/applications/rapps/rapps.h | 1 + reactos/base/shell/explorer-new/precomp.h | 1 + reactos/base/shell/explorer/precomp.h | 1 + reactos/base/system/userinit/userinit.c | 1 + reactos/dll/cpl/desk/desk.h | 1 + reactos/dll/cpl/main/main.h | 1 + reactos/dll/cpl/sysdm/precomp.h | 1 + reactos/dll/shellext/deskadp/precomp.h | 1 + reactos/dll/shellext/deskmon/precomp.h | 1 + reactos/dll/shellext/slayer/precomp.h | 1 + reactos/dll/win32/browseui/precomp.h | 1 + reactos/dll/win32/comdlg32/cdlg.h | 1 + reactos/dll/win32/comdlg32/filedlgbrowser.h | 1 + reactos/dll/win32/ieframe/ieframe.h | 1 + reactos/dll/win32/msi/package.c | 1 + reactos/dll/win32/newdev/newdev_private.h | 1 + reactos/dll/win32/setupapi/setupapi_private.h | 1 + reactos/dll/win32/shell32/precomp.h | 1 + reactos/dll/win32/shlwapi/ordinal.c | 1 + reactos/dll/win32/syssetup/precomp.h | 1 + reactos/include/psdk/shlobj.h | 47 ++++- reactos/include/psdk/shlobj_undoc.h | 183 ++++++++++++++++++ 24 files changed, 244 insertions(+), 8 deletions(-) diff --git a/reactos/base/applications/mscutils/servman/precomp.h b/reactos/base/applications/mscutils/servman/precomp.h index fa94a159387..9bde57022b5 100644 --- a/reactos/base/applications/mscutils/servman/precomp.h +++ b/reactos/base/applications/mscutils/servman/precomp.h @@ -11,6 +11,7 @@ #include #include #include /* GET_X/Y_LPARAM */ +#include #include #include #include diff --git a/reactos/base/applications/mstsc/precomp.h b/reactos/base/applications/mstsc/precomp.h index 8f1601ce3c8..75061933ba3 100644 --- a/reactos/base/applications/mstsc/precomp.h +++ b/reactos/base/applications/mstsc/precomp.h @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/reactos/base/applications/rapps/rapps.h b/reactos/base/applications/rapps/rapps.h index dd216ce3f0b..4c97d2ee3e4 100644 --- a/reactos/base/applications/rapps/rapps.h +++ b/reactos/base/applications/rapps/rapps.h @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/reactos/base/shell/explorer-new/precomp.h b/reactos/base/shell/explorer-new/precomp.h index 3ccceb181d0..343f06b7b31 100644 --- a/reactos/base/shell/explorer-new/precomp.h +++ b/reactos/base/shell/explorer-new/precomp.h @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/reactos/base/shell/explorer/precomp.h b/reactos/base/shell/explorer/precomp.h index 1caf6f50d5e..ccc73ff8381 100644 --- a/reactos/base/shell/explorer/precomp.h +++ b/reactos/base/shell/explorer/precomp.h @@ -37,6 +37,7 @@ #include #include #include +#include #include #include diff --git a/reactos/base/system/userinit/userinit.c b/reactos/base/system/userinit/userinit.c index e1a6fd23f55..7362a10733c 100644 --- a/reactos/base/system/userinit/userinit.c +++ b/reactos/base/system/userinit/userinit.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/reactos/dll/cpl/desk/desk.h b/reactos/dll/cpl/desk/desk.h index 1ebe2b480b6..c714b4182e1 100644 --- a/reactos/dll/cpl/desk/desk.h +++ b/reactos/dll/cpl/desk/desk.h @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/reactos/dll/cpl/main/main.h b/reactos/dll/cpl/main/main.h index b2dbf13419c..596e62b68da 100644 --- a/reactos/dll/cpl/main/main.h +++ b/reactos/dll/cpl/main/main.h @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/reactos/dll/cpl/sysdm/precomp.h b/reactos/dll/cpl/sysdm/precomp.h index bf52f3aeb03..279167cedb9 100644 --- a/reactos/dll/cpl/sysdm/precomp.h +++ b/reactos/dll/cpl/sysdm/precomp.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/reactos/dll/shellext/deskadp/precomp.h b/reactos/dll/shellext/deskadp/precomp.h index f8bad53e5c5..9c9cfad512d 100644 --- a/reactos/dll/shellext/deskadp/precomp.h +++ b/reactos/dll/shellext/deskadp/precomp.h @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/reactos/dll/shellext/deskmon/precomp.h b/reactos/dll/shellext/deskmon/precomp.h index 564922a2a11..08b565559cd 100644 --- a/reactos/dll/shellext/deskmon/precomp.h +++ b/reactos/dll/shellext/deskmon/precomp.h @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/reactos/dll/shellext/slayer/precomp.h b/reactos/dll/shellext/slayer/precomp.h index b5ea7d54401..c01102214c0 100644 --- a/reactos/dll/shellext/slayer/precomp.h +++ b/reactos/dll/shellext/slayer/precomp.h @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/reactos/dll/win32/browseui/precomp.h b/reactos/dll/win32/browseui/precomp.h index 76bfac8db0a..3bcfc389ca2 100644 --- a/reactos/dll/win32/browseui/precomp.h +++ b/reactos/dll/win32/browseui/precomp.h @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/reactos/dll/win32/comdlg32/cdlg.h b/reactos/dll/win32/comdlg32/cdlg.h index 5f3ac59786e..fd3bf71ecb0 100644 --- a/reactos/dll/win32/comdlg32/cdlg.h +++ b/reactos/dll/win32/comdlg32/cdlg.h @@ -165,6 +165,7 @@ typedef struct { #include "wingdi.h" #include "winuser.h" #include "winnls.h" +#include "wincon.h" #include "commctrl.h" #include "shlobj.h" #include "shellapi.h" diff --git a/reactos/dll/win32/comdlg32/filedlgbrowser.h b/reactos/dll/win32/comdlg32/filedlgbrowser.h index 90402b9d8a3..db82840c7df 100644 --- a/reactos/dll/win32/comdlg32/filedlgbrowser.h +++ b/reactos/dll/win32/comdlg32/filedlgbrowser.h @@ -33,6 +33,7 @@ //#include "windef.h" //#include "winbase.h" //#include "winuser.h" +#include "wincon.h" #include //#include "objbase.h" //#include "commdlg.h" diff --git a/reactos/dll/win32/ieframe/ieframe.h b/reactos/dll/win32/ieframe/ieframe.h index b526130a810..653b73093fe 100644 --- a/reactos/dll/win32/ieframe/ieframe.h +++ b/reactos/dll/win32/ieframe/ieframe.h @@ -31,6 +31,7 @@ #include #include //#include "winuser.h" +#include //#include "ole2.h" //#include "olectl.h" diff --git a/reactos/dll/win32/msi/package.c b/reactos/dll/win32/msi/package.c index d2b67e52bb0..e6d5b6a5f23 100644 --- a/reactos/dll/win32/msi/package.c +++ b/reactos/dll/win32/msi/package.c @@ -33,6 +33,7 @@ //#include "winnls.h" #include #include +#include #include //#include "msi.h" //#include "msiquery.h" diff --git a/reactos/dll/win32/newdev/newdev_private.h b/reactos/dll/win32/newdev/newdev_private.h index e3a7afe362f..533d77139c4 100644 --- a/reactos/dll/win32/newdev/newdev_private.h +++ b/reactos/dll/win32/newdev/newdev_private.h @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/reactos/dll/win32/setupapi/setupapi_private.h b/reactos/dll/win32/setupapi/setupapi_private.h index 88dd35afd08..c85064f0b58 100644 --- a/reactos/dll/win32/setupapi/setupapi_private.h +++ b/reactos/dll/win32/setupapi/setupapi_private.h @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include diff --git a/reactos/dll/win32/shell32/precomp.h b/reactos/dll/win32/shell32/precomp.h index 5a5b5745514..59224ca6be3 100644 --- a/reactos/dll/win32/shell32/precomp.h +++ b/reactos/dll/win32/shell32/precomp.h @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/reactos/dll/win32/shlwapi/ordinal.c b/reactos/dll/win32/shlwapi/ordinal.c index d832d1bbc40..644a400d1a1 100644 --- a/reactos/dll/win32/shlwapi/ordinal.c +++ b/reactos/dll/win32/shlwapi/ordinal.c @@ -43,6 +43,7 @@ //#include "winuser.h" #include #include +#include #include //#include "objbase.h" //#include "exdisp.h" diff --git a/reactos/dll/win32/syssetup/precomp.h b/reactos/dll/win32/syssetup/precomp.h index cbcdc84d937..6dbfee864c0 100644 --- a/reactos/dll/win32/syssetup/precomp.h +++ b/reactos/dll/win32/syssetup/precomp.h @@ -12,6 +12,7 @@ #include #include #include +#include #define NTOS_MODE_USER #include #include diff --git a/reactos/include/psdk/shlobj.h b/reactos/include/psdk/shlobj.h index 973994ae4a1..dc56d23f0de 100644 --- a/reactos/include/psdk/shlobj.h +++ b/reactos/include/psdk/shlobj.h @@ -1449,7 +1449,7 @@ typedef struct { typedef struct { DWORD cbSize; - DWORD cbSignature; + DWORD dwSignature; CHAR szTarget[MAX_PATH]; WCHAR szwTarget[MAX_PATH]; } EXP_SZ_LINK, *LPEXP_SZ_LINK; @@ -1467,14 +1467,45 @@ typedef struct { BYTE abPropertyStorage[1]; } EXP_PROPERTYSTORAGE; -#define EXP_SZ_LINK_SIG 0xa0000001 -#define NT_CONSOLE_PROPS_SIG 0xa0000002 -#define NT_FE_CONSOLE_PROPS_SIG 0xa0000004 -#define EXP_SPECIAL_FOLDER_SIG 0xa0000005 -#define EXP_DARWIN_ID_SIG 0xa0000006 -#define EXP_SZ_ICON_SIG 0xa0000007 +#ifdef LF_FACESIZE +typedef struct { + DATABLOCK_HEADER dbh; + WORD wFillAttribute; + WORD wPopupFillAttribute; + COORD dwScreenBufferSize; + COORD dwWindowSize; + COORD dwWindowOrigin; + DWORD nFont; + DWORD nInputBufferSize; + COORD dwFontSize; + UINT uFontFamily; + UINT uFontWeight; + WCHAR FaceName[LF_FACESIZE]; + UINT uCursorSize; + BOOL bFullScreen; + BOOL bQuickEdit; + BOOL bInsertMode; + BOOL bAutoPosition; + UINT uHistoryBufferSize; + UINT uNumberOfHistoryBuffers; + BOOL bHistoryNoDup; + COLORREF ColorTable[16]; +} NT_CONSOLE_PROPS, *LPNT_CONSOLE_PROPS; +#endif + +typedef struct { + DATABLOCK_HEADER dbh; + UINT uCodePage; +} NT_FE_CONSOLE_PROPS, *LPNT_FE_CONSOLE_PROPS; + +#define EXP_SZ_LINK_SIG 0xa0000001 /* EXP_SZ_LINK */ +#define NT_CONSOLE_PROPS_SIG 0xa0000002 /* NT_CONSOLE_PROPS */ +#define NT_FE_CONSOLE_PROPS_SIG 0xa0000004 /* NT_FE_CONSOLE_PROPS */ +#define EXP_SPECIAL_FOLDER_SIG 0xa0000005 /* EXP_SPECIAL_FOLDER */ +#define EXP_DARWIN_ID_SIG 0xa0000006 /* EXP_DARWIN_LINK */ +#define EXP_SZ_ICON_SIG 0xa0000007 /* EXP_SZ_LINK */ #define EXP_LOGO3_ID_SIG EXP_SZ_ICON_SIG /* Old SDKs only */ -#define EXP_PROPERTYSTORAGE_SIG 0xa0000009 +#define EXP_PROPERTYSTORAGE_SIG 0xa0000009 /* EXP_PROPERTYSTORAGE */ typedef struct _SHChangeDWORDAsIDList { USHORT cb; diff --git a/reactos/include/psdk/shlobj_undoc.h b/reactos/include/psdk/shlobj_undoc.h index 5be8e58d074..8a799cfb563 100644 --- a/reactos/include/psdk/shlobj_undoc.h +++ b/reactos/include/psdk/shlobj_undoc.h @@ -2,6 +2,7 @@ * ReactOS undocumented shell interface * * Copyright 2009 Andrew Hill + * Copyright 2013 Dominik Hornung * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -867,6 +868,188 @@ typedef struct tagSHELL_LINK_HEADER DWORD dwReserved3; } SHELL_LINK_HEADER, *LPSHELL_LINK_HEADER; +/***************************************************************************** + * SHELL_LINK_INFOA/W + * If cbHeaderSize == 0x0000001C then use SHELL_LINK_INFOA + * If cbHeaderSize >= 0x00000024 then use SHELL_LINK_INFOW + */ +typedef struct tagSHELL_LINK_INFOA +{ + /* Size of the link info data */ + DWORD cbSize; + /* Size of this structure (ANSI: = 0x0000001C) */ + DWORD cbHeaderSize; + /* Specifies which fields are present/populated (SLI_*) */ + DWORD dwFlags; + /* Offset of the VolumeID field (SHELL_LINK_INFO_VOLUME_ID) */ + DWORD cbVolumeIDOffset; + /* Offset of the LocalBasePath field (ANSI, NULL-terminated string) */ + DWORD cbLocalBasePathOffset; + /* Offset of the CommonNetworkRelativeLink field (SHELL_LINK_INFO_CNR_LINK) */ + DWORD cbCommonNetworkRelativeLinkOffset; + /* Offset of the CommonPathSuffix field (ANSI, NULL-terminated string) */ + DWORD cbCommonPathSuffixOffset; +} SHELL_LINK_INFOA, *LPSHELL_LINK_INFOA; + +typedef struct tagSHELL_LINK_INFOW +{ + /* Size of the link info data */ + DWORD cbSize; + /* Size of this structure (Unicode: >= 0x00000024) */ + DWORD cbHeaderSize; + /* Specifies which fields are present/populated (SLI_*) */ + DWORD dwFlags; + /* Offset of the VolumeID field (SHELL_LINK_INFO_VOLUME_ID) */ + DWORD cbVolumeIDOffset; + /* Offset of the LocalBasePath field (ANSI, NULL-terminated string) */ + DWORD cbLocalBasePathOffset; + /* Offset of the CommonNetworkRelativeLink field (SHELL_LINK_INFO_CNR_LINK) */ + DWORD cbCommonNetworkRelativeLinkOffset; + /* Offset of the CommonPathSuffix field (ANSI, NULL-terminated string) */ + DWORD cbCommonPathSuffixOffset; + /* Offset of the LocalBasePathUnicode field (Unicode, NULL-terminated string) */ + DWORD cbLocalBasePathUnicodeOffset; + /* Offset of the CommonPathSuffixUnicode field (Unicode, NULL-terminated string) */ + DWORD cbCommonPathSuffixUnicodeOffset; +} SHELL_LINK_INFOW, *LPSHELL_LINK_INFOW; + +/* VolumeID, LocalBasePath, LocalBasePathUnicode(cbHeaderSize >= 0x24) are present */ +#define SLI_VALID_LOCAL 0x00000001 +/* CommonNetworkRelativeLink is present */ +#define SLI_VALID_NETWORK 0x00000002 + +/***************************************************************************** + * SHELL_LINK_INFO_VOLUME_IDA/W + * If cbVolumeLabelOffset != 0x00000014 (should be 0x00000010) then use + * SHELL_LINK_INFO_VOLUME_IDA + * If cbVolumeLabelOffset == 0x00000014 then use SHELL_LINK_INFO_VOLUME_IDW + */ +typedef struct tagSHELL_LINK_INFO_VOLUME_IDA +{ + /* Size of the VolumeID field (> 0x00000010) */ + DWORD cbSize; + /* Drive type of the drive the link target is stored on (DRIVE_*) */ + DWORD dwDriveType; + /* Serial number of the volume the link target is stored on */ + DWORD nDriveSerialNumber; + /* Offset of the volume label (ANSI, NULL-terminated string). + Must be != 0x00000014 (see tagSHELL_LINK_INFO_VOLUME_IDW) */ + DWORD cbVolumeLabelOffset; +} SHELL_LINK_INFO_VOLUME_IDA, *LPSHELL_LINK_INFO_VOLUME_IDA; + +typedef struct tagSHELL_LINK_INFO_VOLUME_IDW +{ + /* Size of the VolumeID field (> 0x00000010) */ + DWORD cbSize; + /* Drive type of the drive the link target is stored on (DRIVE_*) */ + DWORD dwDriveType; + /* Serial number of the volume the link target is stored on */ + DWORD nDriveSerialNumber; + /* Offset of the volume label (ANSI, NULL-terminated string). + If the value of this field is 0x00000014, ignore it and use + cbVolumeLabelUnicodeOffset! */ + DWORD cbVolumeLabelOffset; + /* Offset of the volume label (Unicode, NULL-terminated string). + If the value of the VolumeLabelOffset field is not 0x00000014, + this field must be ignored (==> it doesn't exists ==> ANSI). */ + DWORD cbVolumeLabelUnicodeOffset; +} SHELL_LINK_INFO_VOLUME_IDW, *LPSHELL_LINK_INFO_VOLUME_IDW; + +/***************************************************************************** + * SHELL_LINK_INFO_CNR_LINKA/W (CNR = Common Network Relative) + * If cbNetNameOffset == 0x00000014 then use SHELL_LINK_INFO_CNR_LINKA + * If cbNetNameOffset > 0x00000014 then use SHELL_LINK_INFO_CNR_LINKW + */ +typedef struct tagSHELL_LINK_INFO_CNR_LINKA +{ + /* Size of the CommonNetworkRelativeLink field (>= 0x00000014) */ + DWORD cbSize; + /* Specifies which fields are present/populated (SLI_CNR_*) */ + DWORD dwFlags; + /* Offset of the NetName field (ANSI, NULL–terminated string) */ + DWORD cbNetNameOffset; + /* Offset of the DeviceName field (ANSI, NULL–terminated string) */ + DWORD cbDeviceNameOffset; + /* Type of the network provider (WNNC_NET_* defined in winnetwk.h) */ + DWORD dwNetworkProviderType; +} SHELL_LINK_INFO_CNR_LINKA, *LPSHELL_LINK_INFO_CNR_LINKA; + +typedef struct tagSHELL_LINK_INFO_CNR_LINKW +{ + /* Size of the CommonNetworkRelativeLink field (>= 0x00000014) */ + DWORD cbSize; + /* Specifies which fields are present/populated (SLI_CNR_*) */ + DWORD dwFlags; + /* Offset of the NetName field (ANSI, NULL–terminated string) */ + DWORD cbNetNameOffset; + /* Offset of the DeviceName field (ANSI, NULL–terminated string) */ + DWORD cbDeviceNameOffset; + /* Type of the network provider (WNNC_NET_* defined in winnetwk.h) */ + DWORD dwNetworkProviderType; + /* Offset of the NetNameUnicode field (Unicode, NULL–terminated string) */ + DWORD cbNetNameUnicodeOffset; + /* Offset of the DeviceNameUnicode field (Unicode, NULL–terminated string) */ + DWORD cbDeviceNameUnicodeOffset; +} SHELL_LINK_INFO_CNR_LINKW, *LPSHELL_LINK_INFO_CNR_LINKW; + +/* DeviceName is present */ +#define SLI_CNR_VALID_DEVICE 0x00000001 +/* NetworkProviderType is present */ +#define SLI_CNR_VALID_NET_TYPE 0x00000002 + +/***************************************************************************** + * Shell Link Extra Data (IShellLinkDataList) + */ +typedef struct tagEXP_TRACKER +{ + /* .cbSize = 0x00000060, .dwSignature = 0xa0000003 */ + DATABLOCK_HEADER dbh; + /* Length >= 0x00000058 */ + DWORD nLength; + /* Must be 0x00000000 */ + DWORD nVersion; + /* NetBIOS name (ANSI, unused bytes are set to zero) */ + CHAR szMachineID[16]; /* "variable" >= 16 (?) */ + /* Some GUIDs for the Link Tracking service (from the FS?) */ + GUID guidDroidVolume; + GUID guidDroidObject; + GUID guidDroidBirthVolume; + GUID guidDroidBirthObject; +} EXP_TRACKER, *LPEXP_TRACKER; + +typedef struct tagEXP_SHIM +{ + /* .cbSize >= 0x00000088, .dwSignature = 0xa0000008 */ + DATABLOCK_HEADER dbh; + /* Name of a shim layer to apply (Unicode, unused bytes are set to zero) */ + WCHAR szwLayerName[64]; /* "variable" >= 64 */ +} EXP_SHIM, *LPEXP_SHIM; + +typedef struct tagEXP_KNOWN_FOLDER +{ + /* .cbSize = 0x0000001c, .dwSignature = 0xa000000b */ + DATABLOCK_HEADER dbh; + /* A GUID value that identifies a known folder */ + GUID guidKnownFolder; + /* Specifies the location of the ItemID of the first child + segment of the IDList specified by guidKnownFolder */ + DWORD cbOffset; +} EXP_KNOWN_FOLDER, *LPEXP_KNOWN_FOLDER; + +typedef struct tagEXP_VISTA_ID_LIST +{ + /* .cbSize >= 0x0000000a, .dwSignature = 0xa000000c */ + DATABLOCK_HEADER dbh; + /* Specifies an alternate IDList that can be used instead + of the "normal" IDList (SLDF_HAS_ID_LIST) */ + /* LPITEMIDLIST pIDList; (variable) */ +} EXP_VISTA_ID_LIST, *LPEXP_VISTA_ID_LIST; + +#define EXP_TRACKER_SIG 0xa0000003 +#define EXP_SHIM_SIG 0xa0000008 +#define EXP_KNOWN_FOLDER_SIG 0xa000000b +#define EXP_VISTA_ID_LIST_SIG 0xa000000c + #include #ifdef __cplusplus