BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch(ul_reason_for_call) { case DLL_PROCESS_ATTACH: //to speed things up, disable recieving of messages in subsequent loaded copies DisableThreadLibraryCalls( hModule ); if(!ref_count) install_hook(hModule); ref_count++; break; case DLL_THREAD_ATTACH: // A thread is created. Do any required initialization on a per thread basis break; case DLL_THREAD_DETACH: // Thread exits with cleanup break; case DLL_PROCESS_DETACH: // The DLL unmapped from process's address space. Do necessary cleanup ref_count--; if(!ref_count) remove_hook(); break; } return TRUE; }
void cleanup() { remove_hook(); if (!isattached) killtask(); free_symbols(); close_all_elfhandles(); stabs_free_stabs(); hex_close_window(); breakpoints_close_window(); modules_close_window(); main_close_window(); arexx_close_port(); IExec->FreeSysObject(ASOT_PORT, AppPort); pipe_cleanup(); variables_cleanup(); console_cleanup(); stacktrace_cleanup(); source_cleanup(); disassembler_cleanup(); sourcelist_cleanup(); freemem_free_hook(main_freemem_hook); char sysstring[1024] = ""; sprintf(sysstring, "setenv DB101_LASTDIR SAVE \"%s\"", lastdir); IDOS->SystemTags(sysstring, TAG_END); }
void ft_sigsrem(t_hook_sigs *hook) { remove_hook(hook); }
void ft_sigrem(t_hook_sig *hook) { remove_hook(hook); }