|
// *********************************************************
// スレッドの終了を待ってハンドルを閉じる
// 戻り値 : 無し
// *********************************************************
BOOL LboxThread::Close( void )
{
int i;
DWORD dwRet;
for( i = 0; i < 10; i++ ) {
if ( GetExitCodeThread(this->hThread, &dwRet ) ) {
if ( dwRet != STILL_ACTIVE ) {
CloseHandle( this->hThread );
this->hThread = NULL;
return true;
}
}
Sleep(100);
}
return false;
}
| |