IoSetFileObjectIgnoreSharing function (ntddk.h)

The IoSetFileObjectIgnoreSharing routine sets a file object to ignore file sharing access checks.

Syntax

NTSTATUS IoSetFileObjectIgnoreSharing(
  PFILE_OBJECT FileObject
);

Parameters

FileObject

Pointer to a file object for the file.

Return value

IoSetFileObjectIgnoreSharing returns STATUS_SUCCESS or an appropriate NTSTATUS code such as one of the following:

Return code Description
STATUS_NOT_FOUND The option information for FileObject was not found. The status of sharing access checking cannot be set.
STATUS_INSUFFICIENT_RESOURCES The option information was not created for FileObject. The status of sharing access checking cannot be set.

Requirements

Requirement Value
Minimum supported client This routine is available starting with Windows 7.
Target Platform Universal
Header ntddk.h (include Ntddk.h, Ntifs.h, Fltkernel.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL Any

See also

IoIsFileObjectIgnoringSharing