SetResourceManagerCompletionPort function (ktmw32.h)

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

Syntax

BOOL SetResourceManagerCompletionPort(
  [in] HANDLE    ResourceManagerHandle,
  [in] HANDLE    IoCompletionPortHandle,
  [in] ULONG_PTR CompletionKey
);

Parameters

[in] ResourceManagerHandle

A handle to the resource manager.

[in] IoCompletionPortHandle

A handle to the I/O completion port.

[in] CompletionKey

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:

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

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header ktmw32.h
Library Ktmw32.lib
DLL Ktmw32.dll

See also

GetNotificationResourceManager

GetNotificationResourceManagerAsync

Kernel Transaction Manager Functions