Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/shlwapi/istream.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/dlls/shlwapi/istream.c b/dlls/shlwapi/istream.c index 43f53ffc79..623232a047 100644 --- a/dlls/shlwapi/istream.c +++ b/dlls/shlwapi/istream.c @@ -274,9 +274,20 @@ static HRESULT WINAPI IStream_fnRevert(IStream *iface) }
/************************************************************************** - * IStream_fnLockUnlockRegion + * IStream_fnLockRegion */ -static HRESULT WINAPI IStream_fnLockUnlockRegion(IStream *iface, ULARGE_INTEGER libOffset, +static HRESULT WINAPI IStream_fnLockRegion(IStream *iface, ULARGE_INTEGER libOffset, + ULARGE_INTEGER cb, DWORD dwLockType) +{ + ISHFileStream *This = impl_from_IStream(iface); + TRACE("(%p,%s,%s,%d)\n", This, wine_dbgstr_longlong(libOffset.QuadPart), wine_dbgstr_longlong(cb.QuadPart), dwLockType); + return E_NOTIMPL; +} + +/************************************************************************** + * IStream_fnUnlockRegion + */ +static HRESULT WINAPI IStream_fnUnlockRegion(IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) { ISHFileStream *This = impl_from_IStream(iface); @@ -345,8 +356,8 @@ static const IStreamVtbl SHLWAPI_fsVTable = IStream_fnCopyTo, IStream_fnCommit, IStream_fnRevert, - IStream_fnLockUnlockRegion, - IStream_fnLockUnlockRegion, + IStream_fnLockRegion, + IStream_fnUnlockRegion, IStream_fnStat, IStream_fnClone };
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/shlwapi/istream.c | 2 +- dlls/shlwapi/tests/istream.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/dlls/shlwapi/istream.c b/dlls/shlwapi/istream.c index 623232a047..a77ed8ab1b 100644 --- a/dlls/shlwapi/istream.c +++ b/dlls/shlwapi/istream.c @@ -306,7 +306,7 @@ static HRESULT WINAPI IStream_fnStat(IStream *iface, STATSTG* lpStat,
TRACE("(%p,%p,%d)\n", This, lpStat, grfStatFlag);
- if (!grfStatFlag) + if (!lpStat) return STG_E_INVALIDPOINTER;
memset(&fi, 0, sizeof(fi)); diff --git a/dlls/shlwapi/tests/istream.c b/dlls/shlwapi/tests/istream.c index f1854a283f..7d0cd617dd 100644 --- a/dlls/shlwapi/tests/istream.c +++ b/dlls/shlwapi/tests/istream.c @@ -191,6 +191,7 @@ static void test_stream_read_write(IStream *stream, DWORD mode) HRESULT ret; unsigned char buf[16]; DWORD written, count; + STATSTG statstg;
/* IStream_Read/Write from the COBJMACROS is undefined by shlwapi.h */
@@ -245,6 +246,17 @@ static void test_stream_read_write(IStream *stream, DWORD mode) ok(count == written, "expected %u, got %u\n", written, count); if (count) ok(buf[0] == 0x5e && buf[1] == 0xa7, "expected 5ea7, got %02x%02x\n", buf[0], buf[1]); + + memset(&statstg, 0xff, sizeof(statstg)); + ret = IStream_Stat(stream, &statstg, 0); + ok(ret == S_OK, "Stat failed, hr %#x.\n", ret); + ok(statstg.pwcsName != NULL, "Unexpected name %s.\n", wine_dbgstr_w(statstg.pwcsName)); + CoTaskMemFree(statstg.pwcsName); + + memset(&statstg, 0xff, sizeof(statstg)); + ret = IStream_Stat(stream, &statstg, STATFLAG_NONAME); + ok(ret == S_OK, "Stat failed, hr %#x.\n", ret); + ok(statstg.pwcsName == NULL, "Unexpected name %s.\n", wine_dbgstr_w(statstg.pwcsName)); }
static void test_stream_qi(IStream *stream)