ITransactionResourcePool::GetResource method (comsvcs.h)

Retrieves an object from the list of pooled objects.

Syntax

HRESULT GetResource(
  [in]  IObjPool *pPool,
  [out] IUnknown **ppUnk
);

Parameters

[in] pPool

The key to each object in the transaction resource pool. It determines the type of pooled object to retrieve from the list.

[out] ppUnk

A reference to the IUnknown of the pooled object.

The object that is retrieved must have the same IObjPool pointer as an object that was put on the list by using PutResource.

Return value

This method can return the standard return values E_INVALIDARG, E_OUTOFMEMORY, and E_UNEXPECTED, as well as the following values.

Return code Description
S_OK
The method completed successfully.
E_FAILED
The pPool parameter did not match any object on the list of pooled objects.

Requirements

Requirement Value
Minimum supported client Windows XP with SP1 [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header comsvcs.h

See also

IObjPool

ITransactionResourcePool