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:
CComPtr<ITuneRequest> pTuneRequest; CHK( pTuningSpace->CreateTuneRequest( &pTuneRequest )); // Instantiate the video control to start the graph
HRESULT StartAntennaTuner( ITuningSpace *pTuningSpace )
{
HRESULT hr = S_OK;
CComPtr<IChannelTuneRequest> pChannelTuneRequest;
CComPtr<IMSVidCtl>
m_pVideoControl;
CComVariant varRequest;
CHK( pTuneRequest->QueryInterface( &pChannelTuneRequest ));
CHK( pChannelTuneRequest->put_Channel( 4 ));
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

