IMFActivate::ActivateObject method (mfobjects.h)
Creates the object associated with this activation object.
Syntax
HRESULT ActivateObject(
[in] REFIID riid,
[out] void **ppv
);
Parameters
[in] riid
Interface identifier (IID) of the requested interface.
[out] ppv
Receives a pointer to the requested interface. The caller must release the interface.
Return value
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
Some Microsoft Media Foundation objects must be shut down before being released. If so, the caller is responsible for shutting down the object that is returned in ppv. To shut down the object, do one of the following:
- Call IMFActivate::ShutdownObject on the activation object, or
- Call the object-specific shutdown method. This method will depend on the type of object. Possibilities include:
- Media sources: Call IMFMediaSource::Shutdown.
- Media sinks: Call IMFMediaSink::Shutdown.
- Any object that supports the IMFShutdown interface: Call IMFShutdown::Shutdown.
After the first call to ActivateObject, subsequent calls return a pointer to the same instance, until the client calls either ShutdownObject or IMFActivate::DetachObject.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2008 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | mfobjects.h |
Library | Mfuuid.lib |