IResourceManager::NotifyAcquire method (strmif.h)

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The NotifyAcquire method notifies the resource manager that an attempt to acquire a resource has completed.

Syntax

HRESULT NotifyAcquire(
  [in] LONG              idResource,
  [in] IResourceConsumer *pConsumer,
  [in] HRESULT           hr
);

Parameters

[in] idResource

Token for the registered resource.

[in] pConsumer

Pointer to the IResourceConsumer interface of the object requesting the resource.

[in] hr

Value indicating the success of the acquisition; S_OK if the resource was acquired, or an error value if not.

Return value

Returns an HRESULT value that depends on the implementation. HRESULT can be one of the following standard constants, or other values not listed.

Return code Description
E_FAIL
Failure.
E_POINTER
NULL pointer argument.
E_INVALIDARG
Invalid argument.
E_NOTIMPL
Method isn't supported.
S_OK or NOERROR
Success.

Remarks

Use this method after an IResourceConsumer::AcquireResource method returns an S_FALSE value, indicating that the acquisition will be asynchronous (that is, handled by a callback mechanism). If the hr parameter is S_OK, the resource manager will assume that the resource is now held by the caller. If the hr parameter is anything other than S_OK, the resource manager will assume that the attempt to acquire the resource failed and will reassign the resource elsewhere.

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 strmif.h (include Dshow.h)
Library Strmiids.lib

See also

Error and Success Codes

IResourceManager Interface