ZwGetNotificationResourceManager routine

The ZwGetNotificationResourceManager routine retrieves the next transaction notification from a specified resource manager's notification queue.


NTSTATUS ZwGetNotificationResourceManager(
  _In_      HANDLE                    ResourceManagerHandle,
  _Out_     PTRANSACTION_NOTIFICATION TransactionNotification,
  _In_      ULONG                     NotificationLength,
  _In_      PLARGE_INTEGER            Timeout,
  _Out_opt_ PULONG                    ReturnLength,
  _In_      ULONG                     Asynchronous,
  _In_opt_  ULONG_PTR                 AsynchronousContext


ResourceManagerHandle [in]

A handle to a resource manager object that was obtained by a previous call to ZwCreateResourceManager or ZwOpenResourceManager. The handle must have RESOURCEMANAGER_GET_NOTIFICATION access to the object.

TransactionNotification [out]

A pointer to a caller-allocated buffer that receives information about the retrieved notification. The buffer must be large enough to contain a TRANSACTION_NOTIFICATION structure plus additional notification-specific arguments.

NotificationLength [in]

The length, in bytes, of the buffer that the TransactionNotification parameter points to.

Timeout [in]

A pointer to a value that specifies a relative or absolute time, in units of 100 nanoseconds. This pointer is optional and can be NULL.

If the pointer is NULL, ZwGetNotificationResourceManager does not return until a transaction notification is available. If a time value is specified, ZwGetNotificationResourceManager returns when a notification is available or after the specified time elapses, whichever comes first.

A negative value specifies a time that is relative to the current system time. For example, a relative time value of five seconds causes ZwGetNotificationResourceManager to time out five seconds after it is called.

A positive value specifies an absolute time, which is actually relative to 00:00, January 1, 1601. If an absolute time value is specified, the operating system adds the absolute time value to the time value that represents 00:00, January 1, 1601.

If the caller specifies a zero value (instead of a NULL pointer), ZwGetNotificationResourceManager returns immediately, whether a notification is available or not.

ReturnLength [out, optional]

An optional pointer to a variable. If this pointer is not NULL, and if the NotificationLength parameter's value is too small, ZwGetNotificationResourceManager supplies the required length in the variable and returns STATUS_BUFFER_TOO_SMALL.

Asynchronous [in]

A ULONG value that must be zero. ZwGetNotificationResourceManager does not support asynchronous notifications. Use TmEnableCallbacks to enable asynchronous notifications.

AsynchronousContext [in, optional]

A pointer to a ULONG value. This pointer must be NULL.

Return value

ZwGetNotificationResourceManager returns STATUS_SUCCESS if the operation succeeds and a notification is available. Otherwise, this routine might return one of the following values:

Return codeDescription

The time-out interval that Timeout specifies elapsed before a notification became available.


The specified handle is not a handle to a resource manager object.


The object handle is invalid.


The caller does not have appropriate access to the resource manager object.


The NotificationLength parameter's value is too small.


The routine might return other NTSTATUS values.


Use the ZwGetNotificationResourceManager routine to obtain notifications synchronously. Use the TmEnableCallbacks routine to enable asynchronous notifications.

The received TRANSACTION_NOTIFICATION structure contains the enlistment key that the resource manager specified when it called ZwCreateEnlistment. You can use the enlistment key to identify the enlistment that the notification applies to.

For more information about the ZwGetNotificationResourceManager routine, see Creating a Resource Manager.


Target platform

Universal, introduced version 10.0.10030.0


Available in Windows Vista and later operating system versions.


Wdm.h (include Wdm.h or Ntifs.h)







DDI compliance rules

PowerIrpDDis, HwStorPortProhibitedDDIs

See also




Send comments about this topic to Microsoft

© 2015 Microsoft