IMFActivate::ActivateObject Method
Creates the object associated with this activation object.
Syntax
HRESULT ActivateObject(
[in] REFIID riid,
[out] void **ppv
);
Parameter
riid [in]
Interface identifier (IID) of the requested interface.ppv [out]
Receives a pointer to the requested interface. The caller must release the interface.
Rückgabewert
Ist Methode erfolgreich, wird "S_OK" zurückgegeben. Andernfalls wird ein HRESULT-Fehlercode zurückgegeben.
Hinweise
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.
The IMFActivate::ShutdownObject method is generic to all object types. If the object does not require a shutdown method, ShutdownObject succeeds and has no effect. If you do not know the specific shutdown method for the object (or do not know the object type), call IMFActivate::ShutdownObject.
After the first call to ActivateObject, subsequent calls return a pointer to the same instance, until the client calls either ShutdownObject or IMFActivate::DetachObject.
Anforderungen
Mindestens unterstützter Client |
Windows Vista |
Mindestens unterstützter Server |
Windows Server 2008 |
Header |
Mfidl.h |
Bibliothek |
Mfuuid.lib |