Line | |
---|
1 | /* $Id: sysclock.c,v 1.3 2001-09-05 13:36:38 bird Exp $ */
|
---|
2 | /*
|
---|
3 | * Implementation of CLSID_SystemClock.
|
---|
4 | *
|
---|
5 | * FIXME - stub.
|
---|
6 | *
|
---|
7 | * hidenori@a2.ctktv.ne.jp
|
---|
8 | */
|
---|
9 |
|
---|
10 | #include "config.h"
|
---|
11 |
|
---|
12 | #include "windef.h"
|
---|
13 | #include "winbase.h"
|
---|
14 | #include "wingdi.h"
|
---|
15 | #include "winerror.h"
|
---|
16 | #include "wine/obj_base.h"
|
---|
17 | #include "strmif.h"
|
---|
18 | #include "uuids.h"
|
---|
19 |
|
---|
20 | #include "debugtools.h"
|
---|
21 | DEFAULT_DEBUG_CHANNEL(quartz);
|
---|
22 |
|
---|
23 | #include "quartz_private.h"
|
---|
24 | #include "sysclock.h"
|
---|
25 |
|
---|
26 |
|
---|
27 | /* can I use offsetof safely? - FIXME? */
|
---|
28 | static QUARTZ_IFEntry IFEntries[] =
|
---|
29 | {
|
---|
30 | { &IID_IReferenceClock, offsetof(CSystemClock,refclk)-offsetof(CSystemClock,unk) },
|
---|
31 | };
|
---|
32 |
|
---|
33 | HRESULT QUARTZ_CreateSystemClock(IUnknown* punkOuter,void** ppobj)
|
---|
34 | {
|
---|
35 | CSystemClock* psc;
|
---|
36 |
|
---|
37 | TRACE("(%p,%p)\n",punkOuter,ppobj);
|
---|
38 |
|
---|
39 | psc = (CSystemClock*)QUARTZ_AllocObj( sizeof(CSystemClock) );
|
---|
40 | if ( psc == NULL )
|
---|
41 | return E_OUTOFMEMORY;
|
---|
42 |
|
---|
43 | QUARTZ_IUnkInit( &psc->unk, punkOuter );
|
---|
44 | CSystemClock_InitIReferenceClock( psc );
|
---|
45 |
|
---|
46 | psc->unk.pEntries = IFEntries;
|
---|
47 | psc->unk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]);
|
---|
48 |
|
---|
49 | *ppobj = (void*)(&psc->unk);
|
---|
50 |
|
---|
51 | return S_OK;
|
---|
52 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.