I am looking at dlls/kernel/process.cc:get_file_name that parses the command line. It seems to handle the case where the application name has spaces in it but the application name is not enclosed in double quotes. According to MSDN documentation, CreateProcess requires the app name(and the app name in the command line) to be enclosed in quotes if it has spaces in it. But wine seems to be extra intelligent and guess the app name using SearchPath in find_exe_file. I am looking for a test case for this, I am unable to find it in kernel/tests/process.cc. Can someone clarify if it is really required to handle this case?
thanks in advance --r
__________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com
Rufoo wrote: I am
looking for a test case for this, I am unable to find it in kernel/tests/process.cc. Can someone clarify if it is really required to handle this case?
How about writing a test case and show us that the behaviour is wrong?
Mike
On Thu, 10 Nov 2005, Rufoo wrote:
I am looking at dlls/kernel/process.cc:get_file_name that parses the command line. It seems to handle the case where the application name has spaces in it but the application name is not enclosed in double quotes. According to MSDN documentation, CreateProcess requires the app name(and the app name in the command line) to be enclosed in quotes if it has spaces in it.
Please check MSDN again. Here is what it says: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/bas...
--- The lpApplicationName parameter can be NULL. In that case, the module name must be the first white space-delimited token in the lpCommandLine string. If you are using a long file name that contains a space, use quoted strings to indicate where the file name ends and the arguments begin; otherwise, the file name is ambiguous. For example, consider the string "c:\program files\sub dir\program name". This string can be interpreted in a number of ways. The system tries to interpret the possibilities in the following order:
c:\program.exe files\sub dir\program name c:\program files\sub.exe dir\program name c:\program files\sub dir\program.exe name c:\program files\sub dir\program name.exe ---
The most significant part being 'The system tries to interpret the possibilities'. And it's quite common for applications to rely on this.
According to MSDN documentation, CreateProcess requires the app name(and the app name in the
command
line) to be enclosed in quotes if it has spaces in
it.
Please check MSDN again. Here is what it says:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/bas...
Yep, I realized that after reading Mike's response.
__________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com