IoRemoveLinkShareAccess - NtDoc

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

VOID IoRemoveLinkShareAccess(
  [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-ioremovelinkshareaccess)

IoRemoveLinkShareAccess function

Description

The IoRemoveLinkShareAccess routine removes the access and link share-access information for a given open instance of a file object.

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

This routine is a reciprocal to IoUpdateLinkShareAccess.

IoRemoveLinkShareAccess is not an atomic operation. Therefore, drivers calling this routine must protect the shared file object passed to IoRemoveLinkShareAccess 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.

Callers of IoRemoveLinkShareAccess must be running at IRQL = PASSIVE_LEVEL and in the context of the thread that requested that the FileObject be closed.

See also

IoCheckLinkShareAccess

IoSetLinkShareAccess

IoUpdateLinkShareAccess