From be89ee1a3138a83a65a81683f11986d2f5f0ba67 Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Tue, 8 Jul 2008 20:52:41 +0200 Subject: [PATCH] msxml3: Added ISAXMLReader_putErrorHandler implementation. --- dlls/msxml3/saxreader.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index b68ccae54f9..dfcc9f36e00 100644 --- a/dlls/msxml3/saxreader.c +++ b/dlls/msxml3/saxreader.c @@ -50,6 +50,7 @@ typedef struct _saxreader const struct ISAXXMLReaderVtbl *lpSAXXMLReaderVtbl; LONG ref; struct ISAXContentHandler *contentHandler; + struct ISAXErrorHandler *errorHandler; xmlSAXHandler sax; } saxreader; @@ -115,6 +116,9 @@ static ULONG WINAPI saxxmlreader_Release( if(This->contentHandler) ISAXContentHandler_Release(This->contentHandler); + if(This->errorHandler) + ISAXErrorHandler_Release(This->errorHandler); + HeapFree( GetProcessHeap(), 0, This ); } @@ -569,8 +573,14 @@ static HRESULT WINAPI isaxxmlreader_putErrorHandler( { saxreader *This = impl_from_ISAXXMLReader( iface ); - FIXME("(%p)->(%p) stub\n", This, errorHandler); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, errorHandler); + if(errorHandler) + ISAXErrorHandler_AddRef(errorHandler); + if(This->errorHandler) + ISAXErrorHandler_Release(This->errorHandler); + This->errorHandler = errorHandler; + + return S_OK; } static HRESULT WINAPI isaxxmlreader_getBaseURL( @@ -672,6 +682,7 @@ HRESULT SAXXMLReader_create(IUnknown *pUnkOuter, LPVOID *ppObj) reader->lpSAXXMLReaderVtbl = &isaxreader_vtbl; reader->ref = 1; reader->contentHandler = NULL; + reader->errorHandler = NULL; *ppObj = &reader->lpVtbl;