Directshow自定义接口出错
我自己做了个Source Filter用来接收服务端传输过来的编码数据,现在自定义了一个接口用来获取服务端的地址信息,但是不知道为什么老是报错(error LNK2005: _IID_MyInterface already defined in MyOutputPin.obj)具体情况请看代码:
这些就是我定义的接口的 .h文件
#ifndef __H_IServerAddress__
#define __H_IServerAddress__
// #undef INTERFACE
// #define INTERFACE IServerAddress
DEFINE_GUID(IID_MyInterface,
0xec37687c, 0x8253, 0x4d8e, 0xa4, 0x34, 0xf6, 0x61, 0x0, 0xa3, 0xdf, 0x2f);
DECLARE_INTERFACE_(IServerAddress, IUnknown)
{
STDMETHOD(get_ServerAddress) (THIS_ char * ServerAddress) PURE;
};
#endif // __H_ITitleOverlay__
#include "MyInterface.h"
class CMyOutputPin : public CSourceStream,public IServerAddress
{
public:
DECLARE_IUNKNOWN;
STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void ** ppv);
STDMETHODIMP get_ServerAddress(char * ServerAddress);
。。。。(省略下面代码)