summaryrefslogtreecommitdiff
path: root/lib/Thumbnail/thumbnail.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:19:49 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:19:49 +0200
commitc8e0e909b4a8d18319fc65434a10dc446434817c (patch)
treeeee91e7d2ce229dd043811eae8f1e2bd78061916 /lib/Thumbnail/thumbnail.cpp
parent5.2 (diff)
downloadFreeFileSync-c8e0e909b4a8d18319fc65434a10dc446434817c.tar.gz
FreeFileSync-c8e0e909b4a8d18319fc65434a10dc446434817c.tar.bz2
FreeFileSync-c8e0e909b4a8d18319fc65434a10dc446434817c.zip
5.3
Diffstat (limited to 'lib/Thumbnail/thumbnail.cpp')
-rw-r--r--lib/Thumbnail/thumbnail.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/Thumbnail/thumbnail.cpp b/lib/Thumbnail/thumbnail.cpp
index 0176f89b..d35f15c3 100644
--- a/lib/Thumbnail/thumbnail.cpp
+++ b/lib/Thumbnail/thumbnail.cpp
@@ -27,22 +27,22 @@ thumb::HICON thumb::getThumbnail(const wchar_t* filename, int requestedSize) //r
{
const std::wstring filenameStr(filename);
- ComPtr<IShellFolder> shellFolder;
+ ComPtr<IShellFolder> desktopFolder;
{
- HRESULT hr = ::SHGetDesktopFolder(shellFolder.init());
- if (FAILED(hr) || !shellFolder)
+ HRESULT hr = ::SHGetDesktopFolder(desktopFolder.init());
+ if (FAILED(hr) || !desktopFolder)
return nullptr;
}
PIDLIST_RELATIVE pidlFolder = nullptr;
{
- const std::wstring& pathName = beforeLast(filenameStr, '\\');
- HRESULT hr = shellFolder->ParseDisplayName(nullptr, // [in] HWND hwnd,
- nullptr, // [in] IBindCtx *pbc,
- const_cast<LPWSTR>(pathName.c_str()), // [in] LPWSTR pszDisplayName,
- nullptr, // [out] ULONG *pchEaten,
- &pidlFolder, // [out] PIDLIST_RELATIVE* ppidl,
- nullptr); // [in, out] ULONG *pdwAttributes
+ const std::wstring& pathName = beforeLast(filenameStr, L'\\');
+ HRESULT hr = desktopFolder->ParseDisplayName(nullptr, // [in] HWND hwnd,
+ nullptr, // [in] IBindCtx *pbc,
+ const_cast<LPWSTR>(pathName.c_str()), // [in] LPWSTR pszDisplayName,
+ nullptr, // [out] ULONG *pchEaten,
+ &pidlFolder, // [out] PIDLIST_RELATIVE* ppidl,
+ nullptr); // [in, out] ULONG *pdwAttributes
if (FAILED(hr) || !pidlFolder)
return nullptr;
}
@@ -50,16 +50,16 @@ thumb::HICON thumb::getThumbnail(const wchar_t* filename, int requestedSize) //r
ComPtr<IShellFolder> imageFolder;
{
- HRESULT hr = shellFolder->BindToObject(pidlFolder, // [in] PCUIDLIST_RELATIVE pidl,
- nullptr,
- IID_PPV_ARGS(imageFolder.init()));
+ HRESULT hr = desktopFolder->BindToObject(pidlFolder, // [in] PCUIDLIST_RELATIVE pidl,
+ nullptr, // [in] IBindCtx *pbc,
+ IID_PPV_ARGS(imageFolder.init()));
if (FAILED(hr) || !imageFolder)
return nullptr;
}
PIDLIST_RELATIVE pidImage = nullptr;
{
- const std::wstring& shortName = afterLast(filenameStr, '\\');
+ const std::wstring& shortName = afterLast(filenameStr, L'\\');
HRESULT hr = imageFolder->ParseDisplayName(nullptr, // [in] HWND hwnd,
nullptr, // [in] IBindCtx *pbc,
const_cast<LPWSTR>(shortName.c_str()), // [in] LPWSTR pszDisplayName,
bgstack15