Re: Access denied when trying to move directory in use
- From: Corinna Vinschen <corinna@xxxxxxxxxxxxxxxx>
- Date: Sat, 27 Jan 2007 10:59:51 +0000 (UTC)
Corinna Vinschen wrote:
Jeffrey Tan[MSFT] wrote:
It seems that you are using undocumented Windows API ZwSetInformationFile
with FileRenameInformation parameter to move the files/directories. It
Sigh. I didn't even realize that this is an undocumented API until
you just told me. [...]
Btw., it's irritating that ZwSetInformationFile (FileRenameInformation)
is "undocumented". FltSetInformationFile (FileRenameInformation) as
well as the FILE_RENAME_OPERATION structure *are* documented and both
refer to ZwSetInformationFile in terms of the FileRenameInformation
class, see http://msdn2.microsoft.com/en-us/library/aa488684.aspx and
http://msdn2.microsoft.com/en-us/library/ms791548.aspx(*).
I don't quite understand why such a simple and basic operation should be
treated as undocumented. It doesn't do anything hidden, dangerous, or
mysterious.
Corinna
(*) The FILE_RENAME_OPERATION documentation isn't quite correct. It claims
"A file cannot be renamed if it has any open handles, unless it is
only open because of a [...] (oplock) [...]."
A file or directory can be renamed regardless if it has an open handle
or not, as long as the open handle is opened for sharing.
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat
.
- Follow-Ups:
- Re: Access denied when trying to move directory in use
- From: "Jeffrey Tan[MSFT]"
- Re: Access denied when trying to move directory in use
- From: Don Burn
- Re: Access denied when trying to move directory in use
- From: "Jeffrey Tan[MSFT]"
- Re: Access denied when trying to move directory in use
- References:
- Access denied when trying to move directory in use
- From: Corinna Vinschen
- RE: Access denied when trying to move directory in use
- From: "Jeffrey Tan[MSFT]"
- Re: Access denied when trying to move directory in use
- From: Corinna Vinschen
- Access denied when trying to move directory in use
- Prev by Date: Re: User vs. Worker threads
- Next by Date: Re: User vs. Worker threads
- Previous by thread: Re: Access denied when trying to move directory in use
- Next by thread: Re: Access denied when trying to move directory in use
- Index(es):