summaryrefslogtreecommitdiff
path: root/dtrans/source/win32
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-04-01 13:48:06 +0100
committerMike Kaganski <mike.kaganski@collabora.com>2019-04-01 16:00:07 +0200
commit538f7d66b17bfde94e5270b9e2b2fb9850e0d65e (patch)
tree057dea6a608a2d6013ca05a081743935f9f862de /dtrans/source/win32
parent07da6d9ed7ed15c661850eef275157648497181d (diff)
IShellLinkA -> IShellLinkW
Change-Id: If07d7e0d2a3a33f0bcc96352ea40ff83a2f483ed Reviewed-on: https://gerrit.libreoffice.org/70062 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'dtrans/source/win32')
-rw-r--r--dtrans/source/win32/dtobj/FmtFilter.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx
index a38c6204ef25..0b60cb51c109 100644
--- a/dtrans/source/win32/dtobj/FmtFilter.cxx
+++ b/dtrans/source/win32/dtobj/FmtFilter.cxx
@@ -301,9 +301,9 @@ static std::wstring getShellLinkTarget(const std::wstring& aLnkFile)
try
{
- sal::systools::COMReference<IShellLinkA> pIShellLink;
+ sal::systools::COMReference<IShellLinkW> pIShellLink;
HRESULT hr = CoCreateInstance(
- CLSID_ShellLink, nullptr, CLSCTX_INPROC_SERVER, IID_IShellLink, reinterpret_cast<LPVOID*>(&pIShellLink));
+ CLSID_ShellLink, nullptr, CLSCTX_INPROC_SERVER, IID_IShellLinkW, reinterpret_cast<LPVOID*>(&pIShellLink));
if (FAILED(hr))
return target;
@@ -318,14 +318,12 @@ static std::wstring getShellLinkTarget(const std::wstring& aLnkFile)
if (FAILED(hr))
return target;
- char pathA[MAX_PATH];
- WIN32_FIND_DATA wfd;
- hr = pIShellLink->GetPath(pathA, MAX_PATH, &wfd, SLGP_RAWPATH);
+ wchar_t pathW[MAX_PATH];
+ WIN32_FIND_DATAW wfd;
+ hr = pIShellLink->GetPath(pathW, MAX_PATH, &wfd, SLGP_RAWPATH);
if (FAILED(hr))
return target;
- wchar_t pathW[MAX_PATH];
- MultiByteToWideChar(CP_ACP, 0, pathA, -1, pathW, MAX_PATH);
target = pathW;
}
catch(sal::systools::ComError& ex)