GetNotificationResourceManager function

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.

Syntax

BOOL GetNotificationResourceManager(
  IN HANDLE                     ResourceManagerHandle,
  OUT PTRANSACTION_NOTIFICATION TransactionNotification,
  IN ULONG                      NotificationLength,
  IN DWORD                      dwMilliseconds,
  OUT PULONG                    ReturnLength
);

Parameters

ResourceManagerHandle

A handle to the resource manager.

TransactionNotification

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

NotificationLength

The size of the TransactionNotification buffer, in bytes.

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.

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:

Remarks

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.

Requirements

   
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

CreateEnlistment

GetNotificationResourceManagerAsync

Kernel Transaction Manager Functions

NOTIFICATION_MASK

SetResourceManagerCompletionPort

TRANSACTION_NOTIFICATION

TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT