Nikolay Sivov nsivov@codeweavers.com wrote:
static int XMLCALL domdoc_stream_save_closecallback(void *ctx) {
- ULONG written;
- HRESULT hr;
- hr = IStream_Write((IStream*)ctx, "\0", 1, &written);
- if (hr != S_OK)
- {
WARN("stream write error: 0x%08x\n", hr);
hr = -1;
- }
- IStream_Release((IStream*)ctx);
- return 0;
- return hr;
}
This will need a test on its own, if it really does that.
It appears that Windows started to do that since Windows 8. What kind of test would you like to see?
Callback should return 0 or -1, as documented.
Yes, and the logic in domdoc_stream_save_closecallback() follows that.