SetResourceManagerCompletionPort function

Associates the specified I/O completion port with the specified resource manager (RM). This port receives all notifications for the RM.

Syntax


BOOL WINAPI SetResourceManagerCompletionPort(
  _In_  HANDLE ResourceManagerHandle,
  _In_  HANDLE IoCompletionPortHandle,
  _In_  ULONG_PTR CompletionKey
);

Parameters

ResourceManagerHandle [in]

A handle to the resource manager.

IoCompletionPortHandle [in]

A handle to the I/O completion port.

CompletionKey [in]

The user-defined identifier. Typically, it is used to associate the receive notification with a specific resource manager.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is 0 (zero). 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_TRANSACTION_ALREADY_ABORTED

Remarks

This function must be used in conjunction with the GetNotificationResourceManagerAsync function, which provides the buffers that KTM uses to deliver notifications asynchronously. These functions provide a different way to receive notifications from KTM. You can use these two functions instead of the GetNotificationResourceManager function.

This function must be called before calling GetNotificationResourceManagerAsync.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Ktmw32.h

Library

Ktmw32.lib

DLL

Ktmw32.dll

See also

GetNotificationResourceManager
GetNotificationResourceManagerAsync
Kernel Transaction Manager Functions

 

 

Community Additions

ADD
Show:
© 2014 Microsoft