ReactOS  0.4.11-dev-195-gef016bf
_exit.c
Go to the documentation of this file.
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();
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
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 }
void _c_exit(void)
Definition: _exit.c:17
__wchar_t WCHAR
Definition: xmlstorage.h:180
static HMODULE hmscoree
Definition: assembly.c:44
#define WARN(fmt,...)
Definition: debug.h:111
#define LOCK_EXIT
Definition: atexit.h:8
VOID WINAPI ExitProcess(IN UINT uExitCode)
Definition: proc.c:1544
void _cexit(void)
Definition: _exit.c:7
void __call_atexit(void)
Definition: atexit.c:9
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
void _exit(int exitcode)
Definition: _exit.c:25
#define WINAPI
Definition: msvc.h:20
static const WCHAR mscoreeW[]
Definition: actctx.c:634
HANDLE HMODULE
Definition: typedefs.h:75
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:845
#define GetProcAddress(x, y)
Definition: compat.h:410
void exit(int exitcode)
Definition: _exit.c:33
#define UNLOCK_EXIT
Definition: atexit.h:9
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:29