IMFActivate::DetachObject Method

Detaches the created object from the activation object.

Syntax

public:
HRESULT DetachObject()  

Return value

Type: HRESULT 

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return codes
Return code Description
S_OK The method succeeded.
E_NOTIMPL Not implemented.

Refer to Media Foundation return codes.

Remarks

The activation object releases all of its internal references to the created object. If you call ActivateObject again, the activation object will create a new instance of the other object.

The DetachObject method does not shut down the created object. If the DetachObject method succeeds, the client must shut down the created object. This rule applies only to objects that have a shutdown method or that support the IMFShutdown interface. See the remarks for IMFActivate::ActivateObject.

Implementation of this method is optional. If the activation object does not support this method, the method returns E_NOTIMPL.

Requirements

Header: Declared in mfobjects.h (include mfidl.h).

Library: Use Mfuuid.lib.