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/data.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'c/data.cpp') diff --git a/c/data.cpp b/c/data.cpp index 4b8033a..1da1428 100644 --- a/c/data.cpp +++ b/c/data.cpp @@ -8,6 +8,7 @@ #include "resource.h" #include "data.h" #include "episodelistview.h" +#include "util.h" #include "win.h" struct XmlError : public std::exception @@ -31,7 +32,7 @@ using XmlXPathContextPtr = Managed; using XmlCharPtr = Managed; -static InternetHandle s_hi = InternetOpen(L"Episode Browser", INTERNET_OPEN_TYPE_DIRECT, nullptr, nullptr, 0); +static InternetHandle s_hi = InternetOpenW(L"Episode Browser", INTERNET_OPEN_TYPE_DIRECT, nullptr, nullptr, 0); /* ParsedDoc downloads and parses an HTML document. */ struct ParsedDoc @@ -45,7 +46,7 @@ struct ParsedDoc char bufX[1024]; ParsedDoc(const wchar_t* wszUrl, const char* szUrl) - : hiUrl(InternetOpenUrl(s_hi, wszUrl, nullptr, 0, INTERNET_FLAG_NO_UI, 0)), + : hiUrl(InternetOpenUrlW(s_hi, wszUrl, nullptr, 0, INTERNET_FLAG_NO_UI, 0)), ctxt(htmlCreatePushParserCtxt(nullptr, nullptr, bufX, sizeof(bufX), szUrl, XML_CHAR_ENCODING_UTF8)) { htmlCtxtUseOptions(ctxt, HTML_PARSE_RECOVER|HTML_PARSE_NOERROR|HTML_PARSE_NOWARNING); -- cgit v1.2.3