title: how to implement IPinFlowControl interface in Directshow
body: <p>i want to implement <code>IPinFlowControl</code> interface, and it has one method Block.</p>
  
  <p>i had tried with below code,</p>
  
  <pre><code>Mux::NonDelegatingQueryInterface(REFIID iid, void** ppv)
  {
     if(iid==IID_IPinFlowControl)
      {
      return GetInterface((IPinFlowControl*) this, ppv);
      }
  
      return CBaseFilter::NonDelegatingQueryInterface(iid, ppv);
  }
  
  
  STDMETHODIMP Mux::Block(DWORD dwBlockFlags,HANDLE hEvent)
  {
      return S_OK;
  }
  </code></pre>
  
  <p>and register above filter.</p>
  
  <p>now in code i create instance of above filter, connect its output pins and then try</p>
  
  <pre><code>IPin *pMuxOut2 = NULL;
  hr = FindUnconnectedPin(mux,PINDIR_OUTPUT,&amp;pMuxOut2);
  
  IPinFlowControl *pinFlowControl=NULL;
  
  hr=pMuxOut2-&gt;QueryInterface(IID_IPinFlowControl,(void**)&amp;pinFlowControl);
  </code></pre>
  
  <p>But i got E_NonInterface in pinFlowControl, </p>
  
  <p>also please help me to implement block method properly to Block and Unblock output.</p>