> There's no need to use ntdll functions,<br><br>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:<br><a href="http://www.winehq.org/pipermail/wine-devel/2008-April/064657.html">http://www.winehq.org/pipermail/wine-devel/2008-April/064657.html</a><br>
<br>> last error doesn't matter on success, and if it does it should be set at the end of the function<br>
anyway (with test cases showing that it's really supposed to).<br>
<font color="#888888"><br></font>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).<br>
<br>Erich Hoover<br><a href="mailto:ehoover@mines.edu">ehoover@mines.edu</a><br><br><div class="gmail_quote">On Fri, Apr 11, 2008 at 4:02 AM, Alexandre Julliard <<a href="mailto:julliard@winehq.org">julliard@winehq.org</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">"Erich Hoover" <<a href="mailto:ehoover@mines.edu">ehoover@mines.edu</a>> writes:<br>
<br>
> Description:<br>
> Fixes incorrect file sharing mode in PROFILE_FlushFile and PROFILE_Open<br>
> that result in WritePrivateProfileString failing under certain<br>
> circumstances. This problem is specifically evident in the "Thief: Deadly<br>
> Shadows" installer (demo and full), which writes an empty config file that<br>
> later causes the game to crash (Bug #5024). This version is functionally<br>
> equivalent to Attempt 2; however, it uses NtCreateFile so there is no need<br>
> to push and pop the error code. This version also sets ERROR_SUCCESS, as<br>
> opposed to S_OK, for Get* functions. Conformance test included in part 2.<br>
<br>
</div>There's no need to use ntdll functions, last error doesn't matter on<br>
success, and if it does it should be set at the end of the function<br>
anyway (with test cases showing that it's really supposed to).<br>
<font color="#888888"><br>
--<br>
Alexandre Julliard<br>
<a href="mailto:julliard@winehq.org">julliard@winehq.org</a><br>
</font></blockquote></div><br>