Initializing Media Foundation

Before using any Microsoft Media Foundation objects or interfaces, you must call the MFStartup function. Pass in the constant MF_VERSION.


    hr = MFStartup(MF_VERSION);


The MFStartup function initializes the Media Foundation platform. If MFStartup returns MF_E_BAD_STARTUP_VERSION, it means your application was compiled using a version of the Media Foundation headers that does not match the Media Foundation DLLs on your system.

For every call to MFStartup, your application must call MFShutdown.


MFShutdown();

Related topics

Media Foundation Architecture
Media Foundation Platform APIs

 

 

Show: