Fonction FsRtlAllocateFileLock (ntifs.h)

La routine FsRtlAllocateFileLock alloue et initialise une nouvelle structure FILE_LOCK.

Syntaxe

PFILE_LOCK FsRtlAllocateFileLock(
  [in, optional] PCOMPLETE_LOCK_IRP_ROUTINE CompleteLockIrpRoutine,
  [in, optional] PUNLOCK_ROUTINE            UnlockRoutine
);

Paramètres

[in, optional] CompleteLockIrpRoutine

Pointeur vers une routine de rappel PCOMPLETE_LOCK_IRP_ROUTINE à appeler lorsqu’une demande de IRP_MJ_LOCK_CONTROL est terminée. Ce paramètre est facultatif et peut être NULL.

[in, optional] UnlockRoutine

Pointeur vers une routine de rappel PUNLOCK_ROUTINE à appeler lorsque la plage d’octets est déverrouillée. Ce paramètre est facultatif et peut être NULL.

Valeur retournée

FsRtlAllocateFileLock retourne un pointeur vers la structure FILE_LOCK nouvellement allouée.

Remarques

FsRtlAllocateFileLock alloue une nouvelle structure FILE_LOCK à partir d’un pool paginé et l’initialise.

Les minifiltres doivent appeler FltAllocateFileLock au lieu de FsRtlAllocateFileLock.

Configuration requise

Condition requise Valeur
Client minimal pris en charge Windows 2000
Plateforme cible Universal
En-tête ntifs.h (include Ntifs.h)
Bibliothèque NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= APC_LEVEL
Règles de conformité DDI HwStorPortProhibitedDDIs(storport), SpNoWait(storport), StorPortStartIo(storport)

Voir aussi

FltAllocateFileLock

FsRtlAreThereCurrentFileLocks

FsRtlCheckLockForReadAccess

FsRtlCheckLockForWriteAccess

FsRtlFastCheckLockForRead

FsRtlFastCheckLockForWrite

FsRtlFastLock

FsRtlFastUnlockAll

FsRtlFastUnlockAllByKey

FsRtlFastUnlockSingle

FsRtlGetNextFileLock

FsRtlInitializeFileLock

FsRtlProcessFileLock

FsRtlUninitializeFileLock

IRP_MJ_LOCK_CONTROL

PCOMPLETE_LOCK_IRP_ROUTINE

PUNLOCK_ROUTINE