![]() |
Start() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| Public Function |
Declared in: Win32Thread.h |
Declaration
virtual BOOL Start(
LPVOID pData);
DescriptionStart the thread pData - Custome user data to pass to the thread
Function Body
try
{
if (GetThreadStatus()==tsStopped)
{
//Recreate the thread
//Create the thread in suspend mode
m_hThread=CreateThread(NULL,
0,
Win32Thread,
this,
CREATE_SUSPENDED,
&m_dwThreadID);
//Check if created
if (m_hThread)
SetThreadStatus(tsSuspended);
else
//Can't run
return FALSE;
}
else if (GetThreadStatus()!=tsSuspended)
return FALSE;
//Start the thread
CGenericThread::Start(pData);
//Resume the thread
if (m_hThread)
if (ResumeThread(m_hThread)!=-1)
//We are running
return TRUE;
return FALSE;
}
ERROR_HANDLER_RETURN("Start",FALSE)
See Also
This web site was generated
using Surveyor V4.50.811.1. Click
here
for more information. |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |