From 538f7d66b17bfde94e5270b9e2b2fb9850e0d65e Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Mon, 1 Apr 2019 13:48:06 +0100 Subject: IShellLinkA -> IShellLinkW Change-Id: If07d7e0d2a3a33f0bcc96352ea40ff83a2f483ed Reviewed-on: https://gerrit.libreoffice.org/70062 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- dtrans/source/win32/dtobj/FmtFilter.cxx | 12 +++++------- 1 file 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 pIShellLink; + sal::systools::COMReference pIShellLink; HRESULT hr = CoCreateInstance( - CLSID_ShellLink, nullptr, CLSCTX_INPROC_SERVER, IID_IShellLink, reinterpret_cast(&pIShellLink)); + CLSID_ShellLink, nullptr, CLSCTX_INPROC_SERVER, IID_IShellLinkW, reinterpret_cast(&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) -- cgit