⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 activetest.cpp

📁 This software aims to create an applet and panel tools to manage a wireless interface card, such as
💻 CPP
字号:
//
// ActiveTest.cpp
//
// $Id: //poco/Main/CppUnit/WinTestRunner/src/ActiveTest.cpp#5 $
//


#include <afxwin.h>
#include "ActiveTest.h"


CppUnit_BEGIN


// Spawn a thread to a test
void ActiveTest::run(TestResult* result)
{
	CWinThread* thread;

	setTestResult(result);
	_runCompleted.ResetEvent();

	thread = AfxBeginThread(threadFunction, this, THREAD_PRIORITY_NORMAL, 0, CREATE_SUSPENDED);
	DuplicateHandle(GetCurrentProcess(), thread->m_hThread, GetCurrentProcess(),
		&_threadHandle, 0, FALSE, DUPLICATE_SAME_ACCESS);

	thread->ResumeThread();
}


// Simple execution thread.  Assuming that an ActiveTest instance
// only creates one of these at a time.
UINT ActiveTest::threadFunction(LPVOID thisInstance)
{
    ActiveTest* test = (ActiveTest*) thisInstance;

    test->run();
    test->_runCompleted.SetEvent();

    return 0;
}


CppUnit_END

⌨️ 快捷键说明

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