IMFActivate::ActivateObject method

Creates the object associated with this activation object.

Syntax


HRESULT ActivateObject(
  [in]   REFIID riid,
  [out]  void **ppv
);

Parameters

riid [in]

Interface identifier (IID) of the requested interface.

ppv [out]

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:

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.

Requirements

Minimum supported client

Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]

Header

Mfidl.h

Library

Mfuuid.lib

See also

IMFActivate
Activation Objects

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.