Commit 66677e61 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

msxml3: Compile tests with __WINESRC__ defined.

parent fe0f9457
TESTDLL = msxml3.dll
IMPORTS = oleaut32 ole32 user32
EXTRADEFS = -U__WINESRC__ -DWINE_STRICT_PROTOTYPES -DWINE_NO_NAMELESS_EXTENSION -DWIDL_C_INLINE_WRAPPERS
C_SRCS = \
domdoc.c \
......
......@@ -30,6 +30,7 @@
#include "windows.h"
#include "xmldom.h"
#include "msxml2.h"
#include "msxml2did.h"
#include "ole2.h"
......@@ -1068,7 +1069,7 @@ static void node_to_string(IXMLDOMNode *node, char *buf)
else
{
r = IXMLDOMNode_get_parentNode(node, &new_node);
wsprintf(buf, "%d", get_node_position(node));
sprintf(buf, "%d", get_node_position(node));
buf += strlen(buf);
}
......@@ -6039,7 +6040,7 @@ static void test_save(void)
ok(buffer[0] != '<' || buffer[1] != '?', "File contains processing instruction\n");
CloseHandle(hfile);
DeleteFile("test.xml");
DeleteFileA("test.xml");
/* save to path VT_BSTR | VT_BYREF */
filename = _bstr_("test.xml");
......@@ -6060,7 +6061,7 @@ static void test_save(void)
ok(buffer[0] != '<' || buffer[1] != '?', "File contains processing instruction\n");
CloseHandle(hfile);
DeleteFile("test.xml");
DeleteFileA("test.xml");
}
/* save to stream */
......@@ -6679,7 +6680,7 @@ static void test_TransformWithLoadingLocalFile(void)
IXMLDOMDocument_Release(doc);
IXMLDOMDocument_Release(xsl);
DeleteFile(lpPathBuffer);
DeleteFileA(lpPathBuffer);
free_bstrs();
}
......
......@@ -3497,15 +3497,17 @@ static void test_mxwriter_startendelement_batch(const struct writer_startendelem
if (table->type & StartElement)
{
hr = ISAXContentHandler_startElement(content, _bstr_(table->uri), lstrlen(table->uri),
_bstr_(table->local_name), lstrlen(table->local_name), _bstr_(table->qname), lstrlen(table->qname), table->attr);
hr = ISAXContentHandler_startElement(content, _bstr_(table->uri), table->uri ? strlen(table->uri) : 0,
_bstr_(table->local_name), table->local_name ? strlen(table->local_name) : 0, _bstr_(table->qname),
table->qname ? strlen(table->qname) : 0, table->attr);
ok(hr == table->hr, "test %d: got 0x%08x, expected 0x%08x\n", i, hr, table->hr);
}
if (table->type & EndElement)
{
hr = ISAXContentHandler_endElement(content, _bstr_(table->uri), lstrlen(table->uri),
_bstr_(table->local_name), lstrlen(table->local_name), _bstr_(table->qname), lstrlen(table->qname));
hr = ISAXContentHandler_endElement(content, _bstr_(table->uri), table->uri ? strlen(table->uri) : 0,
_bstr_(table->local_name), table->local_name ? strlen(table->local_name) : 0, _bstr_(table->qname),
table->qname ? strlen(table->qname) : 0);
ok(hr == table->hr, "test %d: got 0x%08x, expected 0x%08x\n", i, hr, table->hr);
}
......
......@@ -27,6 +27,7 @@
#include "windows.h"
#include "ole2.h"
#include "msxml2.h"
#undef CLSID_DOMDocument
#include "msxml2did.h"
#include "dispex.h"
......
......@@ -38,8 +38,8 @@
static void create_xml_file(LPCSTR filename)
{
DWORD dwNumberOfBytesWritten;
HANDLE hf = CreateFile(filename, GENERIC_WRITE, 0, NULL,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
HANDLE hf = CreateFileA(filename, GENERIC_WRITE, 0, NULL,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
static const char data[] =
"<?xml version=\"1.0\" ?>\n"
......@@ -61,8 +61,8 @@ static void create_stream_on_file(IStream **stream, LPCSTR path)
HRESULT hr;
DWORD file_size, read;
hfile = CreateFile(path, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
hfile = CreateFileA(path, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
ok(hfile != INVALID_HANDLE_VALUE, "Expected a valid file handle\n");
file_size = GetFileSize(hfile, NULL);
......
......@@ -242,9 +242,9 @@ static void test_Load(void)
IBindCtx_Release(bctx);
IMoniker_Release(mon);
while(!loaded && GetMessage(&msg, NULL, 0, 0)) {
while(!loaded && GetMessageA(&msg, NULL, 0, 0)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
DispatchMessageA(&msg);
}
hres = IHTMLDocument2_get_body(html_doc, &elem);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment