Originally Posted by
CommonTater
There is no "PlayMovie" function call... you can use.
Not exactly, but it's not that much more involved
Code:
#include <dshow.h>
void PlayAnyMediaFormatYouHaveCodecsFor(LPCWSTR file)
{
HRESULT coinitHr = CoInitialize();
IGraphBuilder* pGraph = NULL;
HRESULT hr = CoCreateInstance(CLSID_GraphBuilder, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pGraph));
if(SUCCEEDED(hr))
{
hr = pGraph->RenderFile(file, NULL);
pGraph->Release();
}
if(SUCCEEDED(coinitHr))
{
CoUninitialize();
}
}
That's pretty much the entire crux of my crusty old AudioPlayer. In fact, I had to write extra code to filter OUT videos.
To the OP, DirectShow is pretty much the easiest way to do it. The SDK linked to above contains some fully fledged samples in the Samples\Multimedia\DirectShow directory. The modern replacement for it is called Media Foundation, but that doesn't exist on anything before Vista so depending on your/your target platform you may have a choice.