Export (0) Print
Expand All

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 WINAPI GetNotificationResourceManager(
  _In_       HANDLE ResourceManagerHandle,
  _Out_      PTRANSACTION_NOTIFICATION TransactionNotification,
  _In_       ULONG NotificationLength,
  _In_opt_   DWORD dwMilliseconds,
  _Out_opt_  PULONG ReturnLength
);

Parameters

ResourceManagerHandle [in]

A handle to the resource manager.

TransactionNotification [out]

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

NotificationLength [in]

The size of the TransactionNotification buffer, in bytes.

dwMilliseconds [in, optional]

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 [out, optional]

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:

ERROR_ACCESS_DENIED
ERROR_INVALID_HANDLE
ERROR_INSUFFICIENT_RESOURCES
ERROR_OBJECT_NAME_NOT_FOUND
ERROR_TIMEOUT

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

Header

KtmW32.h

Library

KtmW32.lib

DLL

KtmW32.dll

See also

Kernel Transaction Manager Functions
CreateEnlistment
GetNotificationResourceManagerAsync
SetResourceManagerCompletionPort
NOTIFICATION_MASK
TRANSACTION_NOTIFICATION
TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT

 

 

Community Additions

ADD
Show:
© 2014 Microsoft