IltmmTVTuner::get_ConnectInput Example for C++

IltmmTVTuner* pTuner; 
HRESULT hr = m_capture->get_TVTuner (&pTuner); 
if(SUCCEEDED(hr) && pTuner != NULL) 
{
      long lNumInputConnections, lConnectInput; 
      pTuner->get_NumInputConnections (&lNumInputConnections); 
      if (lNumInputConnections == 0) 
         MessageBox("No Input connections");
      else
      {
          pTuner->put_ConnectInput(0); 
          pTuner->get_ConnectInput(&lConnectInput); 
       }
      pTuner->Release();
}