1 /* taken from wine exit.c */ 2 #include <precomp.h> 3 4 /* 5 * @implemented 6 */ 7 void _cexit( void ) 8 { 9 LOCK_EXIT; 10 __call_atexit(); 11 UNLOCK_EXIT; 12 } 13 14 /* 15 * @implemented 16 */ 17 void _c_exit( void ) 18 { 19 /* All cleanup is done on DLL detach; Return to caller */ 20 } 21 22 /* 23 * @implemented 24 */ 25 void _exit(int exitcode) 26 { 27 ExitProcess(exitcode); 28 } 29 30 /* 31 * @implemented 32 */ 33 void exit(int exitcode) 34 { 35 #if 0 36 HMODULE hmscoree; 37 static const WCHAR mscoreeW[] = {'m','s','c','o','r','e','e',0}; 38 void (WINAPI *pCorExitProcess)(int); 39 #endif 40 WARN("exit(%d) called\n",exitcode); 41 _cexit(); 42 #if 0 43 hmscoree = GetModuleHandleW(mscoreeW); 44 45 if (hmscoree) 46 { 47 pCorExitProcess = (void*)GetProcAddress(hmscoree, "CorExitProcess"); 48 49 if (pCorExitProcess) 50 pCorExitProcess(exitcode); 51 } 52 #endif 53 ExitProcess(exitcode); 54 55 } 56