aboutsummaryrefslogtreecommitdiff
path: root/c/data.cpp
diff options
context:
space:
mode:
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);