Commit 55af98d1 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

opcservices: Update content stream position on Read().

parent 8479238f
......@@ -560,6 +560,8 @@ static HRESULT WINAPI opc_content_stream_Read(IStream *iface, void *buff, ULONG
if (*num_read)
memcpy(buff, stream->content->data + stream->pos.QuadPart, *num_read);
stream->pos.QuadPart += *num_read;
return S_OK;
}
......
......@@ -159,6 +159,11 @@ static void test_package(void)
ok(hr == S_OK, "Failed to read content, hr %#x.\n", hr);
ok(!memcmp(buff, "abc", 3), "Unexpected content.\n");
move.QuadPart = 0;
hr = IStream_Seek(stream2, move, STREAM_SEEK_CUR, &pos);
ok(SUCCEEDED(hr), "Seek failed, hr %#x.\n", hr);
ok(pos.QuadPart == 3, "Unexpected position.\n");
IStream_Release(stream);
IStream_Release(stream2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment