// wdm.h
NTSTATUS TmEnableCallbacks(
[in] PKRESOURCEMANAGER ResourceManager,
[in] PTM_RM_NOTIFICATION CallbackRoutine,
[in, optional] PVOID RMKey
);
View the official Windows Driver Kit DDI referenceNo description available.
The TmEnableCallbacks routine enables a callback routine that receives transaction notifications.
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.
TmEnableCallbacks returns STATUS_SUCCESS if the operation succeeds. Otherwise, this routine might return the following value:
| Return code | Description |
|---|---|
| STATUS_UNSUCCESSFUL | The CallbackRoutine pointer is NULL. |
The routine might return other NTSTATUS values.
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 Tm*Xxx* routines instead of Zw*Xxx* routines, see Using TmXxx Routines.
ZwGetNotificationResourceManager