-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathITimer.h
34 lines (27 loc) · 1.06 KB
/
ITimer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// ITimer.h: interface for the CITimer class.
#if !defined(AFX_ITIMER_H__56F5B92B_8012_4798_A96E_777A2F793CE0__INCLUDED_)
#define AFX_ITIMER_H__56F5B92B_8012_4798_A96E_777A2F793CE0__INCLUDED_
#include "interfaces.h"
#include "dispimpl.h"
class CITimer : public CDispImpl<ICfgTimer, CfgTimer>
{
public:
// Ïóñòûøêè ìàêðîñîâ, ÷òîáû VC++ óíóòðå ñåáÿ ñâÿçàë èíòåðôåéñ ñ êëàññîì ðåàëèçàöèè
BEGIN_COM_MAP(Empty)
COM_INTERFACE_ENTRY(ICfgTimer)
END_COM_MAP()
CITimer();
virtual ~CITimer();
STDMETHOD(get_Time)(long Num,long *pVal);
STDMETHOD(SetTimer)(long Interval,VARIANT_BOOL OneTimeOnly,long *TimerID);
STDMETHOD(KillTimer)(long TimerID);
STDMETHOD(get_Count)(long *pVal);
STDMETHOD(KillAll)();
STDMETHOD(get_ID)(long Num,long *pVal);
static CITimer* m_pTimer;
static void Done(){if(m_pTimer) delete m_pTimer;}
static VOID CALLBACK TimerProc(HWND hwnd,UINT uMsg,UINT idEvent,DWORD dwTime);
CMapPtrToPtr m_timerIDs;
CMapPtrToPtr m_OneTimers;
};
#endif // !defined(AFX_ITIMER_H__56F5B92B_8012_4798_A96E_777A2F793CE0__INCLUDED_)