Microsoft DirectX 8.0 |
Provides a callback mechanism for objects using the IResourceManager interface.
An object must implement IResourceConsumer if it uses the IResourceManager interface to request resources from the filter graph manager. The filter graph manager calls methods on IResourceConsumer to notify the object when a resource becomes available, or when the object should release a resource that it acquired.
Applications typically do not use or implement this interface.
Methods in Vtable Order
IUnknown methods Description QueryInterface Returns pointers to supported interfaces. AddRef Increments the reference count. Release Decrements the reference count. IResourceManager methods Description AcquireResource Notifies the resource consumer that a resource might be acquired. ReleaseResource Requests the resource consumer to release the specified resource.
Notifies the resource consumer that a resource might be acquired.
Syntax
HRESULT AcquireResource(
LONG idResource
);
Parameters
- idResource
- [in] Resource identifier of the resource to be acquired.
Return Value
Returns one of the following values.
S_OK Consumer has successfully acquired the resource. S_FALSE Consumer has not acquired the resource but will use IResourceManager::NotifyAcquire when it does. VFW_S_RESOURCE_NOT_NEEDED Consumer no longer needs the resource. Error Value Consumer tried to acquire the resource but failed.
Requests the resource consumer to release the specified resource.
Syntax
HRESULT ReleaseResource(
LONG idResource
);
Parameters
- idResource
- [in] Resource identifier to be released.
Return Value
Returns S_OK if the consumer has released it and requires it again when it becomes available, or S_FALSE if the consumer has not released it but will use IResourceManager::NotifyRelease when it does.