ReactOS  0.4.15-dev-3453-gff89651
crt_init.c
Go to the documentation of this file.
1 
2 #include <precomp.h>
3 
4 extern int BlockEnvToEnvironA(void);
5 extern int BlockEnvToEnvironW(void);
6 extern void FreeEnvironment(char **environment);
7 
8 extern void msvcrt_init_mt_locks(void);
9 extern void msvcrt_init_io(void);
10 
11 extern char* _acmdln; /* pointer to ascii command line */
12 extern wchar_t* _wcmdln; /* pointer to wide character command line */
13 #undef _environ
14 extern char** _environ; /* pointer to environment block */
15 extern char** __initenv; /* pointer to initial environment block */
16 extern wchar_t** _wenviron; /* pointer to environment block */
17 extern wchar_t** __winitenv; /* pointer to initial environment block */
18 
19 BOOL
21 {
23 
24  /* initialize version info */
32 
33  /* create tls stuff */
34  if (!msvcrt_init_tls())
35  return FALSE;
36 
37  if (BlockEnvToEnvironA() < 0)
38  return FALSE;
39 
40  if (BlockEnvToEnvironW() < 0)
41  {
43  return FALSE;
44  }
45 
48 
49  /* Initialization of the WINE code */
51 
52  //msvcrt_init_math();
54  //msvcrt_init_console();
55  //msvcrt_init_args();
56  //msvcrt_init_signals();
57 
58  return TRUE;
59 }
ULONG dwMajorVersion
Definition: rtltypes.h:238
int BlockEnvToEnvironA(void)
Definition: environ.c:34
OSVERSIONINFO osvi
Definition: ver.c:28
#define TRUE
Definition: types.h:120
void msvcrt_init_mt_locks(void)
Definition: lock.c:54
unsigned int _winminor
Definition: environ.c:12
if(dx==0 &&dy==0)
Definition: linetemp.h:174
BOOL WINAPI GetVersionExW(IN LPOSVERSIONINFOW lpVersionInformation)
Definition: version.c:37
#define _strdup
Definition: debug_ros.c:7
wchar_t * _wcmdln
Definition: environ.c:19
#define FALSE
Definition: types.h:117
wchar_t ** __winitenv
Definition: environ.c:25
unsigned int BOOL
Definition: ntddk_ex.h:94
LPWSTR WINAPI GetCommandLineW(VOID)
Definition: proc.c:2014
int BlockEnvToEnvironW(void)
Definition: environ.c:86
void FreeEnvironment(char **environment)
Definition: environ.c:190
ULONG dwOSVersionInfoSize
Definition: rtltypes.h:237
ULONG dwBuildNumber
Definition: rtltypes.h:240
void msvcrt_init_io(void)
Definition: file.c:456
BOOL msvcrt_init_tls(void)
Definition: tls.c:9
unsigned int _osplatform
Definition: environ.c:10
struct _OSVERSIONINFOW OSVERSIONINFOW
LPSTR WINAPI GetCommandLineA(VOID)
Definition: proc.c:2004
BOOL crt_process_init(void)
Definition: crt_init.c:20
ULONG dwMinorVersion
Definition: rtltypes.h:239
wchar_t ** _wenviron
Definition: environ.c:23
unsigned int _osver
Definition: environ.c:11
ULONG dwPlatformId
Definition: rtltypes.h:241
unsigned int _winmajor
Definition: environ.c:13
unsigned int _winver
Definition: environ.c:14
char * _acmdln
Definition: environ.c:18
_Check_return_ _CRTIMP wchar_t *__cdecl _wcsdup(_In_z_ const wchar_t *_Str)
char ** __initenv
Definition: environ.c:24
char ** _environ
Definition: environ.c:22