You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mitlib.pub/MITLIB/mcctrdll/RUNTASK.h

48 lines
1.4 KiB
C++

// Start =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// General information section.
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// $Author:yongkiang$ User who last changed the file
// $Date:1/2/2013 12:17:42 PM$ Date and time of last check in
// $Revision:1.0$ Visual SourceSafe version number
// $Workfile:: RUNTASK.H $ Filename
// End =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#if !defined __RUNTASK_H__
#define __RUNTASK_H__
#ifdef BUILD_MCCTRDLL
#define MCCTRDLLCLASS __declspec(dllexport)
#else
#define MCCTRDLLCLASS __declspec(dllimport)
#endif
class MCCTRDLLCLASS CRunTask
{
public:
DWORD GetThreadPriority();
BOOL SetThreadPriority(int nPriority);
BOOL IsTerminate(void);
CRunTask();
virtual ~CRunTask();
// Operations
virtual bool InitInstance();
virtual UINT RunThread() = 0;
// Run Thread Control
bool Begin();
bool Resume();
bool Suspend();
bool DeleteThread();
void SetThreadName(const char* threadName);
static void SetThreadName(DWORD dwThreadID, const char* threadName);
private:
// gary 04jun03
CWinThread *m_pThread;
bool m_bSuspend;
bool m_bTerminate;
// gary 04jun03
};
#endif // !defined __RUNTASK_H__