0

我正在使用直接显示示例 ezrgb24 并尝试公开其私有接口。在iez.h 文件中有以下代码

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;
};

构建 dll 后,我使用 cmd 窗口注册了它。我应该如何从我们的项目中公开或使用 get_IPEffect() 或 put_IPEffect() ?

我编码如下,但它没有工作

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);

在 IIPEffect 我收到错误“'IIPEffect':未声明的标识符”我应该如何声明它?

4

1 回答 1

1

感谢 RomarR 和 Wimmel,我在我的项目中包含了 iez.h,它运行良好

于 2013-01-23T07:19:41.793 回答