SDC C-Project CF Review 프로그램
LYW
2021-10-14 e8ba1e78e72f3f7ec2841f55fd90253b4dc414df
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
#pragma once
 
#include "SThreadControl.h"
 
class AFX_EXT_CLASS CSTimerThread : public CSThreadControl
{
public:
    CSTimerThread(DWORD dwPeriod=100, int nThreadCount=1);
    virtual ~CSTimerThread(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;
};