From f23edde42cf67ecc8b1ca09cbf82b1009b8eabc2 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Mon, 25 Sep 2017 10:59:36 +0300 Subject: [PATCH] shell32: Partially implement MapColumnToSCID(). Signed-off-by: Nikolay Sivov Signed-off-by: Alexandre Julliard --- dlls/shell32/cpanelfolder.c | 7 ++++--- dlls/shell32/shfldr.h | 5 +++++ dlls/shell32/shfldr_desktop.c | 25 +++++++++++++++---------- dlls/shell32/shfldr_fs.c | 25 +++++++++++++++---------- dlls/shell32/shfldr_mycomp.c | 23 ++++++++++++++--------- dlls/shell32/shfldr_netplaces.c | 17 ++++++++++------- dlls/shell32/shfldr_printers.c | 24 ++++++++++++++---------- dlls/shell32/shfldr_unixfs.c | 31 +++++++++++++++++-------------- dlls/shell32/shlfolder.c | 15 +++++++++++++++ 9 files changed, 109 insertions(+), 63 deletions(-) diff --git a/dlls/shell32/cpanelfolder.c b/dlls/shell32/cpanelfolder.c index 206ce134622..527ddfde84c 100644 --- a/dlls/shell32/cpanelfolder.c +++ b/dlls/shell32/cpanelfolder.c @@ -100,9 +100,10 @@ static inline ICPanelImpl *impl_from_IShellExecuteHookA(IShellExecuteHookA *ifac * IShellFolder [ControlPanel] implementation */ -static const shvheader ControlPanelSFHeader[] = { - {IDS_SHV_COLUMN8, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15},/*FIXME*/ - {IDS_SHV_COLUMN9, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 80},/*FIXME*/ +static const shvheader ControlPanelSFHeader[] = +{ + { &FMTID_Storage, PID_STG_NAME, IDS_SHV_COLUMN8, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15 },/*FIXME*/ + { NULL, 0, IDS_SHV_COLUMN9, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 80 },/*FIXME*/ }; #define CONROLPANELSHELLVIEWCOLUMNS 2 diff --git a/dlls/shell32/shfldr.h b/dlls/shell32/shfldr.h index 1f4194e2965..a92f31b5ccf 100644 --- a/dlls/shell32/shfldr.h +++ b/dlls/shell32/shfldr.h @@ -20,9 +20,13 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "stgprop.h" + #define CHARS_IN_GUID 39 typedef struct { + const GUID *fmtid; + DWORD pid; int colnameid; int pcsFlags; int fmt; @@ -30,6 +34,7 @@ typedef struct { } shvheader; HRESULT SHELL32_GetColumnDetails(const shvheader *data, int column, SHELLDETAILS *details) DECLSPEC_HIDDEN; +HRESULT shellfolder_map_column_to_scid(const shvheader *data, UINT column, SHCOLUMNID *scid) DECLSPEC_HIDDEN; #define GET_SHGDN_FOR(dwFlags) ((DWORD)dwFlags & (DWORD)0x0000FF00) #define GET_SHGDN_RELATION(dwFlags) ((DWORD)dwFlags & (DWORD)0x000000FF) diff --git a/dlls/shell32/shfldr_desktop.c b/dlls/shell32/shfldr_desktop.c index e4cdeb154b3..8d85dfdfd3b 100644 --- a/dlls/shell32/shfldr_desktop.c +++ b/dlls/shell32/shfldr_desktop.c @@ -85,12 +85,13 @@ static inline IDesktopFolderImpl *impl_from_IPersistFolder2( IPersistFolder2 *if return CONTAINING_RECORD(iface, IDesktopFolderImpl, IPersistFolder2_iface); } -static const shvheader desktop_header[] = { - {IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, - {IDS_SHV_COLUMN2, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, - {IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, - {IDS_SHV_COLUMN4, SHCOLSTATE_TYPE_DATE | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 12}, - {IDS_SHV_COLUMN5, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 5} +static const shvheader desktop_header[] = +{ + { &FMTID_Storage, PID_STG_NAME, IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15 }, + { &FMTID_Storage, PID_STG_SIZE, IDS_SHV_COLUMN2, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10 }, + { &FMTID_Storage, PID_STG_STORAGETYPE, IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10 }, + { &FMTID_Storage, PID_STG_WRITETIME, IDS_SHV_COLUMN4, SHCOLSTATE_TYPE_DATE | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 12 }, + { &FMTID_Storage, PID_STG_ATTRIBUTES, IDS_SHV_COLUMN5, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 5 }, }; #define DESKTOPSHELLVIEWCOLUMNS sizeof(desktop_header)/sizeof(shvheader) @@ -845,12 +846,16 @@ static HRESULT WINAPI ISF_Desktop_fnGetDetailsOf (IShellFolder2 * iface, return hr; } -static HRESULT WINAPI ISF_Desktop_fnMapColumnToSCID ( - IShellFolder2 * iface, UINT column, SHCOLUMNID * pscid) +static HRESULT WINAPI ISF_Desktop_fnMapColumnToSCID(IShellFolder2 *iface, UINT column, SHCOLUMNID *scid) { IDesktopFolderImpl *This = impl_from_IShellFolder2(iface); - FIXME ("(%p)->(%d %p) stub\n", This, column, pscid); - return E_NOTIMPL; + + TRACE("(%p)->(%u %p)\n", This, column, scid); + + if (column >= DESKTOPSHELLVIEWCOLUMNS) + return E_INVALIDARG; + + return shellfolder_map_column_to_scid(desktop_header, column, scid); } static const IShellFolder2Vtbl vt_MCFldr_ShellFolder2 = diff --git a/dlls/shell32/shfldr_fs.c b/dlls/shell32/shfldr_fs.c index c391aceb364..31c0043cac6 100644 --- a/dlls/shell32/shfldr_fs.c +++ b/dlls/shell32/shfldr_fs.c @@ -182,12 +182,13 @@ static const IUnknownVtbl unkvt = IUnknown_fnRelease, }; -static const shvheader GenericSFHeader[] = { - {IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, - {IDS_SHV_COLUMN2, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, - {IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, - {IDS_SHV_COLUMN4, SHCOLSTATE_TYPE_DATE | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 12}, - {IDS_SHV_COLUMN5, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 5} +static const shvheader GenericSFHeader[] = +{ + { &FMTID_Storage, PID_STG_NAME, IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15 }, + { &FMTID_Storage, PID_STG_SIZE, IDS_SHV_COLUMN2, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10 }, + { &FMTID_Storage, PID_STG_STORAGETYPE, IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10 }, + { &FMTID_Storage, PID_STG_WRITETIME, IDS_SHV_COLUMN4, SHCOLSTATE_TYPE_DATE | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 12 }, + { &FMTID_Storage, PID_STG_ATTRIBUTES, IDS_SHV_COLUMN5, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 5 }, }; #define GENERICSHELLVIEWCOLUMNS 5 @@ -1014,12 +1015,16 @@ IShellFolder_fnGetDetailsOf (IShellFolder2 * iface, LPCITEMIDLIST pidl, } static HRESULT WINAPI -IShellFolder_fnMapColumnToSCID (IShellFolder2 * iface, UINT column, - SHCOLUMNID * pscid) +IShellFolder_fnMapColumnToSCID (IShellFolder2 *iface, UINT column, SHCOLUMNID *scid) { IGenericSFImpl *This = impl_from_IShellFolder2(iface); - FIXME ("(%p)\n", This); - return E_NOTIMPL; + + TRACE("(%p)->(%u %p)\n", This, column, scid); + + if (column >= GENERICSHELLVIEWCOLUMNS) + return E_INVALIDARG; + + return shellfolder_map_column_to_scid(GenericSFHeader, column, scid); } static const IShellFolder2Vtbl sfvt = diff --git a/dlls/shell32/shfldr_mycomp.c b/dlls/shell32/shfldr_mycomp.c index d47d2af3266..f5df7e1656f 100644 --- a/dlls/shell32/shfldr_mycomp.c +++ b/dlls/shell32/shfldr_mycomp.c @@ -79,11 +79,12 @@ static inline IMyComputerFolderImpl *impl_from_IPersistFolder2(IPersistFolder2 * * IShellFolder [MyComputer] implementation */ -static const shvheader mycomputer_header[] = { - {IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, - {IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, - {IDS_SHV_COLUMN6, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, - {IDS_SHV_COLUMN7, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, +static const shvheader mycomputer_header[] = +{ + { &FMTID_Storage, PID_STG_NAME, IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15 }, + { &FMTID_Storage, PID_STG_STORAGETYPE, IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10 }, + { NULL, 0, IDS_SHV_COLUMN6, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10 }, + { NULL, 0, IDS_SHV_COLUMN7, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10 }, }; #define MYCOMPUTERSHELLVIEWCOLUMNS sizeof(mycomputer_header)/sizeof(shvheader) @@ -867,12 +868,16 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDetailsOf (IShellFolder2 *iface, return hr; } -static HRESULT WINAPI ISF_MyComputer_fnMapColumnToSCID ( - IShellFolder2 * iface, UINT column, SHCOLUMNID * pscid) +static HRESULT WINAPI ISF_MyComputer_fnMapColumnToSCID (IShellFolder2 *iface, UINT column, SHCOLUMNID *scid) { IMyComputerFolderImpl *This = impl_from_IShellFolder2(iface); - FIXME ("(%p)\n", This); - return E_NOTIMPL; + + TRACE("(%p)->(%u %p)\n", This, column, scid); + + if (column >= MYCOMPUTERSHELLVIEWCOLUMNS) + return E_INVALIDARG; + + return shellfolder_map_column_to_scid(mycomputer_header, column, scid); } static const IShellFolder2Vtbl vt_ShellFolder2 = diff --git a/dlls/shell32/shfldr_netplaces.c b/dlls/shell32/shfldr_netplaces.c index b9513a9b5e0..f7834a2afe4 100644 --- a/dlls/shell32/shfldr_netplaces.c +++ b/dlls/shell32/shfldr_netplaces.c @@ -73,9 +73,10 @@ static inline IGenericSFImpl *impl_from_IPersistFolder2(IPersistFolder2 *iface) } -static const shvheader networkplaces_header[] = { - {IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, - {IDS_SHV_COLUMN9, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10} +static const shvheader networkplaces_header[] = +{ + { NULL, 0, IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15 }, + { NULL, 0, IDS_SHV_COLUMN9, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10 }, }; #define NETWORKPLACESSHELLVIEWCOLUMNS sizeof(networkplaces_header)/sizeof(shvheader) @@ -567,14 +568,16 @@ static HRESULT WINAPI ISF_NetworkPlaces_fnGetDetailsOf (IShellFolder2 * iface, return E_NOTIMPL; } -static HRESULT WINAPI ISF_NetworkPlaces_fnMapColumnToSCID (IShellFolder2 * iface, - UINT column, SHCOLUMNID * pscid) +static HRESULT WINAPI ISF_NetworkPlaces_fnMapColumnToSCID (IShellFolder2 *iface, UINT column, SHCOLUMNID *scid) { IGenericSFImpl *This = impl_from_IShellFolder2(iface); - FIXME ("(%p)\n", This); + TRACE("(%p)->(%u %p)\n", This, column, scid); - return E_NOTIMPL; + if (column >= NETWORKPLACESSHELLVIEWCOLUMNS) + return E_INVALIDARG; + + return shellfolder_map_column_to_scid(networkplaces_header, column, scid); } static const IShellFolder2Vtbl vt_ShellFolder2 = { diff --git a/dlls/shell32/shfldr_printers.c b/dlls/shell32/shfldr_printers.c index fb1b6a9467a..16d1adbaeec 100644 --- a/dlls/shell32/shfldr_printers.c +++ b/dlls/shell32/shfldr_printers.c @@ -55,12 +55,12 @@ static inline IPrintersFolderImpl *impl_from_IPersistFolder2(IPersistFolder2 *if } static const shvheader printers_header[] = { - { IDS_SHV_COLUMN8, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 20 }, - { IDS_SHV_COL_DOCS, SHCOLSTATE_TYPE_INT | SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 12 }, - { IDS_SHV_COL_STATUS, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 12 }, - { IDS_SHV_COLUMN9, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 30 }, - { IDS_SHV_COL_LOCATION, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 20 }, - { IDS_SHV_COL_MODEL, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 20 } + { &FMTID_Storage, PID_STG_NAME, IDS_SHV_COLUMN8, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 20 }, + { NULL, 0, IDS_SHV_COL_DOCS, SHCOLSTATE_TYPE_INT | SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 12 }, + { NULL, 0, IDS_SHV_COL_STATUS, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 12 }, + { &FMTID_SummaryInformation, PIDSI_COMMENTS, IDS_SHV_COLUMN9, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 30 }, + { NULL, 0, IDS_SHV_COL_LOCATION, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 20 }, + { NULL, 0, IDS_SHV_COL_MODEL, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 20 } }; #define PRINTERS_FOLDER_COL_NUM sizeof(printers_header)/sizeof(shvheader) @@ -316,12 +316,16 @@ static HRESULT WINAPI IShellFolder_Printers_fnGetDetailsOf (IShellFolder2 *iface return E_NOTIMPL; } -static HRESULT WINAPI IShellFolder_Printers_fnMapColumnToSCID ( - IShellFolder2 * iface, UINT column, SHCOLUMNID * pscid) +static HRESULT WINAPI IShellFolder_Printers_fnMapColumnToSCID (IShellFolder2 *iface, UINT column, SHCOLUMNID *scid) { IPrintersFolderImpl *This = impl_from_IShellFolder2(iface); - FIXME ("(%p)->(%u %p) stub\n", This, column, pscid); - return E_NOTIMPL; + + TRACE("(%p)->(%u %p)\n", This, column, scid); + + if (column >= PRINTERS_FOLDER_COL_NUM) + return E_INVALIDARG; + + return shellfolder_map_column_to_scid(printers_header, column, scid); } static const IShellFolder2Vtbl vtbl_ShellFolder2 = diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c index 3feef74720f..709e822c5d9 100644 --- a/dlls/shell32/shfldr_unixfs.c +++ b/dlls/shell32/shfldr_unixfs.c @@ -1470,6 +1470,15 @@ static HRESULT WINAPI ShellFolder2_GetDetailsEx(IShellFolder2* iface, } #define SHELLVIEWCOLUMNS 7 +static const shvheader unixfs_header[SHELLVIEWCOLUMNS] = { + { &FMTID_Storage, PID_STG_NAME, IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15 }, + { &FMTID_Storage, PID_STG_SIZE, IDS_SHV_COLUMN2, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10 }, + { &FMTID_Storage, PID_STG_STORAGETYPE, IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10 }, + { &FMTID_Storage, PID_STG_WRITETIME, IDS_SHV_COLUMN4, SHCOLSTATE_TYPE_DATE | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 12 }, + { NULL, 0, IDS_SHV_COLUMN5, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 9 }, + { NULL, 0, IDS_SHV_COLUMN10, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 7 }, + { NULL, 0, IDS_SHV_COLUMN11, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 7 }, +}; static HRESULT WINAPI ShellFolder2_GetDetailsOf(IShellFolder2* iface, LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd) @@ -1480,16 +1489,6 @@ static HRESULT WINAPI ShellFolder2_GetDetailsOf(IShellFolder2* iface, struct stat statItem; HRESULT hr = S_OK; - static const shvheader unixfs_header[SHELLVIEWCOLUMNS] = { - {IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, - {IDS_SHV_COLUMN2, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, - {IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, - {IDS_SHV_COLUMN4, SHCOLSTATE_TYPE_DATE | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 12}, - {IDS_SHV_COLUMN5, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 9}, - {IDS_SHV_COLUMN10, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 7}, - {IDS_SHV_COLUMN11, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 7} - }; - TRACE("(%p)->(%p %d %p)\n", This, pidl, iColumn, psd); if (!psd || iColumn >= SHELLVIEWCOLUMNS) @@ -1549,12 +1548,16 @@ static HRESULT WINAPI ShellFolder2_GetDetailsOf(IShellFolder2* iface, return hr; } -static HRESULT WINAPI ShellFolder2_MapColumnToSCID(IShellFolder2* iface, UINT column, - SHCOLUMNID *pscid) +static HRESULT WINAPI ShellFolder2_MapColumnToSCID(IShellFolder2* iface, UINT column, SHCOLUMNID *scid) { UnixFolder *This = impl_from_IShellFolder2(iface); - FIXME("(%p)->(%u %p): stub\n", This, column, pscid); - return E_NOTIMPL; + + TRACE("(%p)->(%u %p)\n", This, column, scid); + + if (column >= SHELLVIEWCOLUMNS) + return E_INVALIDARG; + + return shellfolder_map_column_to_scid(unixfs_header, column, scid); } static const IShellFolder2Vtbl ShellFolder2Vtbl = { diff --git a/dlls/shell32/shlfolder.c b/dlls/shell32/shlfolder.c index 8688c5d053d..f4df6f56eda 100644 --- a/dlls/shell32/shlfolder.c +++ b/dlls/shell32/shlfolder.c @@ -565,6 +565,21 @@ HRESULT SHELL32_GetColumnDetails(const shvheader *data, int column, SHELLDETAILS return S_OK; } +HRESULT shellfolder_map_column_to_scid(const shvheader *header, UINT column, SHCOLUMNID *scid) +{ + if (header[column].fmtid == NULL) + { + FIXME("missing property id for column %u.\n", column); + memset(scid, 0, sizeof(*scid)); + return E_NOTIMPL; + } + + scid->fmtid = *header[column].fmtid; + scid->pid = header[column].pid; + + return S_OK; +} + /*********************************************************************** * SHCreateLinks * -- 2.11.4.GIT