deliver full path by argv[0] and GetCommandLine for win9x

Frank Schruefer Frank.Schruefer at t-online.de
Thu Feb 12 08:48:05 CST 2004


Alexandre Julliard wrote:
> Frank Schruefer <wine at man-made.de> writes:
> 
> 
>>-Remark in dlls/kernel/environ.c. Quote:
>>"
>>  * WARNING: there's a Windows incompatibility lurking here !
>>  * Win32s always includes the full path of the program file,
>>  * whereas Windows NT only returns the full file path plus arguments
>>  * in case the program has been started with a full path.
>>  * Win9x seems to have inherited NT behaviour.
>>"
>>Although the comment is not accurate, you get what it says and it's exactly
>>what the patch should fix.
> 
> 
> What that comment says is that Win32s behaves differently from normal
> Windows. This may or may not be true, but it's pretty much irrelevant,
> nobody in their right mind runs Win32s apps anymore.
> 
> Your patch changes the Win9x behavior, and I'd really like to see a
> test program to demonstrate that Win9x really behaves this way at the
> kernel level, not only as a side-effect of the command interpreter
> passing a full path to CreateProcess.
> 

Well, that's easily done without a testcase as it is documented by MS:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/getcommandline.asp

Quote:
"
Note  The name of the executable in the command line that the operating system provides to a process is not necessarily identical to that in the command line that the calling process gives to the CreateProcess function.
The operating system may prepend a fully qualified path to an executable name that is provided without a fully qualified path.
"

-- 
Thanks,
   Frank



More information about the wine-devel mailing list