GetCommandLine
steve.lustbader at philips.com
steve.lustbader at philips.com
Thu Oct 17 13:36:41 CDT 2002
This patch pretty much fixes it. It still isn't quite right, although
this probably isn't the same problem. In windows, GetCommandLine returns
a string with quotes around it, while in wine, only the sub process command
line has quotes around it (ie, in windows the first window displays
"MainProc.exe", while the second displays "SubProc.exe", while in wine it's
MainProc.exe and "SubProc.exe").
-Steve
Alexandre
Julliard To: Steve Lustbader/ANR/MS/PHILIPS at AMEC
<julliard at winehq cc: Uwe Bonnes <bon at elektron.ikp.physik.tu-darmstadt.de>
.com> wine-devel at winehq.com
Sent by: Subject: Re: GetCommandLine
julliard at winehq.
com Classification:
10/17/2002 01:49
PM
steve.lustbader at philips.com writes:
> I uploaded a zip of both the source and the executables to
> http://www.lustbader.net/getcmdlinetest/ (it's a modification of the "Hello
> World" app generated by MSVC automatically). Run MainProc.exe and choose
> Help, About, which will run the other process (make sure to run MainProc.exe
> from the directory it's in). Both windows should display the commandline they
> were started with. In Windows, you should see one window display MainProc.exe
> and the other display SubProc.exe.
Thanks for the test program. This should fix it:
Index: scheduler/process.c
===================================================================
RCS file: /opt/cvs-commit/wine/scheduler/process.c,v
retrieving revision 1.201
diff -u -r1.201 process.c
--- scheduler/process.c 9 Oct 2002 18:35:02 -0000 1.201
+++ scheduler/process.c 17 Oct 2002 17:45:11 -0000
@@ -1078,7 +1078,7 @@
/* use the unmodified app name as file name */
lstrcpynA( buffer, appname, buflen );
*handle = open_exe_file( buffer );
- if (!(ret = cmdline))
+ if (!(ret = cmdline) || !cmdline[0])
{
/* no command-line, create one */
if ((ret = HeapAlloc( GetProcessHeap(), 0, strlen(appname) + 3 )))
--
Alexandre Julliard
julliard at winehq.com
More information about the wine-devel
mailing list