[1/2] shlwapi: fixed the todo blocks in the SHCreateStreamOnFile tests. [try 4]

Reece Dunn msclrhd at googlemail.com
Tue Apr 15 15:18:33 CDT 2008

This patch addresses all of the todo blocks in the shlwapi/istream.c
tests. It represents the minimal set of changes needed to make them

1 - the original version, split out over 3 patches
2 - consolidated the 3 patches into a single patch
3 - use CREATE_NEW when STGM_FAILIFTHERE is used with bCreate==TRUE.
4 - removed the pv checks as they were not adding anything to the
behaviour of the Read and Write functions.

The rationale behind the change in [4] is two-fold.

1.  The first is the behaviour of Write w.r.t. returning
STG_E_ACCESSDENIED as can be seen by the test results: checking
arguments is usually the very first thing that happens.

2.  The Read and Write functions return S_OK when passed a NULL pv
pointer, not STG_E_INVALIDPOINTER as it would if the arguments were
checked. This is also seen from the test results.

The tests pass under Wine with these changes, so not checking the pv
parameter and passing it directly to the ReadFile/WriteFile methods is
a valid implementation based on the observable behaviour.

This, in conjunction with the changes noted in try 3 w.r.t. CreateFile
doing the file exists check, addresses both your comments with my
previous patch.

- Reece
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-shlwapi-fixed-the-todo-blocks-in-the-SHCreateStream.patch
Type: text/x-patch
Size: 12061 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080415/08964387/attachment-0001.bin 

More information about the wine-patches mailing list