IDispenserDriver::CreateResource
Holder asks resource dispenser to create a resource.
HRESULT IDispenserDriver::CreateResource (
const RESTYPID |
ResTypId, |
RESID* |
pResId, |
TIMEINSECS* |
pSecsFreeBeforeDestroy); |
Parameters
ResTypId [in]
The type of resource to create.
pResId [out]
The handle to the newly created resource.
pSecsFreeBeforeDestroy [out]
The new resource’s timeout. This is the number of seconds that this resource will be allowed to remain idle in the pool before it’s destroyed.
Return Values
S_OK
Success.
E_FAIL
Failure.
Comments
Called by DispMan in two cases: when a resource is needed and there is no inventory to either satisfy an AllocResource call when none were found in inventory, or when DispMan is setting up initial inventory.
The resource dispenser assigns ResId as the handle to identify this resource.