IDispenserManager::RegisterDispenser method (comsvcs.h)
Registers the resource dispenser with the dispenser manager.
HRESULT RegisterDispenser( IDispenserDriver *__MIDL__IDispenserManager0000, LPCOLESTR szDispenserName, IHolder **__MIDL__IDispenserManager0001 );
The IDispenserDriver interface the Resource Dispenser offers to the Dispenser Manager to use later to notify the Resource Dispenser.
A friendly name of the Resource Dispenser for administrator display.
The IHolder interface that has been instantiated for the resource dispenser.
If the method succeeds, the return value is S_OK. Otherwise, it is E_FAIL.
The Resource Dispenser notifies the Dispenser Manager that it has started and is prepared to accept notifications on this IDispenserDriver interface. Then the Dispenser Manager creates the Holder for this new Resource Dispenser and returns it to the Resource Dispenser.
This method does not call AddRef on the pDispenserDriver object, but IHolder::Close does perform a Release on pDispenserDriver. This can cause the Resource Dispenser object to be destroyed prematurely. To prevent this premature destruction, the caller of IDispenserManager::RegisterDispenser must explicitly call AddRef on the pDispenserDriver object.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|