我正在使用直接显示示例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':未声明的标识符”
我该怎么宣布呢?
最佳答案
感谢RomarR和Wimmel,我将iez.h包含在我的项目中,并且运行良好
关于c++ - C++ DirectShow筛选器专用接口(interface),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/14276273/