aboutsummaryrefslogtreecommitdiff
path: root/c/data.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-08-26 03:17:09 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-08-26 03:17:09 +0200
commiteb7709d8617bec27349eebb43e8941b3aaaf453e (patch)
tree7c8627586ed18132b0304b779a00d8acc61e7a0d /c/data.cpp
parenta9a74875dbd5340b6f3ea6d8b6f66a04b360b22a (diff)
downloadEpisodeBrowser-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/data.cpp')
-rw-r--r--c/data.cpp5
1 files changed, 3 insertions, 2 deletions
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<xmlXPathContextPtr, xmlXPathFreeContext, XmlE
using XmlXPathObjectPtr = Managed<xmlXPathObjectPtr, xmlXPathFreeObject, XmlError>;
using XmlCharPtr = Managed<xmlChar*, XmlFree, XmlError>;
-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);