Export (0) Print
Expand All

GetNotificationResourceManagerAsync function

Requests and receives asynchronous 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 GetNotificationResourceManagerAsync(
  _In_   HANDLE ResourceManagerHandle,
  _Out_  PTRANSACTION_NOTIFICATION TransactionNotification,
  _In_   ULONG TransactionNotificationLength,
  _Out_  PULONG ReturnLength,
  _In_   LPOVERLAPPED pOverlapped
);

Parameters

ResourceManagerHandle [in]

A handle to the resource manager.

TransactionNotification [out]

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

TransactionNotificationLength [in]

The size of the TransactionNotification buffer, in bytes.

ReturnLength [out]

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

pOverlapped [in]

A pointer to an OVERLAPPED structure that is required for asynchronous operation.

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

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.

Resource managers (RM) may want to call this function more than once to provide multiple buffers for KTM to use when delivering notifications. The number of calls to this function depends on how much load your RM is carrying.

This function must be called after the SetResourceManagerCompletionPort function is called.

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
SetResourceManagerCompletionPort
NOTIFICATION_MASK
TRANSACTION_NOTIFICATION
TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT

 

 

Community Additions

ADD
Show:
© 2014 Microsoft