// wdm.h
VOID IoSetLinkShareAccess(
[in] ACCESS_MASK DesiredAccess,
[in] ULONG DesiredShareAccess,
[in, out] PFILE_OBJECT FileObject,
[in, out] PSHARE_ACCESS ShareAccess,
[in, out, optional] PLINK_SHARE_ACCESS LinkShareAccess,
[in] ULONG IoShareAccessFlags
);
View the official Windows Driver Kit DDI referenceNo description available.
The IoSetLinkShareAccess routine sets the access rights for link sharing the specified file object.
DesiredAccess [in]Specifies an ACCESS_MASK value that indicates the desired type of access to the given file object.
DesiredShareAccess [in]Specifies the desired type of shared access to the file object for the current open request. The value of this parameter is usually the same as the ShareAccess parameter that is passed to the file system or highest-level driver by the I/O manager when the open request was made. This value can be zero, or any combination of the following:
FileObject [in, out]A pointer to the file object for which to check access for the current open request.
ShareAccess [in, out]A pointer to the common share-access data structure that is associated with FileObject. Drivers should treat this structure as opaque.
LinkShareAccess [in, out, optional]A pointer to the common link share-access data structure (LINK_SHARE_ACCESS) that is associated with FileObject. Drivers should treat this structure as opaque.
IoShareAccessFlags [in]A bitmask of these flags:
IO_SHARE_ACCESS_NO_WRITE_PERMISSION (0x80000000) specifies that the user has no write permission for the file. This flag is used to prevent opening a file for exclusive read access when the user does not have appropriate permissions.
IO_CHECK_SHARE_ACCESS_UPDATE_SHARE_ACCESS (0x00000001) indicates whether the SHARE_ACCESS structure is updated.