IDispenserDriver::CreateResource method (comsvcs.h)

Creates a resource.

Syntax

HRESULT CreateResource(
  const RESTYPID ResTypId,
  RESID          *pResId,
  TIMEINSECS     *pSecsFreeBeforeDestroy
);

Parameters

ResTypId

The type of resource to be created.

pResId

A handle to the newly created resource.

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

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header comsvcs.h

See also

IDispenserDriver