KERNEL: force copying of DOS-style path into argv[0] of PE process

Alex Villací­s Lasso a_villacis at palosanto.com
Mon Oct 31 15:31:53 CST 2005


Alexandre Julliard wrote:

>Alex Villací­s Lasso <a_villacis at palosanto.com> writes:
>
>  
>
>>Sorry to disagree, but I have seen this behavior (fully qualified name 
>>in argv[0]) since MS-DOS and Windows 3.1. Even some old C tutorial books 
>>mention it in passing. I have also replicated this behavior from the 
>>command line (COMMAND.COM) in MS-Windows 98 in a DOS box, without using 
>>Explorer. My sample app prints out the argv[] array and it consistenly 
>>shows a fully qualified path to the executable in argv[0], even when run 
>>from a DOS box.
>>    
>>
>
>It's OK to change argv[0] when started from a Unix shell, but not when
>started from another Windows process. Your patch does it in all cases,
>which is not correct.
>
>  
>
Sounds reasonable. What is the proper way to tell apart the two cases?



More information about the wine-devel mailing list