Don't return from overlapped ReadFile on EAGAIN and other non-fatal
[wine/gsoc_dplay.git] / dlls / quartz / sysclock.h
blobce7c89745b31bb8539def9726bca6effb60a09ae
1 #ifndef WINE_DSHOW_SYSCLOCK_H
2 #define WINE_DSHOW_SYSCLOCK_H
4 /*
5 implements CLSID_SystemClock.
7 - At least, the following interfaces should be implemented:
9 IUnknown
10 + IReferenceClock
14 #include "iunk.h"
16 typedef struct SC_IReferenceClockImpl
18 ICOM_VFIELD(IReferenceClock);
19 } SC_IReferenceClockImpl;
22 /* implementation limit */
23 #define WINE_QUARTZ_SYSCLOCK_TIMER_MAX 64
25 typedef struct QUARTZ_TimerEntry
27 DWORD dwAdvCookie;
28 BOOL fPeriodic;
29 HANDLE hEvent;
30 REFERENCE_TIME rtStart;
31 REFERENCE_TIME rtInterval;
32 } QUARTZ_TimerEntry;
34 typedef struct CSystemClock
36 QUARTZ_IUnkImpl unk;
37 SC_IReferenceClockImpl refclk;
39 /* IReferenceClock fields. */
40 CRITICAL_SECTION m_csClock;
41 DWORD m_dwTimeLast;
42 REFERENCE_TIME m_rtLast;
43 HANDLE m_hThreadTimer;
44 HANDLE m_hEventInit;
45 DWORD m_idThreadTimer;
47 DWORD m_dwAdvCookieNext;
48 QUARTZ_TimerEntry m_timerEntries[WINE_QUARTZ_SYSCLOCK_TIMER_MAX];
49 } CSystemClock;
51 #define CSystemClock_THIS(iface,member) CSystemClock* This = ((CSystemClock*)(((char*)iface)-offsetof(CSystemClock,member)))
53 HRESULT QUARTZ_CreateSystemClock(IUnknown* punkOuter,void** ppobj);
55 HRESULT CSystemClock_InitIReferenceClock( CSystemClock* psc );
56 void CSystemClock_UninitIReferenceClock( CSystemClock* psc );
59 #endif /* WINE_DSHOW_SYSCLOCK_H */