bool AppFrontend::Stop(bool force) { if(!IsRunning()) return false; bool isValid = OnStop(force) || force; if(isValid) { m_isRunning = false; OnStopped(); #if CE_FRONTEND_USEXLIB #if CE_FRONTEND_USEXCB m_xcbConnection = 0; #endif if(m_xDisplay) XCloseDisplay((Display *)m_xDisplay); m_xDefaultScreen = 0; m_xDisplay = 0; #endif #if CE_FRONTEND_USEWIN m_hInstance = 0; #endif } return isValid; }
/* stops the process */ BOOL Process::Stop() { if (SuspendThread(hThread) < 1){ OnStopped(); return TRUE; } return FALSE; }
bool App::Stop(bool force) { if(!m_isRunning) return false; bool isValid = OnStop(force) || force; if(isValid) { m_isRunning = false; OnStopped(); } return isValid; }
BOOL CService::End(VOID) { OnStopped(); return TRUE; }