Fwd: Re: [kernel] correct OpenFile test
-- Maxime Bellengé <maxime.bellenge(a)wanadoo.fr> wrote:
Hello,
You can try this application installer : http://jatennis.free.fr/jatinst32.php
I've had a look and the installer is failing because of the result returned by : 0009:Call version.VerFindFileA(00000000,0040b4ec "JaTennis32.exe",0040e268 "c:\\Windows",00417bf4 "Z:\\var\\work\\crosovergames\\downloads\\bugs\\OpenFile regression\\",004179e4,7babfe0c,00417af0,7babfe10) ret=0040143d VerFindFileA then goes on to call OpenFile, so I expect that the error is VerFindFileA is testing the result of OpenFile against FALSE instead of using TRUE or HFILE_ERROR. .... VerFindFileA is returing 2 (VFF_FILEINUSE) if OpenFile returns HFILE_ERROR, but it's returning 0 if OpenFile returns FALSE. I think it's a good idea to revert OpenFile and fix VerFindFileA. Oliver.
With the OF_EXIST flag:
if OpenFile returns HFILE_ERROR , the installers fails
if OpenFile returns FALSE, the installers works very well like on windows.
Maxime
On Mon, 2005-10-17 at 15:20 +0100, Oliver Stieber wrote:
--- Dmitry Timoshkov <dmitry(a)baikal.ru> wrote:
"Oliver Stieber" <oliver_stieber(a)yahoo.co.uk> wrote:
This patch corrects the test for OpenFile with a style of OF_EXIST. The test should fail if the function returns anything other than HFILE_ERROR as a failure. This is based on http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/o... and debugging 'No One Lives Forever Demo' (ftp://ftp.lith.com/pub/nolf/NOLFDemo.zip)
Did you run the test on a real Windows machine or just have read MSDN?
I've haven't run it on a real Windows machine as my windows install is broken at the moment. Returning HFILE_ERROR is the only thing that fixes 'No One Lives Forever Demo' so I'm puzzled as to why the test is incorrect in the first place. (Also I haven't debugged the No One Lives Forever Demo to verify that it is doing a cmp eax, HFILE_ERROR, but I can do).
Oliver.
-- Dmitry.
___________________________________________________________ To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com
participants (1)
-
Oliver Stieber