[PATCH 4/5] xmllite/tests: Add basic test structure for IXmlReader

Paul Vriens paul.vriens.wine at gmail.com
Fri Jan 22 02:20:04 CST 2010


On 01/21/2010 07:20 PM, Reece Dunn wrote:
>
> ?_?
>
> Hmmm. According to
> http://msdn.microsoft.com/en-us/magazine/cc163436.aspx, this should
> work (but then msdn isn't always right).
>
> Do you know what happens if the CoGetMalloc/IMalloc_DidAlloc call is not made?

If I leave this out the test doesn't crash.

>
> According to that MSDN article, the CoInitialize is not needed. Does
> removing it make it work on Vista SP0?

Nope. But if that's the true the test should probably be changed to 
check for that?

>
> Shouldn't the IMalloc object be released?

I thought it was just a pointer?

>
> IMalloc_DidAlloc returns an int instead of a HRESULT (not a big issue,
> just can be confusing if someone expects HRESULT codes for the value
> of hr -- doing hr != 1 looks odd).

True, this could be written nicer. I leave that to Nikolay as he 
struggles through xmllite.

>
> Is the IXmlReader object valid (i.e. does a call to Read fail with an
> error that there is no input set, or does it crash)?
>
>     XmlNodeType nodeType = XmlNodeType_None;
>     hr = IXmlReader_Read(reader,&nodeType);
>     ok(FAILED(hr), "IXmlReader_Read should fail!");
>
> - Reece

Haven't checked that last one as we found that 
CoGetMalloc/IMalloc_DidAlloc is the culprit. It still only happens on 
Vista SP0 and looks like a valid call sequence, not?

I'm not sure what the intention for this piece of code was btw. Was it 
to prove what allocated the memory (or rather what didn't)?

-- 
Cheers,

Paul.



More information about the wine-devel mailing list