extern "C" int lamexp_entry_point(void) { if(g_lamexp_entry_check_flag != 0x789E09B2) { lamexp_fatal_exit(L"Application initialization has failed, take care!"); } //Call global initialization functions _lamexp_global_init_win32(); _lamexp_global_init_versn(); _lamexp_global_init_tools(); _lamexp_global_init_ipcom(); _lamexp_global_init_utils(); //Make sure we will pass the check g_lamexp_entry_check_flag = (~g_lamexp_entry_check_flag); //Now initialize the C Runtime library! return WinMainCRTStartup(); }
/* * Entry point checks */ static size_t lamexp_entry_check(void) { volatile size_t retVal = 0xA199B5AF; if(g_lamexp_entry_check_flag != 0x8761F64D) { lamexp_fatal_exit(L"Application initialization has failed, take care!"); } return retVal; }
void AnalyzeTask::run() { try { run_ex(); } catch(const std::exception &error) { fflush(stdout); fflush(stderr); fprintf(stderr, "\nGURU MEDITATION !!!\n\nException error:\n%s\n", error.what()); lamexp_fatal_exit(L"Unhandeled C++ exception error, application will exit!"); } catch(...) { fflush(stdout); fflush(stderr); fprintf(stderr, "\nGURU MEDITATION !!!\n\nUnknown exception error!\n"); lamexp_fatal_exit(L"Unhandeled C++ exception error, application will exit!"); } }
void DiskObserverThread::run(void) { qDebug("DiskSpace observer started!"); try { observe(); } catch(const std::exception &error) { fflush(stdout); fflush(stderr); fprintf(stderr, "\nGURU MEDITATION !!!\n\nException error:\n%s\n", error.what()); lamexp_fatal_exit(L"Unhandeled C++ exception error, application will exit!"); } catch(...) { fflush(stdout); fflush(stderr); fprintf(stderr, "\nGURU MEDITATION !!!\n\nUnknown exception error!\n"); lamexp_fatal_exit(L"Unhandeled C++ exception error, application will exit!"); } while(m_semaphore.available()) m_semaphore.tryAcquire(); }
void RAMObserverThread::run(void) { qDebug("RAM observer started!"); try { observe(); } catch(...) { fflush(stdout); fflush(stderr); fprintf(stderr, "\nGURU MEDITATION !!!\n"); lamexp_fatal_exit(L"Unhandeled exception error, application will exit!"); } while(m_semaphore.available()) m_semaphore.tryAcquire(); }