| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * Implementation of CLSID_SystemClock.
|
|---|
| 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 "strmif.h"
|
|---|
| 17 | #include "uuids.h"
|
|---|
| 18 |
|
|---|
| 19 | #include "debugtools.h"
|
|---|
| 20 | DEFAULT_DEBUG_CHANNEL(quartz);
|
|---|
| 21 |
|
|---|
| 22 | #include "quartz_private.h"
|
|---|
| 23 | #include "sysclock.h"
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 | /* can I use offsetof safely? - FIXME? */
|
|---|
| 27 | static QUARTZ_IFEntry IFEntries[] =
|
|---|
| 28 | {
|
|---|
| 29 | { &IID_IReferenceClock, offsetof(CSystemClock,refclk)-offsetof(CSystemClock,unk) },
|
|---|
| 30 | };
|
|---|
| 31 |
|
|---|
| 32 | HRESULT QUARTZ_CreateSystemClock(IUnknown* punkOuter,void** ppobj)
|
|---|
| 33 | {
|
|---|
| 34 | CSystemClock* psc;
|
|---|
| 35 |
|
|---|
| 36 | TRACE("(%p,%p)\n",punkOuter,ppobj);
|
|---|
| 37 |
|
|---|
| 38 | psc = (CSystemClock*)QUARTZ_AllocObj( sizeof(CSystemClock) );
|
|---|
| 39 | if ( psc == NULL )
|
|---|
| 40 | return E_OUTOFMEMORY;
|
|---|
| 41 |
|
|---|
| 42 | QUARTZ_IUnkInit( &psc->unk, punkOuter );
|
|---|
| 43 | CSystemClock_InitIReferenceClock( psc );
|
|---|
| 44 |
|
|---|
| 45 | psc->unk.pEntries = IFEntries;
|
|---|
| 46 | psc->unk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]);
|
|---|
| 47 |
|
|---|
| 48 | *ppobj = (void*)(&psc->unk);
|
|---|
| 49 |
|
|---|
| 50 | return S_OK;
|
|---|
| 51 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.