From c3c4a41f29f2ddf589ad098f7e377ba4b6d42f07 Mon Sep 17 00:00:00 2001 From: Rolf Kalbermatter Date: Sun, 15 Dec 2002 01:14:04 +0000 Subject: [PATCH] Add support for Unicode IExtractIcon creation in IShellFolder->GetUIObjectOf. --- dlls/shell32/shell32_main.h | 1 + dlls/shell32/shfldr_desktop.c | 5 +++++ dlls/shell32/shfldr_fs.c | 5 +++++ dlls/shell32/shfldr_mycomp.c | 5 +++++ 4 files changed, 16 insertions(+) diff --git a/dlls/shell32/shell32_main.h b/dlls/shell32/shell32_main.h index a8cf3c7e6b3..7e6364f5f8d 100644 --- a/dlls/shell32/shell32_main.h +++ b/dlls/shell32/shell32_main.h @@ -100,6 +100,7 @@ HRESULT WINAPI IDropTargetHelper_Constructor (IUnknown * pUnkOuter, REFIID riid, LPENUMIDLIST IEnumIDList_Constructor(LPCSTR,DWORD,DWORD); LPEXTRACTICONA IExtractIconA_Constructor(LPITEMIDLIST); +LPEXTRACTICONW IExtractIconW_Constructor(LPITEMIDLIST); HRESULT CreateStreamOnFile (LPCSTR pszFilename, IStream ** ppstm); /* FIXME: rename the functions when the shell32.dll has it's own exports namespace */ diff --git a/dlls/shell32/shfldr_desktop.c b/dlls/shell32/shfldr_desktop.c index bddc891470b..621cf841a9d 100644 --- a/dlls/shell32/shfldr_desktop.c +++ b/dlls/shell32/shfldr_desktop.c @@ -408,6 +408,11 @@ static HRESULT WINAPI ISF_Desktop_fnGetUIObjectOf (IShellFolder2 * iface, pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl); SHFree (pidl); hr = S_OK; + } else if (IsEqualIID (riid, &IID_IExtractIconW) && (cidl == 1)) { + pidl = ILCombine (This->pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl); + SHFree (pidl); + hr = S_OK; } else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) { hr = IShellFolder_QueryInterface (iface, &IID_IDropTarget, (LPVOID *) & pObj); } else { diff --git a/dlls/shell32/shfldr_fs.c b/dlls/shell32/shfldr_fs.c index 967a9b44517..47090f0ab8c 100644 --- a/dlls/shell32/shfldr_fs.c +++ b/dlls/shell32/shfldr_fs.c @@ -559,6 +559,11 @@ IShellFolder_fnGetUIObjectOf (IShellFolder2 * iface, pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl); SHFree (pidl); hr = S_OK; + } else if (IsEqualIID (riid, &IID_IExtractIconW) && (cidl == 1)) { + pidl = ILCombine (This->pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl); + SHFree (pidl); + hr = S_OK; } else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) { hr = IShellFolder_QueryInterface (iface, &IID_IDropTarget, (LPVOID *) & pObj); } else { diff --git a/dlls/shell32/shfldr_mycomp.c b/dlls/shell32/shfldr_mycomp.c index e90a9da88d1..9a7b7ebb91b 100644 --- a/dlls/shell32/shfldr_mycomp.c +++ b/dlls/shell32/shfldr_mycomp.c @@ -388,6 +388,11 @@ ISF_MyComputer_fnGetUIObjectOf (IShellFolder2 * iface, pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl); SHFree (pidl); hr = S_OK; + } else if (IsEqualIID (riid, &IID_IExtractIconW) && (cidl == 1)) { + pidl = ILCombine (This->pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl); + SHFree (pidl); + hr = S_OK; } else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) { hr = IShellFolder_QueryInterface (iface, &IID_IDropTarget, (LPVOID *) & pObj); } else {