ReactOS 0.4.16-dev-835-gd769f56
corecrt_startup.h
Go to the documentation of this file.
1//
2// corecrt_startup.h
3//
4// Copyright (c) Microsoft Corporation. All rights reserved.
5//
6// Declarations for the CoreCRT startup functionality, used while initializing
7// the CRT and during app startup and termination.
8//
9#pragma once
10
11#include <corecrt.h>
12#include <math.h>
13#include <vcruntime_startup.h>
14
15#pragma warning(push)
16#pragma warning(disable: _UCRT_DISABLED_WARNINGS)
18
20
21
22
23//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
24//
25// Exception Filters for main() and DllMain()
26//
27//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
29
31 _In_ unsigned long _ExceptionNum,
32 _In_ struct _EXCEPTION_POINTERS* _ExceptionPtr
33 );
34
36 _In_ unsigned long _ExceptionNum,
37 _In_ struct _EXCEPTION_POINTERS* _ExceptionPtr
38 );
39
40
41
42//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
43//
44// Miscellaneous Runtime Support
45//
46//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
47typedef enum _crt_app_type
48{
53
55
58 );
59
61
63 _UserMathErrorFunctionPointer _UserMathErrorFunction
64 );
65
67
68
69
70//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
71//
72// Arguments API for main() et al.
73//
74//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
77 );
78
81 );
82
83// There is a linkopt for these to disable environment initialization when using
84// the static CRT, so they are not declared _ACRTIMP.
87
90
93
94_ACRTIMP char** __cdecl __p__acmdln(void);
95_ACRTIMP wchar_t** __cdecl __p__wcmdln(void);
96
97#ifdef _CRT_DECLARE_GLOBAL_VARIABLES_DIRECTLY
98 extern char* _acmdln;
99 extern wchar_t* _wcmdln;
100#else
101 #define _acmdln (*__p__acmdln())
102 #define _wcmdln (*__p__wcmdln())
103#endif
104
105
106
107//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
108//
109// Initializer and Terminator Support
110//
111//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
112typedef void (__cdecl* _PVFV)(void);
113typedef int (__cdecl* _PIFV)(void);
114typedef void (__cdecl* _PVFI)(int);
115
116#ifndef _M_CEE
118 _In_reads_(_Last - _First) _In_ _PVFV* _First,
119 _In_ _PVFV* _Last
120 );
121
123 _In_reads_(_Last - _First) _PIFV* _First,
124 _In_ _PIFV* _Last
125 );
126#endif
127
128#ifndef _CRT_ONEXIT_T_DEFINED
129 #define _CRT_ONEXIT_T_DEFINED
130
132 #ifdef _M_CEE
133 typedef int (__clrcall* _onexit_m_t)(void);
134 #endif
135#endif
136
137typedef struct _onexit_table_t
138{
143
146 );
147
150 _In_opt_ _onexit_t _Function
151 );
152
155 );
156
158 _In_opt_ _PVFV _Function
159 );
160
162 _In_opt_ _PVFV _Function
163 );
164
165
166
167//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
168//
169// Static CRT Initialization Support
170//
171//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
172#if _CRT_FUNCTIONS_REQUIRED
173
174 _Success_(return != 0)
176
177 _Success_(return != 0)
179 _In_ __crt_bool _Terminating
180 );
181
182 _Success_(return != 0)
184 _In_ __crt_bool _Terminating
185 );
186
187 _Success_(return != 0)
189
190 _Success_(return != 0)
192
193#endif // _CRT_FUNCTIONS_REQUIRED
194
195
196
199#pragma warning(pop) // _UCRT_DISABLED_WARNINGS
#define __cdecl
Definition: accygwin.h:79
return
Definition: dirsup.c:529
_ACRTIMP int __cdecl _initialize_onexit_table(_In_opt_ _onexit_table_t *_Table)
_ACRTIMP int __cdecl _execute_onexit_table(_In_opt_ _onexit_table_t *_Table)
_ACRTIMP int __cdecl _seh_filter_dll(_In_ unsigned long _ExceptionNum, _In_ struct _EXCEPTION_POINTERS *_ExceptionPtr)
_crt_app_type
@ _crt_gui_app
@ _crt_console_app
@ _crt_unknown_app
int __cdecl _is_c_termination_complete(void)
Definition: exit.cpp:279
_ACRTIMP wchar_t **__cdecl _get_initial_wide_environment(void)
_ACRTIMP void __cdecl _set_app_type(_In_ _crt_app_type _Type)
_ACRTIMP void __cdecl _initterm(_In_reads_(_Last - _First) _In_ _PVFV *_First, _In_ _PVFV *_Last)
#define _wcmdln
int __CRTDECL _initialize_wide_environment(void)
int __CRTDECL _initialize_narrow_environment(void)
_ACRTIMP char **__cdecl _get_initial_narrow_environment(void)
_ACRTIMP wchar_t **__cdecl __p__wcmdln(void)
Definition: environ.c:376
int(__cdecl * _UserMathErrorFunctionPointer)(struct _exception *)
int(__CRTDECL * _onexit_t)(void)
_ACRTIMP int __cdecl _crt_atexit(_In_opt_ _PVFV _Function)
int(__cdecl * _PIFV)(void)
_ACRTIMP char **__cdecl __p__acmdln(void)
Definition: environ.c:368
_ACRTIMP int __cdecl _initterm_e(_In_reads_(_Last - _First) _PIFV *_First, _In_ _PIFV *_Last)
void(__cdecl * _PVFV)(void)
char *__CRTDECL _get_narrow_winmain_command_line(void)
void(__cdecl * _PVFI)(int)
wchar_t *__CRTDECL _get_wide_winmain_command_line(void)
_ACRTIMP errno_t __cdecl _configure_wide_argv(_In_ _crt_argv_mode mode)
_ACRTIMP int __cdecl _register_onexit_function(_In_opt_ _onexit_table_t *_Table, _In_opt_ _onexit_t _Function)
_ACRTIMP _crt_app_type __cdecl _query_app_type(void)
_ACRTIMP errno_t __cdecl _configure_narrow_argv(_In_ _crt_argv_mode mode)
_ACRTIMP int __cdecl _seh_filter_exe(_In_ unsigned long _ExceptionNum, _In_ struct _EXCEPTION_POINTERS *_ExceptionPtr)
#define _acmdln
_ACRTIMP int __cdecl _crt_at_quick_exit(_In_opt_ _PVFV _Function)
_ACRTIMP void __cdecl __setusermatherr(_UserMathErrorFunctionPointer _UserMathErrorFunction)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
GLenum mode
Definition: glext.h:6217
__crt_bool __cdecl __acrt_uninitialize_critical(__crt_bool const terminating)
__crt_bool __cdecl __acrt_thread_detach()
__crt_bool __cdecl __acrt_thread_attach()
__crt_bool __cdecl __acrt_uninitialize(__crt_bool const terminating)
__crt_bool __cdecl __acrt_initialize()
#define _In_reads_(s)
Definition: no_sal2.h:168
#define _Success_(c)
Definition: no_sal2.h:84
#define _In_
Definition: no_sal2.h:158
#define _In_opt_
Definition: no_sal2.h:212
#define _ACRTIMP
Definition: corecrt.h:138
#define _UCRT_DISABLE_CLANG_WARNINGS
Definition: corecrt.h:109
#define _UCRT_RESTORE_CLANG_WARNINGS
Definition: corecrt.h:117
_Bool __crt_bool
Definition: corecrt.h:274
int errno_t
Definition: corecrt.h:615
#define _CRT_END_C_HEADER
Definition: vcruntime.h:42
#define _CRT_BEGIN_C_HEADER
Definition: vcruntime.h:40
_crt_argv_mode
#define __CRTDECL
Definition: yvals.h:17