IoUpdateLinkShareAccess - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdm.h

VOID IoUpdateLinkShareAccess(
  [in]                PFILE_OBJECT       FileObject,
  [in, out]           PSHARE_ACCESS      ShareAccess,
  [in, out, optional] PLINK_SHARE_ACCESS LinkShareAccess
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdm-ioupdatelinkshareaccess)

IoUpdateLinkShareAccess function

Description

The IoUpdateLinkShareAccess routine updates the share access for the given file object, usually when the file is being opened.

Parameters

FileObject [in]

Pointer to the file object, which usually is being closed by the current thread.

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.

Remarks

IoUpdateLinkShareAccess is not an atomic operation. Therefore, drivers calling this routine must protect the shared file object passed to IoUpdateLinkShareAccess by means of some kind of lock, such as a mutex or a resource lock, in order to prevent corruption of the shared access counts.

Before calling IoUpdateLinkShareAccess, the caller must successfully call IoCheckLinkShareAccess with Update set to False. Such a call to IoCheckLinkShareAccess determines whether the requested shared access is compatible with the way the file object is currently being accessed by other opens, but it does not update the SHARE_ACCESS structure. IoUpdateLinkShareAccess actually updates the SHARE_ACCESS structure associated with the file object.

See also

IoCheckLinkShareAccess

IoRemoveLinkShareAccess

IoSetLinkShareAccess