Share via


IResourceManager::NotifyAcquire

 
Microsoft DirectShow 9.0

IResourceManager::NotifyAcquire

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

Syntax

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

Parameters

idResource

[in] Token for the registered resource.

pConsumer

[in] Pointer to the IResourceConsumer interface of the object requesting the resource.

hr

[in] 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

Header: Declared in Strmif.h; include Dshow.h.

Library: Use Strmiids.lib.

See Also