sunnythread.h

来自「无线数据服务中心源代码:移动或联通的无限数据终端将采集到的数据通过Interne」· C头文件 代码 · 共 36 行

H
36
字号
// SunnyThread.h: interface for the CSunnyThread class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_SUNNYTHREAD_H__1828EC42_7F38_4298_B94B_12C92AB28542__INCLUDED_)
#define AFX_SUNNYTHREAD_H__1828EC42_7F38_4298_B94B_12C92AB28542__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CSunnyThread  
{
public:
	CSunnyThread(BOOL bAutoDelete = FALSE);
	virtual ~CSunnyThread();

	typedef DWORD (WINAPI *THREADFUNC)(LPVOID lpParameter);
	BOOL Create(THREADFUNC pThreadFunc = NULL, void* pParam = NULL, BOOL bSuspended = FALSE); 
	BOOL WaitForEnd(DWORD dwTiomeout = INFINITE);
	void Resume() const;
	void Suspend() const;
	BOOL SetPriority(int nPriority) const;
	BOOL PostMessage(const UINT msg, const WPARAM wParam = 0, const LPARAM lParam = 0) const;

private:
	THREADFUNC m_pThreadFunc;
	BOOL m_bAutoDelete;
	int m_nRetValue;
	void* m_pParam;
	HANDLE m_hThread;
	DWORD m_dwThreadID;
};

#endif // !defined(AFX_SUNNYTHREAD_H__1828EC42_7F38_4298_B94B_12C92AB28542__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?