CreateFile GENERIC_WRITE on a directory
Not sure if this should be in -users, but I'm trying to get the Tribes: Vengeance dedicated server going (1st person shooter) and it stops with a messagebox that it can't write to its own directory. Tracing the program with +relay reveals this: 000b:Call kernel32.CreateFileW(10415fc0 L"Z:\\home\\vengeance\\Server \\Program\\Bin\\",40000000,00000007,00000000,00000003,02000000,00000000) ret=1015b46d 000b:Call ntdll.RtlIsDosDeviceName_U(10415fc0 L"Z:\\home\\vengeance\\Server \\Program\\Bin\\") ret=554b4506 000b:Ret ntdll.RtlIsDosDeviceName_U() retval=00000000 ret=554b4506 000b:Call ntdll.RtlDosPathNameToNtPathName_U(10415fc0 L"Z:\\home\\vengeance \\Server\\Program\\Bin\\",559bebb0,00000000,00000000) ret=554b42c7 000b:Ret ntdll.RtlDosPathNameToNtPathName_U() retval=00000001 ret=554b42c7 000b:Call ntdll.NtCreateFile (559beba4,40000000,559bebb8,559beba8,00000000,00000000,00000007,00000001,00 004010,00000000,00000000) ret=554b438f 000b:Ret ntdll.NtCreateFile() retval=c00000ba ret=554b438f 000b:Call ntdll.RtlNtStatusToDosError(c00000ba) ret=554b43bd 000b:Ret ntdll.RtlNtStatusToDosError() retval=00000005 ret=554b43bd 000b:Call ntdll.RtlFreeUnicodeString(559bebb0) ret=554b43cc 000b:Ret ntdll.RtlFreeUnicodeString() retval=00000001 ret=554b43cc 000b:Ret kernel32.CreateFileW() retval=ffffffff ret=1015b46d Decoding the parameters to CreateFile show it trying to open the directory for GENERIC_WRITE. I'm about to dig into the wine sources but am hoping someone can spot the problem more quickly than me. I'm using the 20040914 source RPM from NewRPMs.
--On Sunday, October 10, 2004 3:45 PM -0700 Kenneth Porter <shiva(a)sewingwitch.com> wrote:
Opened a bugzilla:
I've since cobbled together a patch to dlls/kernel/file.c that watches for this case and switches the GENERIC_WRITE to a GENERIC_READ. This lets the app start up properly. (The patch is attached to the bug.) I'm not yet happy with my patch, as it's just a hack for this one app and is likely to break other things. Can someone more familiar with the code suggest an approach to do this the "right" way?
--On Monday, October 18, 2004 9:46 PM -0700 Kenneth Porter <shiva(a)sewingwitch.com> wrote:
I'm not yet happy with my patch, as it's just a hack for this one app and is likely to break other things.
In particular, these may break due to use of FILE_FLAG_BACKUP_SEMANTICS: dlls/winedos/int13.c dlls/winedos/int25.c programs/winefile/winefile.c
participants (2)
-
Kenneth Porter -
ScratchMonkey