diff options
author | John Ankarström <john@ankarstrom.se> | 2022-08-26 03:17:09 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-08-26 03:17:09 +0200 |
commit | eb7709d8617bec27349eebb43e8941b3aaaf453e (patch) | |
tree | 7c8627586ed18132b0304b779a00d8acc61e7a0d /c/ext.cpp | |
parent | a9a74875dbd5340b6f3ea6d8b6f66a04b360b22a (diff) | |
download | EpisodeBrowser-eb7709d8617bec27349eebb43e8941b3aaaf453e.tar.gz |
Use FunctionW names explicitly instead of macros.
It's uglier, but it makes Visual Studio show better tooltips.
Diffstat (limited to 'c/ext.cpp')
-rw-r--r-- | c/ext.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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<INT_PTR>( - 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<INT_PTR>( - 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<INT_PTR>( - 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; |