Click here to Skip to main content
15,074,394 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
What should I use instead of CreatePosPassThru for multiple input pins?
STDMETHODIMP CTransformerOutputPin::NonDelegatingQueryInterface(REFIID riid, void **ppv)
    *ppv = NULL;
    if (riid == IID_IMediaPosition || riid == IID_IMediaSeeking) {
        // we should have an input pin by now
        if (m_pPosition == NULL) {
            HRESULT hr = CreatePosPassThru(
                             (IPin *)m_pAudioTransformerFilter->m_Arrinputpin[0],
            if (FAILED(hr)) {
                return hr;
        return m_pPosition->QueryInterface(riid, ppv);
    } else {
        return CBaseOutputPin::NonDelegatingQueryInterface(riid, ppv);

CreatePosPassThru: Creates a COM object that supports IMediaSeeking and IMediaPosition for single-input pin renderers and transform filters.
STDAPI CreatePosPassThru(
BOOL bRenderer,
IPin *pPin,
IUnknown **ppPassThru);

When I had one input pin, everything was fine.
I have transformer filter with multiple inputs.

It is actual.
Updated 13-Jan-11 2:24am

1 solution

I have upgraded CreatePosPassThru, CSeekingPassThru and got CreatePosPassThruMultiple, CSeekingPassThruMultiple.
I just call all the functions for all pins and instead of IPin * use IPin ** and pins_size.

Now i am going to test this.
It seems to me, that it works.
[no name] 13-Jan-11 8:23am
Does not work. Is there any existent function?
[no name] 18-Oct-11 3:23am
One should use CreatePosPassThru for each input pin in filter and return interface on first input pin.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900