Export (0) Print
Expand All

TmEnableCallbacks routine

The TmEnableCallbacks routine enables a callback routine that receives transaction notifications.

Syntax


NTSTATUS TmEnableCallbacks(
  _In_     PKRESOURCEMANAGER   ResourceManager,
  _In_     PTM_RM_NOTIFICATION CallbackRoutine,
  _In_opt_ PVOID               RMKey
);

Parameters

ResourceManager [in]

A pointer to a resource manager object. To obtain this pointer, your component must call ObReferenceObjectByHandle and supply the object handle that a previous call to ZwCreateResourceManager or ZwOpenResourceManager provided.

CallbackRoutine [in]

A pointer to a ResourceManagerNotification routine.

RMKey [in, optional]

A caller-defined context value that uniquely identifies the resource manager. The caller's ResourceManagerNotification routine receives this value as input.

Return value

TmEnableCallbacks returns STATUS_SUCCESS if the operation succeeds. Otherwise, this routine might return the following value:

Return codeDescription
STATUS_UNSUCCESSFUL

The CallbackRoutine pointer is NULL.

 

The routine might return other NTSTATUS values.

Remarks

Your resource manager can call TmEnableCallbacks to enable a ResourceManagerNotification callback routine. Use TmEnableCallbacks to enable asynchronous notifications. Use ZwGetNotificationResourceManager to obtain notifications synchronously.

Resource managers can register one callback routine for each resource manager object.

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

For information about when to use KTM's TmXxx routines instead of ZwXxx routines, see Using TmXxx Routines.

Requirements

Target platform

Universal

Version

Available in Windows Vista and later operating system versions.

Header

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

Library

Ntoskrnl.lib

IRQL

PASSIVE_LEVEL

See also

ObReferenceObjectByHandle
ResourceManagerNotification
ZwCreateResourceManager
ZwOpenResourceManager
ZwGetNotificationResourceManager

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft