True case-sensitive filenames
Gerald S. Williams
gsw@agere.com
Fri Jan 24 18:01:00 GMT 2003
> The next thing to try is attempting to set the current
> working directory using NtSetInformationProcess(). I'm
> currently way over my Cygwin-development allotment for
> this week, though.
I just couldn't let this one sit, so I stayed up late
working on it. Sure enough, you can set the current
directory in a case-sensitive fashion. I verified that
GetCurrentDirectory() responds to the change (Cygwin's
getcwd() currently doesn't, of course).
You don't actually use NtSetInformationProcess()--you
just need to get at the PEB somehow (you could use
NtQueryInformationProcess(), but NtCurrentTeb()->Peb
is faster). Peb->FastPebLockRoutine(Peb->FastPebLock)
locks the structure, then you can directly change
Peb->ProcessParameters->CurrentDirectoryHandle and
Peb->ProcessParameters->CurrentDirectoryName.
-Jerry
More information about the Cygwin-developers
mailing list