I think there is a problem with the check_sharing function in server/fd.c.
At the end of the function when it is checking existing_access with the sharing variable it doesn't seem to care about what the caller is requesting.
I think this is what is causing problems with the CreateFile call, because the check_sharing function doesn't care if you don't even want write access it will still check if you have the sharing bit.
I have created a patch that will hopefully solve the real problem instead of the hack in WriteProfileString, I am not sure it is the 100% correct way to do it yet.
On 8/16/07, Louis Lenders xerox_xerox2000@yahoo.co.uk wrote:
Zhongli Xu <zhongli.xu <at> gmail.com> writes:
Hi all,I run some tests about mixed using WritePrivateProfileString and stand
file operationsCodes look like this:GetPrivateProfileString(keyname, value);fopen();fprintf("# comments");
fclose();WritePrivateProfileString(keyname, newvalue);What I found in the file
is that either WritePrivateProfileString operation succeeded(newvalue has been written) or fprintf succeeded("#comments" shows up in the file).
On windows hosts, there is no such problem.Any suggestion or idea is
welcomed.Thanks.Milo
I don't know if it's the same issue but i know there is a bug in wine's implementation of WritePrivateProfileString. See http://bugs.winehq.org/show_bug.cgi?id=5024
I currently use this hack http://bugs.winehq.org/attachment.cgi?id=6750 to install the game. Maybe it helps for your app too, and maybe someone could pick up this bug.