Hi,
I'm trying to fix the tests in shlwapi/tests/shreg.c (or Wine for that matter).
One thing that puzzles me in the current code is the checks done after we receive a ERROR_MORE_DATA when we pass a size smaller than the actual data.
MSDN states:
If the buffer specified by pvData parameter is not large enough to hold the data, the function returns ERROR_MORE_DATA and stores the required buffer size in the variable pointed to by pcbData. In this case, the contents of the pvData buffer are undefined.
If that's the case, what's the use of checking the returned buffer with something?
Wine and Win98 leave the buffer intact (the contents and thus size differ however) WinXPProf and W2KProf clear (so it seems) the buffer.
Cheers,
Paul Vriens.
On Mon, 17 Jan 2005 23:05:59 +0100, Paul Vriens wrote:
Wine and Win98 leave the buffer intact (the contents and thus size differ however) WinXPProf and W2KProf clear (so it seems) the buffer.
That's why it's tested - MSDN is useful but not what we care about. You can guarantee if NT clears the buffer, somebody somewhere will have written an app which relies on it (or vice-versa).
On Mon, 2005-01-17 at 23:33, Mike Hearn wrote:
On Mon, 17 Jan 2005 23:05:59 +0100, Paul Vriens wrote:
Wine and Win98 leave the buffer intact (the contents and thus size differ however) WinXPProf and W2KProf clear (so it seems) the buffer.
That's why it's tested - MSDN is useful but not what we care about. You can guarantee if NT clears the buffer, somebody somewhere will have written an app which relies on it (or vice-versa).
OK. It's one thing to make the tests pass but another to have Wine act a certain way.
- If there are so many different results, how can one cater for that in the tests? Having a lot of different possible results for a test to pass looks a bit strange.
- Wine currently acts (with certain data) different than all the mentioned OS's. How do we cater in Wine for all the differences, or is win98 the default?
Paul.