steve.lustbader at steve.lustbader at
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").


                      Julliard                     To:  Steve Lustbader/ANR/MS/PHILIPS at AMEC                                                                                                                   
                      <julliard at winehq             cc:  Uwe Bonnes <bon at>                                                                                                  
                      .com>                         wine-devel at                                                                                                                                     
                      Sent by:                     Subject:   Re: GetCommandLine                                                                                                                              
                      julliard at winehq.                                                                                                                                                                        
                      com                          Classification:                                                                                                                                            
                      10/17/2002 01:49                                                                                                                                                                        

steve.lustbader at writes:

> I uploaded a zip of both the source and the executables to
> (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

More information about the wine-devel mailing list