IDispenserDriver::CreateResource method (comsvcs.h)
Creates a resource.
Syntax
HRESULT CreateResource(
[in] const RESTYPID ResTypId,
[out] RESID *pResId,
[out] TIMEINSECS *pSecsFreeBeforeDestroy
);
Parameters
[in] ResTypId
The type of resource to be created.
[out] pResId
A handle to the newly created resource.
[out] pSecsFreeBeforeDestroy
The time-out of the new resource. This is the number of seconds that this resource is allowed to remain idle in the pool before it is destroyed.
Return value
If the method succeeds, the return value is S_OK. Otherwise, it is E_FAIL.
Remarks
The CreateResource method is called by the Dispenser Manager in the following cases:
- When a resource is needed and there is no inventory to satisfy an IHolder::AllocResource call when none were found in inventory.
- When the Dispenser Manager is setting up initial inventory.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | comsvcs.h |