Video control object and analog TV

Hello

I'm trying to use the video control object on an analog TV tuner. Here is the code snippet I'm using:


HRESULT StartAntennaTuner( ITuningSpace *pTuningSpace )
{
HRESULT hr = S_OK;

CComPtr<ITuneRequest> pTuneRequest;
CComPtr<IChannelTuneRequest> pChannelTuneRequest;
CComPtr<IMSVidCtl>
m_pVideoControl;
CComVariant varRequest;

CHK( pTuningSpace->CreateTuneRequest( &pTuneRequest ));
CHK( pTuneRequest->QueryInterface( &pChannelTuneRequest ));
CHK( pChannelTuneRequest->put_Channel( 4 ));

// Instantiate the video control to start the graph
CHK( m_pVideoControl.CoCreateInstance( CLSID_MSVidCtl ));
varRequest = pChannelTuneRequest;
CHK( m_pVideoControl->View( &varRequest ));
CHK( m_pVideoControl->Build() );

The code fails on the Build() command, the returned value is E_UNEXPECTED. The debugger window shows a Com Exception.

I'm running vista ultimate with a Hauppauge WinTV PVR PCI II TvTuner. Media Center works fine with this card.

Thanks

[1147 byte] By [Meir_Imate] at [2007-12-28]

Software Development for Windows Vista

Site Classified