[PATCH] msxml3: Implement IXMLParser GetParserState

Nikolay Sivov bunglehead at gmail.com
Fri Jul 29 05:36:44 CDT 2016


On 29.07.2016 12:43, Alistair Leslie-Hughes wrote:
> Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
> ---
>  dlls/msxml3/tests/xmlparser.c | 3 +++
>  dlls/msxml3/xmlparser.c       | 6 ++++--
>  2 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/dlls/msxml3/tests/xmlparser.c b/dlls/msxml3/tests/xmlparser.c
> index 51f2a27..32514e3 100644
> --- a/dlls/msxml3/tests/xmlparser.c
> +++ b/dlls/msxml3/tests/xmlparser.c
> @@ -144,6 +144,9 @@ static void create_test(void)
>      hr = IXMLParser_SetFlags(parser, 0);
>      ok(hr == S_OK, "Expected S_OK got 0x%08x\n", hr);
>  
> +    hr = IXMLParser_GetParserState(parser);
> +    ok(hr == XMLPARSER_IDLE, "got 0x%08x\n", hr);
> +
>      IXMLParser_Release(parser);
>  }
>  
> diff --git a/dlls/msxml3/xmlparser.c b/dlls/msxml3/xmlparser.c
> index ca40b22..6fcdb82 100644
> --- a/dlls/msxml3/xmlparser.c
> +++ b/dlls/msxml3/xmlparser.c
> @@ -51,6 +51,7 @@ typedef struct _xmlparser
>      LONG ref;
>  
>      int flags;
> +    XML_PARSER_STATE state;
>  } xmlparser;
>  
>  static inline xmlparser *impl_from_IXMLParser( IXMLParser *iface )
> @@ -345,9 +346,9 @@ static HRESULT WINAPI xmlparser_GetParserState(IXMLParser *iface)
>  {
>      xmlparser *This = impl_from_IXMLParser( iface );
>  
> -    FIXME("(%p)\n", This);
> +    TRACE("(%p)\n", This);
>  
> -    return E_NOTIMPL;
> +    return This->state;
>  }
>  
>  static HRESULT WINAPI xmlparser_Suspend(IXMLParser *iface)
> @@ -447,6 +448,7 @@ HRESULT XMLParser_create(void **ppObj)
>      This->nodefactory = NULL;
>      This->input = NULL;
>      This->flags = 0;
> +    This->state = XMLPARSER_IDLE;
>      This->ref = 1;
>  
>      *ppObj = &This->IXMLParser_iface;
> 

Do you have SDK headers for that interface? Having HRESULT for a state
looks a bit weird.



More information about the wine-devel mailing list