kernel32: Fix for WritePrivateProfileString Sharing Problem [1/2] (ATTEMPT 3)
ehoover at mines.edu
Fri Apr 11 08:44:03 CDT 2008
> There's no need to use ntdll functions,
I submitted prior patches that did not use ntdll, there was a complaint
about that approach since it had to push and pop the last error:
> last error doesn't matter on success, and if it does it should be set at
the end of the function
anyway (with test cases showing that it's really supposed to).
The very last test in "test_profile_sections" (an existing test) requires
GetPrivateProfileSectionA to return S_OK (ERROR_SUCCESS). I originally
submitted a patch that broke this test (plus exposed another problem, but
we'll take one step at a time). There was a complaint about this, but it
was a really long time ago so it'd take me a while to find that email.
Essentially, the write functions need to return the last error from before
they were called (part 2/2 is a conformance test for this) and the get
functions need to set the last error to ERROR_SUCCESS (as shown by an
existing test, though it actually tests against the value-equivalent S_OK).
ehoover at mines.edu
On Fri, Apr 11, 2008 at 4:02 AM, Alexandre Julliard <julliard at winehq.org>
> "Erich Hoover" <ehoover at mines.edu> writes:
> > Description:
> > Fixes incorrect file sharing mode in PROFILE_FlushFile and
> > that result in WritePrivateProfileString failing under certain
> > circumstances. This problem is specifically evident in the "Thief:
> > Shadows" installer (demo and full), which writes an empty config file
> > later causes the game to crash (Bug #5024). This version is functionally
> > equivalent to Attempt 2; however, it uses NtCreateFile so there is no
> > to push and pop the error code. This version also sets ERROR_SUCCESS,
> > opposed to S_OK, for Get* functions. Conformance test included in part
> There's no need to use ntdll functions, last error doesn't matter on
> success, and if it does it should be set at the end of the function
> anyway (with test cases showing that it's really supposed to).
> Alexandre Julliard
> julliard at winehq.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the wine-devel