IComObjectPoolEvents2::OnObjPoolCreateDecision method (comsvcs.h)
Generated when a pool provides a requesting client with an existing object or creates a new one.
Syntax
HRESULT OnObjPoolCreateDecision(
[in] COMSVCSEVENTINFO *pInfo,
[in] DWORD dwThreadsWaiting,
[in] DWORD dwAvail,
[in] DWORD dwCreated,
[in] DWORD dwMin,
[in] DWORD dwMax
);
Parameters
[in] pInfo
A pointer to a COMSVCSEVENTINFO structure.
[in] dwThreadsWaiting
The number of threads waiting for an object.
[in] dwAvail
The number of free objects in the pool.
[in] dwCreated
The number of total objects in the pool.
[in] dwMin
The pool's minimum object value.
[in] dwMax
The pool's maximum object value.
Return value
The user verifies the return values from this method.
Remarks
When a component is configured for object pooling, the pool is populated with objects up to the specified minimum level. As client requests for the component come in, they are satisfied on a first-come first-served basis from the pool. If no pooled objects are available and the pool is not yet at its specified maximum level, a new object is created and activated for the client.
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 |