IoDecrementKeepAliveCount function

The IoDecrementKeepAliveCount routine decrements a reference count associated with an Windows app on a specific device. This routine is called by a kernel mode driver when the app's I/O process has completed. If the app's reference count drops to 0, Windows can suspend the app.

Syntax

NTKERNELAPI NTSTATUS IoDecrementKeepAliveCount(
  PFILE_OBJECT FileObject,
  PEPROCESS    Process
);

Parameters

FileObject

The file object handle to the device.

Process

The process associated with the device.

Return Value

This routine returns STATUS_SUCCESS on success, or the appropriate NTSTATUS error code on failure. NTSTATUS error codes are defined in Ntstatus.h.

Requirements

   
Windows version Available in Windows 8.
Target Platform Universal
Header ntddk.h (include Ntddk.h)
Library Ntoskrnl.lib
DLL Ntoskrnl.exe