ReactOS  0.4.13-dev-651-g5dbc677
mscmain.c
Go to the documentation of this file.
1 
7 #include <windows.h>
8 #include <stdlib.h>
9 #include <stdio.h>
10 #include <stdarg.h>
11 #include <rtcapi.h>
12 #include <assert.h>
13 #include <internal.h>
14 
15 #if defined(_M_IX86)
16 #pragma comment(linker, "/alternatename:__RTC_Initialize=__RTC_NoInitialize")
17 #elif defined(_M_IA64) || defined(_M_AMD64) || defined(_M_ARM)
18 #pragma comment(linker, "/alternatename:_RTC_Initialize=_RTC_NoInitialize")
19 #else
20 #error Unsupported platform
21 #endif
22 
24 {
25 }
26 
28 {
29  /* Nothing to do */
30  return 1;
31 }
32 
33 BOOL
34 WINAPI
35 _CRT_INIT0(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved)
36 {
37  return TRUE;
38 }
39 
40 int
41 __cdecl
43  int errType,
44  const wchar_t *file,
45  int line,
46  const wchar_t *module,
47  const wchar_t *format,
48  ...)
49 {
50  /* FIXME: better failure routine */
51  __debugbreak();
52  return 0;
53 }
54 
55 extern
56 void
57 __cdecl
59 {
60  /* Do nothing, if RunTmChk.lib is not pulled in */
61 }
62 
64 __cdecl
66  void *_Res0,
67  void **_Res1,
68  int _Res2,
69  int _Res3,
70  int _Res4)
71 {
72  return &Catch_RTC_Failure;
73 }
74 
75 static int initialized = 0;
76 
77 void
78 __main(void)
79 {
80  if (!initialized)
81  {
82  initialized = 1;
83 
85  }
86 }
87 
88 
#define TRUE
Definition: types.h:120
void _pei386_runtime_relocator(void)
Definition: mscmain.c:23
#define __cdecl
Definition: accygwin.h:79
int __mingw_init_ehandler(void)
Definition: mscmain.c:27
int __cdecl Catch_RTC_Failure(int errType, const wchar_t *file, int line, const wchar_t *module, const wchar_t *format,...)
Definition: mscmain.c:42
static int initialized
Definition: mscmain.c:75
void __cdecl __debugbreak(void)
Definition: intrin_ppc.h:698
void __cdecl _RTC_NoInitialize(void)
Definition: mscmain.c:58
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
unsigned int BOOL
Definition: ntddk_ex.h:94
Definition: parser.c:48
void __cdecl _RTC_Initialize(void)
Definition: rtcapi.c:74
#define WINAPI
Definition: msvc.h:8
unsigned long DWORD
Definition: ntddk_ex.h:95
void __main(void)
Definition: mscmain.c:78
_RTC_error_fnW __cdecl _CRT_RTC_INITW(void *_Res0, void **_Res1, int _Res2, int _Res3, int _Res4)
Definition: mscmain.c:65
int(__cdecl * _RTC_error_fnW)(int, const wchar_t *, int, const wchar_t *, const wchar_t *,...)
Definition: rtcapi.h:27
BOOL WINAPI _CRT_INIT0(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved)
Definition: mscmain.c:35
Definition: fci.c:126