GetNotificationResourceManager function (ktmw32.h)

Requests and receives a notification for a resource manager (RM). This function is used by the RM register to receive notifications when a transaction changes state.


BOOL GetNotificationResourceManager(
  [in]            HANDLE                    ResourceManagerHandle,
  [out]           PTRANSACTION_NOTIFICATION TransactionNotification,
  [in]            ULONG                     NotificationLength,
  [in, optional]  DWORD                     dwMilliseconds,
  [out, optional] PULONG                    ReturnLength


[in] ResourceManagerHandle

A handle to the resource manager.

[out] TransactionNotification

A pointer to a TRANSACTION_NOTIFICATION structure that receives the first available notification.

[in] NotificationLength

The size of the TransactionNotification buffer, in bytes.

[in, optional] dwMilliseconds

The time, in milliseconds, for which the calling application is blocking while waiting for the notification to become available. If no notifications are available when the timeout expires, ERROR_TIMEOUT is returned.

[out, optional] ReturnLength

A pointer to a variable that receives the actual size of the notification received by the TransactionNotification parameter.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero (0). To get extended error information, call the GetLastError function.

The following list identifies the possible error codes:


All resource managers must register to receive TRANSACTION_NOTIFY_PREPREPARE, TRANSACTION_NOTIFY_PREPARE, and TRANSACTION_NOTIFY_COMMIT notifications, even if they subsequently call ReadOnlyEnlistment to mark an enlistment as read-only. Resource managers can support TRANSACTION_NOTIFY_SINGLE_PHASE_COMMIT, but they must also support the multi-phase pre-prepare, prepare, and commit notifications. For the list of all notifications that resource managers can receive, see TRANSACTION_NOTIFICATION.


Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header ktmw32.h
Library KtmW32.lib
DLL KtmW32.dll

See also



Kernel Transaction Manager Functions