Hello.
I want to play video and audio file in VC++ .NET.
I have Installed DirecX8.1 SDK and also I have specified
the header file path for project.
I have found this sample from .NET help that play video
file ,
//--------------------------------------------------------
#include <dshow.h>
void main(void)
{
IGraphBuilder *pGraph;
IMediaControl *pMediaControl;
IMediaEvent *pEvent;
CoInitialize(NU LL);
// Create the filter graph manager and query for
interfaces.
CoCreateInstanc e(CLSID_FilterG raph, NULL,
CLSCTX_INPROC_S ERVER,
IID_IGraphBuild er, (void **)&pGraph);
pGraph->QueryInterface (IID_IMediaCont rol, (void **)
&pMediaControl) ;
pGraph->QueryInterface (IID_IMediaEven t, (void **)&pEvent);
// Build the graph. IMPORTANT: Change string to a file on
your system.
pGraph->RenderFile(L"C :\\Example.avi" , NULL);
// Run the graph.
pMediaControl->Run();
// Wait for completion.
long evCode;
pEvent->WaitForComplet ion(INFINITE, &evCode);
// Clean up.
pMediaControl->Release();
pEvent->Release();
pGraph->Release();
CoUninitialize( );
}
//-------------------------------------------------------
But when I want to Build this program I give following
error :
error LNK2020: unresolved token (0A000016) IID_IMediaEvent
error LNK2020: unresolved token (0A000018)
CLSID_FilterGra ph
and so on .
How I can solve this problem.
My E-mail : my************@ yahoo.com