msxml3: Return E_INVALIDARG when value is NULL.

This commit is contained in:
Alistair Leslie-Hughes 2008-01-03 16:02:36 +11:00 committed by Alexandre Julliard
parent fe475d9e88
commit 7c1a7491ec
2 changed files with 7 additions and 0 deletions

View File

@ -219,6 +219,9 @@ static HRESULT WINAPI xmlnode_get_nodeValue(
TRACE("%p %p\n", This, value);
if(!value)
return E_INVALIDARG;
V_BSTR(value) = NULL;
V_VT(value) = VT_NULL;

View File

@ -545,6 +545,10 @@ static void test_domnode( void )
VariantInit(&var);
ok( V_VT(&var) == VT_EMPTY, "variant init failed\n");
r = IXMLDOMNode_get_nodeValue( doc, NULL );
ok(r == E_INVALIDARG, "get_nodeValue ret %08x\n", r );
r = IXMLDOMNode_get_nodeValue( doc, &var );
ok( r == S_FALSE, "nextNode returned wrong code\n");
ok( V_VT(&var) == VT_NULL, "variant wasn't empty\n");