From eb7709d8617bec27349eebb43e8941b3aaaf453e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Fri, 26 Aug 2022 03:17:09 +0200 Subject: Use FunctionW names explicitly instead of macros. It's uglier, but it makes Visual Studio show better tooltips. --- c/ext.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'c/ext.cpp') diff --git a/c/ext.cpp b/c/ext.cpp index d8f3eb9..272f4a3 100644 --- a/c/ext.cpp +++ b/c/ext.cpp @@ -13,7 +13,7 @@ bool OpenOnline(int iEp) wchar_t url[sizeof(g_cfg.url)+4]; Swprintf(url, L"%s%d", g_cfg.url, iEp); INT_PTR r = reinterpret_cast( - ShellExecute(nullptr, L"open", url, nullptr, nullptr, SW_SHOWNORMAL)); + ShellExecuteW(nullptr, L"open", url, nullptr, nullptr, SW_SHOWNORMAL)); if (r <= 32) throw Win32Error(); return true; @@ -25,7 +25,7 @@ bool OpenWiki(int iEp) wchar_t url[sizeof(d.wiki)+35]; Swprintf(url, L"https://www.detectiveconanworld.com%s", d.wiki); INT_PTR r = reinterpret_cast( - ShellExecute(nullptr, L"open", url, nullptr, nullptr, SW_SHOWNORMAL)); + ShellExecuteW(nullptr, L"open", url, nullptr, nullptr, SW_SHOWNORMAL)); if (r <= 32) throw Win32Error(); return true; @@ -88,7 +88,7 @@ static bool FindMatchingFile(wchar_t (&file)[MAX_PATH], const wchar_t* const roo Swprintf(pat, L"%s\\*", root); WIN32_FIND_DATA fdata; - FindHandle h = FindFirstFile(pat, &fdata); + FindHandle h = FindFirstFileW(pat, &fdata); do if (fdata.cFileName[0] == L'.') @@ -103,7 +103,7 @@ static bool FindMatchingFile(wchar_t (&file)[MAX_PATH], const wchar_t* const roo Swprintf(file, L"%s\\%s", root, fdata.cFileName); return true; } - while (FindNextFile(h, &fdata)); + while (FindNextFileW(h, &fdata)); if (GetLastError() != ERROR_NO_MORE_FILES) throw Win32Error(); @@ -116,7 +116,7 @@ bool OpenLocally(int iEp) wchar_t file[MAX_PATH]; if (FindMatchingFile(file, g_cfg.root, g_fvElv.At(iEp-1).siEp)) { INT_PTR r = reinterpret_cast( - ShellExecute(nullptr, L"open", file, nullptr, nullptr, SW_SHOWNORMAL)); + ShellExecuteW(nullptr, L"open", file, nullptr, nullptr, SW_SHOWNORMAL)); if (r <= 32) throw Win32Error(); return true; -- cgit v1.2.3