source: trunk/src/quartz/fmap2.c@ 6710

Last change on this file since 6710 was 6710, checked in by sandervl, 24 years ago

wine update

File size: 1.4 KB
Line 
1/*
2 * Implementation of CLSID_FilterMapper2.
3 *
4 * FIXME - stub.
5 *
6 * hidenori@a2.ctktv.ne.jp
7 */
8
9#include "config.h"
10
11#include "windef.h"
12#include "winbase.h"
13#include "wingdi.h"
14#include "winerror.h"
15#include "wine/obj_base.h"
16#include "wine/obj_oleaut.h"
17#include "strmif.h"
18#include "control.h"
19#include "uuids.h"
20
21#include "debugtools.h"
22DEFAULT_DEBUG_CHANNEL(quartz);
23
24#include "quartz_private.h"
25#include "fmap2.h"
26
27/* can I use offsetof safely? - FIXME? */
28static QUARTZ_IFEntry IFEntries[] =
29{
30 { &IID_IFilterMapper2, offsetof(CFilterMapper2,fmap3)-offsetof(CFilterMapper2,unk) },
31 { &IID_IFilterMapper3, offsetof(CFilterMapper2,fmap3)-offsetof(CFilterMapper2,unk) },
32};
33
34
35static void QUARTZ_DestroyFilterMapper2(IUnknown* punk)
36{
37 CFilterMapper2_THIS(punk,unk);
38
39 CFilterMapper2_UninitIFilterMapper3( This );
40}
41
42HRESULT QUARTZ_CreateFilterMapper2(IUnknown* punkOuter,void** ppobj)
43{
44 CFilterMapper2* pfm;
45 HRESULT hr;
46
47 TRACE("(%p,%p)\n",punkOuter,ppobj);
48
49 pfm = (CFilterMapper2*)QUARTZ_AllocObj( sizeof(CFilterMapper2) );
50 if ( pfm == NULL )
51 return E_OUTOFMEMORY;
52
53 QUARTZ_IUnkInit( &pfm->unk, punkOuter );
54 hr = CFilterMapper2_InitIFilterMapper3( pfm );
55 if ( FAILED(hr) )
56 {
57 QUARTZ_FreeObj( pfm );
58 return hr;
59 }
60
61 pfm->unk.pEntries = IFEntries;
62 pfm->unk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]);
63 pfm->unk.pOnFinalRelease = QUARTZ_DestroyFilterMapper2;
64
65 *ppobj = (void*)(&pfm->unk);
66
67 return S_OK;
68}
Note: See TracBrowser for help on using the repository browser.