The IoAdjustPagingPathCount routine increments or decrements a caller-supplied page-file counter as an atomic operation.
VOID
IoAdjustPagingPathCount(
IN PLONG Count,
IN BOOLEAN Increment
);
None
Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.
This routine is useful for maintaining a count of paging files on a device. The operating system notifies a driver that a paging file has been created on, or removed from, one of the driver's devices by sending an IRP. The IRP has the major code IRP_MJ_PNP and the minor code IRP_MN_DEVICE_USAGE_NOTIFICATION.
This routine can be used for other counters, such as counters for hibernation files or crash-dump files.
Callers of IoAdjustPagingPathCount can be running at any IRQL.