2 * Implementation of CLSID_FilterMapper.
6 * hidenori@a2.ctktv.ne.jp
16 #include "wine/obj_base.h"
17 #include "wine/obj_oleaut.h"
22 #include "debugtools.h"
23 DEFAULT_DEBUG_CHANNEL(quartz);
25 #include "quartz_private.h"
28 /* can I use offsetof safely? - FIXME? */
29 static QUARTZ_IFEntry IFEntries[] =
31 { &IID_IFilterMapper, offsetof(CFilterMapper,fmap)-offsetof(CFilterMapper,unk) },
35 static void QUARTZ_DestroyFilterMapper(IUnknown* punk)
37 CFilterMapper_THIS(punk,unk);
39 CFilterMapper_UninitIFilterMapper( This );
42 HRESULT QUARTZ_CreateFilterMapper(IUnknown* punkOuter,void** ppobj)
47 TRACE("(%p,%p)\n",punkOuter,ppobj);
49 pfm = (CFilterMapper*)QUARTZ_AllocObj( sizeof(CFilterMapper) );
53 QUARTZ_IUnkInit( &pfm->unk, punkOuter );
54 hr = CFilterMapper_InitIFilterMapper( pfm );
57 QUARTZ_FreeObj( pfm );
61 pfm->unk.pEntries = IFEntries;
62 pfm->unk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]);
63 pfm->unk.pOnFinalRelease = QUARTZ_DestroyFilterMapper;
65 *ppobj = (void*)(&pfm->unk);