[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Winedbg and WINE_MODREF->filename
From: Uwe Bonnes <bon () elektron ! ikp ! physik ! tu-darmstadt ! de>
Date: 2000-05-31 21:53:59
[Download RAW message or body]
Hallo,
some program reports with a messagebox about some file not found. This file
reported has a unix path, while dos-notation is required. This only
happens when the program is started with "winedbg prog.exe".
There is a call to GetModuleFileNameA somewhere before the MessageBox
and this GetModuleFileNameA retrieves a unix path.
GetModuleFileNameA itself gets the path from WINE_MODREF->filename and
WINE_MODREF->filename is set by a call to PROCESS_InitWine
(winedbg.spec.c).
I think that it is winedbg that is wrong in delivering a unix path to
PROCESS_InitWine and that the other involved procedures like
server/process.c:init_process and
scheduler/process.c:PROCESS_InitWine shouldn't be able to cope with
main_exe_name as unix pathes.
If PROCESS_InitWine should handle that case, appended patch does work
for me. Should WINE_MODREF->filename be a Long or a short filename. If
we need a long file name, we need another call to GetFullPathname...
Bye
Uwe Bonnes bon@elektron.ikp.physik.tu-darmstadt.de
Free Software: If you contribute nothing, expect nothing
--
Index: wine/scheduler/process.c
===================================================================
RCS file: /home/wine/wine/scheduler/process.c,v
retrieving revision 1.95
diff -u -r1.95 process.c
--- wine/scheduler/process.c 2000/05/30 19:48:18 1.95
+++ wine/scheduler/process.c 2000/05/31 21:48:02
@@ -424,6 +424,7 @@
void PROCESS_InitWine( int argc, char *argv[] )
{
DWORD type;
+ DOS_FULL_NAME fulldosname;
/* Initialize everything */
if (!MAIN_MainInit( argv )) exit(1);
@@ -448,6 +449,19 @@
ExitProcess(1);
}
}
+ if (!DOSFS_GetFullName(main_exe_name,TRUE,&fulldosname))
+ {
+ MESSAGE( "Can't get Dos path for %s, trying anyways\n", main_exe_name);
+ }
+ else
+ {
+ free(main_exe_name);
+ if (!(main_exe_name = strdup(fulldosname.short_name)))
+ {
+ MESSAGE( "%s: out of memory\n", argv0 );
+ ExitProcess(1);
+ }
+ }
if (main_exe_file == INVALID_HANDLE_VALUE)
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic