[ros-dev] Re: [ros-svn] [hbirr] 17912: The share disposition
isn't necessary for FILE_READ_ATTRIBUTES.
Hartmut Birr
osexpert at gmail.com
Wed Sep 21 18:51:25 CEST 2005
Thomas Weidenmueller wrote:
>hbirr at svn.reactos.com wrote:
>
>
>>The share disposition isn't necessary for FILE_READ_ATTRIBUTES.
>>
>>
>
>Actually this prevents opening the file during the operation.
>
Usually, it isn't possible. The share disposition is checked inside the
FSD with IoCheckShareAccess. IoCheckShareAccess can only return an
error, if one of the attributes FILE_READ_DATA, FILE_EXECUTE,
FILE_WRITE_DATA, FILE_APPEND_DATA or DELETE is set and some other
conditions are TRUE. For the single attribute FILE_READ_ATTRIBUTES, the
share disposition has no effect and IoCheckShareAccess does always
return STATUS_SUCCESS.
>A better
>candidate for GetFileAttributesEx is NtQueryFullAttributesFile
>
NtQueryFullAttributesFile does also set the share disposition, which isn't necessary.
- Hartmut
More information about the Ros-dev
mailing list