IAMovieSetup Interface

The IAMovieSetup interface provides methods that enable objects in a dynamic-link library (DLL) to be self-registering. The IAMovieSetup interface works in conjunction with an overall registration architecture that COM requires; this architecture is partially implemented in the Microsoft® DirectShow® base classes. The remainder of the implementation is described in the following sections.

Implement this interface if you want your filter or plug-in distributor to be able to register itself automatically as part of a setup routine on an end user system. The two methods in this interface, IAMovieSetup::Register and IAMovieSetup::Unregister, are implemented by the CBaseFilter base class for self-registering filters. For a complete list of steps showing how to use this interface with the DirectShow class library, see Register DirectShow Objects.

Use implemented methods on this interface from an entry point on the filter that is called by a setup utility or installation utility. These are used automatically by the DirectShow architecture and typically should not need to be called by any other component.

Methods in Vtable Order

IUnknown methodsDescription
QueryInterface Retrieves pointers to supported interfaces.
AddRef Increments the reference count.
Release Decrements the reference count.
IAMovieSetup methodsDescription
Register Adds the filter to the registry.
Unregister Removes the filter from the registry.

IAMovieSetup::Register

IAMovieSetup Interface

Adds the filter to the registry.

Syntax

HRESULT Register(void);

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.
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 the filter, its pins, and the media type associated with the pins. It should be implemented to use IFilterMapper methods to accomplish this. See the CBaseFilter::Register member function for a description of its implementation.

IAMovieSetup::Unregister

IAMovieSetup Interface

Removes the filter from the registry.

Syntax

HRESULT Unregister(void);

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.
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 should be implemented to use the IFilterMapper::UnregisterFilter method to remove the filter from the registry. This effectively removes the pins and media types as well.


Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.