c++visual-c++directshowgraphedit

c++ directshow filter Private Interface


I am using direct show sample ezrgb24 and trying to expose its private interface. In iez.h file has the below code

DEFINE_GUID(IID_IIPEffect,
0xfd5010a3, 0x8ebe, 0x11ce, 0x81, 0x83, 0x00, 0xaa, 0x00, 0x57, 0x7d, 0xa1);

DECLARE_INTERFACE_(IIPEffect, IUnknown)
{
    STDMETHOD(get_IPEffect) (THIS_
                int *effectNum,         // The current effect
                REFTIME *StartTime,     // Start time of effect
                REFTIME *Length         // length of effect
             ) PURE;

    STDMETHOD(put_IPEffect) (THIS_
                int effectNum,          // Change to this effect
                REFTIME StartTime,      // Start time of effect
                REFTIME Length          // Length of effect
             ) PURE;
};

after building the dll, i registered it using cmd window. How should i expose or use get_IPEffect() or put_IPEffect() from our project?

i coded as below but it didnt worked

DEFINE_GUID(IID_IIPEffect,
    0xfd5010a3, 0x8ebe, 0x11ce, 0x81, 0x83, 0x00, 0xaa, 0x00, 0x57, 0x7d, 0xa1);
DEFINE_GUID(CLSID_ImageEffect,
    0x8B498501, 0x1218, 0x11CF, 0xAD, 0xC4, 0x00, 0xA0, 0xD1, 0x00, 0x04, 0x1B);

IBaseFilter *pImageEffect = NULL;
chr = CoCreateInstance(CLSID_ImageEffect, NULL, CLSCTX_INPROC_SERVER, 
            IID_IBaseFilter, (void**) &pImageEffect);
chr = pGraph->AddFilter(pImageEffect, L"RGB Resizer");


IIPEffect *pEZrgb24 = NULL;
chr = pImageEffect->QueryInterface(IID_IIPEffect, (void **) &pEZrgb24);

At IIPEffect i am getting an error "'IIPEffect' : undeclared identifier" how should i declare it?


Solution

  • Thanks RomarR and Wimmel, i included iez.h in my project and it is working fine