[PATCH] HOMAM III fix
Martin Lexa
mlexa at iol.cz
Fri Apr 5 13:58:52 CST 2002
* Andreas Mohr (andi at rhlx01.fht-esslingen.de) wrote:
> Actually GetFullPathName was known to have some trailing \\ issue.
> So this had to be fixed somehow.
> It just astonished me a bit to see some code part completely removed
> instead of a "real" fix.
> But he said that he can't think of any occasion where it breaks,
> so it might be ok.
And there is another strange thing...
HOMAM III is installed in C:\Program Files\3DO\Heroes3 directory. If
I run wine from this directory with HEROES3.EXE as parameter everything
works ok, of course, after "fix". However, if I run wine from, for
example C:\Program Files\3D0 directory, it gave me error "Unable to
initialize resources - ...".
wine --debugmsg +all 'C:\Program Files\3DO\Heroes3\HEROES3.EXE'
Debug output:
.
.
.
0806fa00:trace:reg:NtQueryValueKey (0x58,L"AppPath",2,0x40896ab4,256)
0806fa00: get_key_value( hkey=88, name=L"AppPath" ) Get key \\Machine\\Software\\New World Computing\\Heroes of Might and Magic\xae III\\1.0 value "AppPath"="C:\\Program Files\\3DO\\"
0806fa00: get_key_value() = 0 { type=1, total=44, data={43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,00,46,00,69,00,6c,00,65,00,73,00,5c,00,33,00,44,00,4f,00,5c,00,00,00} }
.
.
.
Call kernel32.GetFullPathNameA(005d78d0 ".\\DATA\\",00000104,40896cac,40896c9c) ret=00599630
trace:dosfs:DOSFS_GetFullName . (last=0)
trace:string:lstrcpynA (0x40896398, "/opt/c", 1024)
trace:string:lstrcpynA (0x4089639f, "Program Files/3DO", 1017)
trace:string:lstrcpynA (0x4089679b, "PROG~FBU\\3DO", 1021)
trace:dosfs:DOSFS_GetFullName returning /opt/c/Program Files/3DO = C:\PROG~FBU\3DO
trace:string:lstrcpynA (0x4089679a, "/Program Files/3DO", 1021)
0806fa00:trace:string:lstrcpynA (0x408967ad, ".\\DATA\\", 1003)
0806fa00:trace:dosfs:DOSFS_DoGetFullPathName got C:\Program Files\3DO\DATA\
0806fa00:trace:string:lstrcpynA (0x40896cac, "C:\\Program Files\\3DO\\DATA\\", 260)
0806fa00:trace:dosfs:DOSFS_DoGetFullPathName returning 'C:\Program Files\3DO\DATA\'
.
.
.
Look at the final path, it's WRONG. It should be 'C:\Program Files\3DO\HEROES3\DATA\'.
If I run wine from directory 'C:\Program Files' the final path is
even worse -> 'C:\Program Files\DATA\'.
And yes, same happen if try it without my fix - except that last
backslash.
What's going on here? I don't understand this. Looks like black magic
to me ;)
Martin
More information about the wine-devel
mailing list