SDC C-Project CF Review 프로그램
LYW
2021-10-15 e5fa774d622d6852fe8e1f033045aed221649108
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
#pragma once
 
#include "ThreadPools.h"
 
class AFX_EXT_CLASS CTimerThreadPools : public CThreadPools
{
public:
    CTimerThreadPools(DWORD dwPeriod=100, int nThreadCount=1);
    virtual ~CTimerThreadPools(void);
    DWORD GetPeriod() const;
    virtual BOOL StartThread();
    virtual void StopThread();
 
protected:
    virtual void TimerThreadProcess(PVOID pParameter) = 0;
 
protected:
    BOOL CreateTimerThread(PVOID pParameter);
    void CloseTimerThread();
    static VOID CALLBACK TimerCallback(PTP_CALLBACK_INSTANCE pInstance, PVOID pParameter, PTP_TIMER pTimer);
 
protected:
    DWORD                    m_dwPeriod;
    PTP_TIMER                m_pTimer;
    PTP_TIMER_CALLBACK        m_pTimerCallback;
};