msxml3: Added support for SafeArrays in ISAXXMLReader_parse.

This commit is contained in:
Piotr Caban 2008-07-19 22:41:39 +02:00 committed by Alexandre Julliard
parent bba7eb5825
commit 75681ef314
1 changed files with 19 additions and 0 deletions

View File

@ -1061,6 +1061,25 @@ static HRESULT WINAPI isaxxmlreader_parse(
locator->pParserCtxt->sax = &locator->saxreader->sax;
locator->pParserCtxt->userData = locator;
if(xmlParseDocument(locator->pParserCtxt)) hr = E_FAIL;
else hr = locator->ret;
break;
case VT_ARRAY|VT_UI1:
locator->pParserCtxt = xmlNewParserCtxt();
if(!locator->pParserCtxt)
{
hr = E_FAIL;
break;
}
hr = SafeArrayAccessData(V_ARRAY(&varInput), (void**)&data);
if(hr != S_OK) break;
xmlSetupParserForBuffer(locator->pParserCtxt, data, NULL);
SafeArrayUnaccessData(V_ARRAY(&varInput));
locator->pParserCtxt->sax = &locator->saxreader->sax;
locator->pParserCtxt->userData = locator;
if(xmlParseDocument(locator->pParserCtxt)) hr = E_FAIL;
else hr = locator->ret;
break;