Module: wine Branch: master Commit: a552c2ead7c406dd75dc49d32c797f3d1863a846 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=a552c2ead7c406dd75dc49d3...
Author: Robert Shearman rob@codeweavers.com Date: Mon Sep 11 11:11:56 2006 +0100
ole32: Fix the HGLOBAL stream IStream_Read function to return S_OK even if not all of the requested bytes were available.
---
dlls/ole32/hglobalstream.c | 7 ++----- dlls/ole32/tests/hglobalstream.c | 2 -- 2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/dlls/ole32/hglobalstream.c b/dlls/ole32/hglobalstream.c index eb2af30..7c78d68 100644 --- a/dlls/ole32/hglobalstream.c +++ b/dlls/ole32/hglobalstream.c @@ -255,14 +255,11 @@ static HRESULT WINAPI HGLOBALStreamImpl_ GlobalUnlock(This->supportHandle);
/* - * The function returns S_OK if the buffer was filled completely - * it returns S_FALSE if the end of the stream is reached before the + * Always returns S_OK even if the end of the stream is reached before the * buffer is filled */ - if(*pcbRead == cb) - return S_OK;
- return S_FALSE; + return S_OK; }
/*** diff --git a/dlls/ole32/tests/hglobalstream.c b/dlls/ole32/tests/hglobalstream.c index f335852..df63093 100644 --- a/dlls/ole32/tests/hglobalstream.c +++ b/dlls/ole32/tests/hglobalstream.c @@ -53,9 +53,7 @@ static void test_streamonhglobal(IStream
/* should return S_OK, not S_FALSE */ hr = IStream_Read(pStream, buffer, sizeof(buffer), &read); - todo_wine { ok_ole_success(hr, "IStream_Read"); - } ok(read == sizeof(data), "IStream_Read returned read %ld instead of %d\n", read, sizeof(data));
/* ignores HighPart */