Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT cygwin DOT com Delivered-To: mailing list cygwin-developers AT cygwin DOT com From: "Gerald S. Williams" To: Subject: Re: True case-sensitive filenames Date: Fri, 24 Jan 2003 13:01:19 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Importance: Normal In-Reply-To: > 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