current directories

Eric Pouech pouech-eric at wanadoo.fr
Sun May 4 11:46:35 CDT 2003


Dan Kegel wrote:
> Eric wrote:
> 
>> - our current {Get|Set}CurrentDirectory functions behave like the 
>> win16 implementation, and maintain a/ a default drive, b/ a default 
>> directory on each drive
> 
> 
> That's what I expect as a user when doing "cd"'s and changing drive
> letters at the command.com prompt.  I just verified that this is
> what one sees from command.com in windows me:
> 
> C:\> cd d:vss
> C:\> d:
> D:\VSS>
> 
> So if win32 isn't doing it, command.com is simulating it?
yes, the shell does it from what I see (it's supposed to be default 
behavior for DOS and Win16 programs)

>> - Win32, on the other end, just maintains a current directory. When 
>> using a relative path with a drive letter (like c:foo), win32 actually 
>> uses the directory on drive c:, defined at startup (and passed into 
>> the =c: environment variable)
>> - the =#: (# in [A,Z]) environment variable is never changed (even 
>> when changing the current directory)
> 
> 
> How do you display those variables?  I have a C program that
> iterates through envp[] and it doesn't see 'em.

GetEnvironmentVariable (which is the TRUE win32 API)
envp comes from msvcrt (which also seems to implement the per-drive 
current directory scheme thru the _chdir (and the likes))

A+
-- 
Eric Pouech




More information about the wine-devel mailing list