summaryrefslogtreecommitdiff
path: root/lib/Thumbnail/thumbnail.cpp
diff options
context:
space:
mode:
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