IResourceManager::Register
Microsoft DirectShow 9.0 |
IResourceManager::Register
The Register method registers a single named resource with the resource manager.
Syntax
HRESULT Register( LPCWSTR pName, LONG cResource, LONG *plToken );
Parameters
pName
[in] Named resource.
cResource
[in] Number of resources.
plToken
[out] Pointer to the returned token identifying the resource to be used in additional calls.
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
This method registers a named resource, which can contain a number of resources, and returns a token to be used when requesting this resource. It is not an error if the resource is already registered; if the number in the cResource parameter is less than what is already registered, resources will be deallocated to the new count. To unregister the resource, pass a count of zero in cResource.
Requirements
Header: Declared in Strmif.h; include Dshow.h.
Library: Use Strmiids.lib.
See Also