Platform SDK: Transaction Server |
Allocates a resource from the inventory.
HRESULT IHolder::AllocResource (
RESTYPID |
ResTypId, |
RESID * |
pResId); |
Parameters
ResTypId [in]
The type of resource to be allocated.
pResId [out]
Points to the location where the handle of the resource allocated is returned.
Return Values
S_OK
Success.
E_INVALIDARG
ResTypId is NULL or "", or the resource dispenser's CreateResource generated empty or duplicate RESID.
E_FAIL
Failure. *pResId has not been set. Likely cause is that the caller's transaction is aborting.
Comments
DispMan takes the following steps to locate a resource:
If the caller does not have a current transaction, then the enlistment is skipped. Or if the resource dispenser rejects the enlistment (meaning the resource is not transaction capable), then the enlistment is skipped.