Commit a18ee211 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

msxml3/xmldoc: Fix IPersistStreamInit::GetClassID() for IXMLDocument.

parent 1b2f1867
...@@ -361,6 +361,7 @@ static void test_persiststreaminit(void) ...@@ -361,6 +361,7 @@ static void test_persiststreaminit(void)
HRESULT hr; HRESULT hr;
ULARGE_INTEGER size; ULARGE_INTEGER size;
CHAR path[MAX_PATH]; CHAR path[MAX_PATH];
CLSID id;
hr = CoCreateInstance(&CLSID_XMLDocument, NULL, CLSCTX_INPROC_SERVER, hr = CoCreateInstance(&CLSID_XMLDocument, NULL, CLSCTX_INPROC_SERVER,
&IID_IXMLDocument, (LPVOID*)&doc); &IID_IXMLDocument, (LPVOID*)&doc);
...@@ -380,6 +381,9 @@ static void test_persiststreaminit(void) ...@@ -380,6 +381,9 @@ static void test_persiststreaminit(void)
hr = IPersistStreamInit_Save(psi, NULL, FALSE); hr = IPersistStreamInit_Save(psi, NULL, FALSE);
todo_wine ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); todo_wine ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
hr = IPersistStreamInit_GetClassID(psi, NULL);
ok(hr == E_POINTER, "Expected E_INVALIDARG, got %08x\n", hr);
create_xml_file("bank.xml"); create_xml_file("bank.xml");
GetFullPathNameA("bank.xml", MAX_PATH, path, NULL); GetFullPathNameA("bank.xml", MAX_PATH, path, NULL);
create_stream_on_file(&stream, path); create_stream_on_file(&stream, path);
...@@ -426,6 +430,11 @@ static void test_persiststreaminit(void) ...@@ -426,6 +430,11 @@ static void test_persiststreaminit(void)
todo_wine ok(stat.cbSize.QuadPart > 0, "Expected >0\n"); todo_wine ok(stat.cbSize.QuadPart > 0, "Expected >0\n");
IStream_Release(stream); IStream_Release(stream);
memset(&id, 0, sizeof(id));
hr = IPersistStreamInit_GetClassID(psi, &id);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
ok(IsEqualCLSID(&id, &CLSID_XMLDocument), "Expected CLSID_XMLDocument\n");
cleanup: cleanup:
IPersistStreamInit_Release(psi); IPersistStreamInit_Release(psi);
IXMLDocument_Release(doc); IXMLDocument_Release(doc);
......
...@@ -574,8 +574,13 @@ static ULONG WINAPI xmldoc_IPersistStreamInit_Release( ...@@ -574,8 +574,13 @@ static ULONG WINAPI xmldoc_IPersistStreamInit_Release(
static HRESULT WINAPI xmldoc_IPersistStreamInit_GetClassID( static HRESULT WINAPI xmldoc_IPersistStreamInit_GetClassID(
IPersistStreamInit *iface, CLSID *classid) IPersistStreamInit *iface, CLSID *classid)
{ {
FIXME("(%p,%p): stub!\n", iface, classid); xmldoc *this = impl_from_IPersistStreamInit(iface);
return E_NOTIMPL; TRACE("(%p,%p)\n", this, classid);
if (!classid) return E_POINTER;
*classid = CLSID_XMLDocument;
return S_OK;
} }
static HRESULT WINAPI xmldoc_IPersistStreamInit_IsDirty( static HRESULT WINAPI xmldoc_IPersistStreamInit_IsDirty(
......
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