fix 4 tests for shreg in xp
truiken at gmail.com
Wed Nov 10 13:15:22 CST 2004
I've done some testing the shlwapi, and I've found that SHQueryValueEx
just makes a call to SHRegGetValue (makes sense) which has this to say
[in, out] Pointer to a DWORD that, on entry, contains the size of
the destination data buffer pvData, in bytes. This value can be NULL
only if pvData is NULL. On exit, pcbData points to one of these
pvData Return Value pcbData
NULL ERROR_SUCCESS Size in bytes sufficient to hold the
registry data. Note that this is not guaranteed to be the precise
size, but only a sufficient size.
Non-NULL ERROR_SUCCESS Exact number of bytes written to pvData.
Non-NULL ERROR_MORE_DATA Size in bytes needed to hold the entire
data. Note that this is not guaranteed to be the precise size, but
only a sufficient size.
The key parts are when it says that the size returned isn't always
going to be the precise size, but a sufficient size which is >= the
size of the value returned. This patch fixes 4 tests that were
failing on xp because they tested the size returned to be equal to the
strlen + 1 of the value when it should be greater than or equal.
These 4 tests now pass on xp.
* make four shreg tests pass on xp
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1798 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20041110/03b6115a/shreg-test.bin
More information about the wine-patches