Line | |
---|
1 | /*
|
---|
2 | * Implementation of CLSID_FilterMapper.
|
---|
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"
|
---|
22 | DEFAULT_DEBUG_CHANNEL(quartz);
|
---|
23 |
|
---|
24 | #include "quartz_private.h"
|
---|
25 | #include "fmap.h"
|
---|
26 |
|
---|
27 | /* can I use offsetof safely? - FIXME? */
|
---|
28 | static QUARTZ_IFEntry IFEntries[] =
|
---|
29 | {
|
---|
30 | { &IID_IFilterMapper, offsetof(CFilterMapper,fmap)-offsetof(CFilterMapper,unk) },
|
---|
31 | };
|
---|
32 |
|
---|
33 |
|
---|
34 | static void QUARTZ_DestroyFilterMapper(IUnknown* punk)
|
---|
35 | {
|
---|
36 | CFilterMapper_THIS(punk,unk);
|
---|
37 |
|
---|
38 | CFilterMapper_UninitIFilterMapper( This );
|
---|
39 | }
|
---|
40 |
|
---|
41 | HRESULT QUARTZ_CreateFilterMapper(IUnknown* punkOuter,void** ppobj)
|
---|
42 | {
|
---|
43 | CFilterMapper* pfm;
|
---|
44 | HRESULT hr;
|
---|
45 |
|
---|
46 | TRACE("(%p,%p)\n",punkOuter,ppobj);
|
---|
47 |
|
---|
48 | pfm = (CFilterMapper*)QUARTZ_AllocObj( sizeof(CFilterMapper) );
|
---|
49 | if ( pfm == NULL )
|
---|
50 | return E_OUTOFMEMORY;
|
---|
51 |
|
---|
52 | QUARTZ_IUnkInit( &pfm->unk, punkOuter );
|
---|
53 | hr = CFilterMapper_InitIFilterMapper( pfm );
|
---|
54 | if ( FAILED(hr) )
|
---|
55 | {
|
---|
56 | QUARTZ_FreeObj( pfm );
|
---|
57 | return hr;
|
---|
58 | }
|
---|
59 |
|
---|
60 | pfm->unk.pEntries = IFEntries;
|
---|
61 | pfm->unk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]);
|
---|
62 | pfm->unk.pOnFinalRelease = QUARTZ_DestroyFilterMapper;
|
---|
63 |
|
---|
64 | *ppobj = (void*)(&pfm->unk);
|
---|
65 |
|
---|
66 | return S_OK;
|
---|
67 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.