Export (0) Print
Expand All

CreateResourceManager function

Creates a new resource manager (RM) object, and associates the RM with a transaction manager (TM).

Syntax


HANDLE WINAPI CreateResourceManager(
  _In_opt_  LPSECURITY_ATTRIBUTES lpResourceManagerAttributes,
  _In_      LPGUID ResourceManagerID,
  _In_opt_  DWORD CreateOptions,
  _In_      HANDLE TmHandle,
  _In_opt_  LPWSTR Description
);

Parameters

lpResourceManagerAttributes [in, optional]

A pointer to a SECURITY_ATTRIBUTES structure that contains the security attributes for the resource manager. Specify NULL to obtain the default attributes.

ResourceManagerID [in]

A pointer the resource manager GUID. This parameter is required and must not be NULL.

CreateOptions [in, optional]

Any optional attributes for the new RM.

ValueMeaning
RESOURCE_MANAGER_VOLATILE

Indicates that the RM is volatile, and does not perform recovery.

 

TmHandle [in]

A handle to the TM that will manage the transactions for this RM.

Description [in, optional]

A description for this RM.

Return value

If the function succeeds, the return value is a handle to the RM.

If the function fails, the return value is INVALID_HANDLE_VALUE. To get extended error information, call the GetLastError function.

The following list identifies the possible error codes:

ERROR_INSUFFICIENT_RESOURCES
ERROR_INVALID_PARAMETER
ERROR_INVALID_ACL
ERROR_INVALID_SID
ERROR_OBJECT_NAME_COLLISION
ERROR_OBJECT_NAME_EXISTS
ERROR_OBJECT_NAME_INVALID
ERROR_OBJECT_TYPE_MISMATCH
ERROR_PRIVILEGE_NOT_HELD
ERROR_UNKNOWN_REVISION

Remarks

Immediately after calling this function, you must call RecoverResourceManager.

An RM is an endpoint for TM notifications regarding transactions that the RM has enlisted in.

RMs are typically persistent, meaning that after a system failure, they must be reopened to perform certain operations. Volatile, or transient, RMs can be created by calling the CreateResourceManager function and by specifying RESOURCE_MANAGER_VOLATILE. Volatile RMs do not perform recovery operations, but do require notifications about a transaction.

You can create a volatile RM on a durable TM, but you cannot create a durable RM on a volatile TM.

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
OpenResourceManager
SECURITY_ATTRIBUTES
SetResourceManagerCompletionPort

 

 

Community Additions

ADD
Show:
© 2014 Microsoft