[PATCH 1/2] msxml3/tests: Get rid of a2bstr()
Michael Stefaniuc
mstefani at winehq.org
Fri Feb 14 14:24:37 CST 2020
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/msxml3/tests/httpreq.c | 19 ++-----------------
1 file changed, 2 insertions(+), 17 deletions(-)
diff --git a/dlls/msxml3/tests/httpreq.c b/dlls/msxml3/tests/httpreq.c
index ae0a95a2f1..33e6bd6581 100644
--- a/dlls/msxml3/tests/httpreq.c
+++ b/dlls/msxml3/tests/httpreq.c
@@ -130,21 +130,6 @@ static void free_bstrs(void)
alloced_bstrs_count = 0;
}
-static BSTR a2bstr(const char *str)
-{
- BSTR ret;
- int len;
-
- if(!str)
- return NULL;
-
- len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
- ret = SysAllocStringLen(NULL, len);
- MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
-
- return ret;
-}
-
/* test IHTMLElementCollection */
static HRESULT WINAPI htmlecoll_QueryInterface(IHTMLElementCollection *iface, REFIID riid, void **ppvObject)
@@ -496,7 +481,7 @@ static HRESULT WINAPI htmldoc2_put_URL(IHTMLDocument2 *iface, BSTR v)
static HRESULT WINAPI htmldoc2_get_URL(IHTMLDocument2 *iface, BSTR *p)
{
CHECK_EXPECT2(htmldoc2_get_url);
- *p = a2bstr("http://test.winehq.org/");
+ *p = SysAllocString(L"http://test.winehq.org/");
return S_OK;
}
@@ -1747,7 +1732,7 @@ static void test_XMLHTTP(void)
set_xhr_site(xhr);
test_open(xhr, "GET", "tests/referer.php", S_OK);
- str1 = a2bstr("http://test.winehq.org/");
+ str1 = SysAllocString(L"http://test.winehq.org/");
V_VT(&varbody) = VT_EMPTY;
hr = IXMLHttpRequest_send(xhr, varbody);
--
2.24.1
More information about the wine-devel
mailing list