2 * msvcrt.dll dll data items
4 * Copyright 2000 Jon Griffiths
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #include "wine/port.h"
26 #include "wine/library.h"
27 #include "wine/unicode.h"
28 #include "wine/debug.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(msvcrt
);
32 int MSVCRT___argc
= 0;
33 static int argc_expand
;
34 static int wargc_expand
;
35 unsigned int MSVCRT__commode
= 0;
36 int MSVCRT__fmode
= 0;
37 unsigned int MSVCRT__osver
= 0;
38 unsigned int MSVCRT__osplatform
= 0;
39 unsigned int MSVCRT__winmajor
= 0;
40 unsigned int MSVCRT__winminor
= 0;
41 unsigned int MSVCRT__winver
= 0;
42 unsigned int MSVCRT___setlc_active
= 0;
43 unsigned int MSVCRT___unguarded_readlc_active
= 0;
44 double MSVCRT__HUGE
= 0;
45 char **MSVCRT___argv
= NULL
;
46 static char **argv_expand
;
47 MSVCRT_wchar_t
**MSVCRT___wargv
= NULL
;
48 static MSVCRT_wchar_t
**wargv_expand
;
49 char *MSVCRT__acmdln
= NULL
;
50 MSVCRT_wchar_t
*MSVCRT__wcmdln
= NULL
;
51 char **MSVCRT__environ
= NULL
;
52 MSVCRT_wchar_t
**MSVCRT__wenviron
= NULL
;
53 char **MSVCRT___initenv
= NULL
;
54 MSVCRT_wchar_t
**MSVCRT___winitenv
= NULL
;
55 int MSVCRT_app_type
= 0;
56 char* MSVCRT__pgmptr
= NULL
;
57 WCHAR
* MSVCRT__wpgmptr
= NULL
;
59 /* Get a snapshot of the current environment
60 * and construct the __p__environ array
62 * The pointer returned from GetEnvironmentStrings may get invalid when
63 * some other module cause a reallocation of the env-variable block
65 * blk is an array of pointers to environment strings, ending with a NULL
66 * and after that the actual copy of the environment strings, ending in a \0
68 char ** msvcrt_SnapshotOfEnvironmentA(char **blk
)
70 char* environ_strings
= GetEnvironmentStringsA();
71 int count
= 1, len
= 1, i
= 0; /* keep space for the trailing NULLS */
74 for (ptr
= environ_strings
; *ptr
; ptr
+= strlen(ptr
) + 1)
76 /* Don't count environment variables starting with '=' which are command shell specific */
77 if (*ptr
!= '=') count
++;
78 len
+= strlen(ptr
) + 1;
81 blk
= HeapReAlloc( GetProcessHeap(), 0, blk
, count
* sizeof(char*) + len
);
83 blk
= HeapAlloc(GetProcessHeap(), 0, count
* sizeof(char*) + len
);
89 memcpy(&blk
[count
],environ_strings
,len
);
90 for (ptr
= (char*) &blk
[count
]; *ptr
; ptr
+= strlen(ptr
) + 1)
92 /* Skip special environment strings set by the command shell */
93 if (*ptr
!= '=') blk
[i
++] = ptr
;
98 FreeEnvironmentStringsA(environ_strings
);
102 MSVCRT_wchar_t
** msvcrt_SnapshotOfEnvironmentW(MSVCRT_wchar_t
**wblk
)
104 MSVCRT_wchar_t
* wenviron_strings
= GetEnvironmentStringsW();
105 int count
= 1, len
= 1, i
= 0; /* keep space for the trailing NULLS */
106 MSVCRT_wchar_t
*wptr
;
108 for (wptr
= wenviron_strings
; *wptr
; wptr
+= strlenW(wptr
) + 1)
110 /* Don't count environment variables starting with '=' which are command shell specific */
111 if (*wptr
!= '=') count
++;
112 len
+= strlenW(wptr
) + 1;
115 wblk
= HeapReAlloc( GetProcessHeap(), 0, wblk
, count
* sizeof(MSVCRT_wchar_t
*) + len
* sizeof(MSVCRT_wchar_t
));
117 wblk
= HeapAlloc(GetProcessHeap(), 0, count
* sizeof(MSVCRT_wchar_t
*) + len
* sizeof(MSVCRT_wchar_t
));
122 memcpy(&wblk
[count
],wenviron_strings
,len
* sizeof(MSVCRT_wchar_t
));
123 for (wptr
= (MSVCRT_wchar_t
*)&wblk
[count
]; *wptr
; wptr
+= strlenW(wptr
) + 1)
125 /* Skip special environment strings set by the command shell */
126 if (*wptr
!= '=') wblk
[i
++] = wptr
;
131 FreeEnvironmentStringsW(wenviron_strings
);
135 typedef void (CDECL
*_INITTERMFUN
)(void);
136 typedef int (CDECL
*_INITTERM_E_FN
)(void);
138 /***********************************************************************
139 * __p___argc (MSVCRT.@)
141 int* CDECL
MSVCRT___p___argc(void) { return &MSVCRT___argc
; }
143 /***********************************************************************
144 * __p__commode (MSVCRT.@)
146 unsigned int* CDECL
__p__commode(void) { return &MSVCRT__commode
; }
149 /***********************************************************************
150 * __p__pgmptr (MSVCRT.@)
152 char** CDECL
MSVCRT___p__pgmptr(void) { return &MSVCRT__pgmptr
; }
154 /***********************************************************************
155 * __p__wpgmptr (MSVCRT.@)
157 WCHAR
** CDECL
MSVCRT___p__wpgmptr(void) { return &MSVCRT__wpgmptr
; }
159 /***********************************************************************
160 * _get_pgmptr (MSVCRT.@)
162 int CDECL
_get_pgmptr(char** p
)
164 if (!MSVCRT_CHECK_PMT(p
)) return MSVCRT_EINVAL
;
170 /***********************************************************************
171 * _get_wpgmptr (MSVCRT.@)
173 int CDECL
_get_wpgmptr(WCHAR
** p
)
175 if (!MSVCRT_CHECK_PMT(p
)) return MSVCRT_EINVAL
;
176 *p
= MSVCRT__wpgmptr
;
180 /***********************************************************************
181 * __p__fmode (MSVCRT.@)
183 int* CDECL
MSVCRT___p__fmode(void) { return &MSVCRT__fmode
; }
185 /***********************************************************************
186 * _set_fmode (MSVCRT.@)
188 int CDECL
MSVCRT__set_fmode(int mode
)
190 /* TODO: support _O_WTEXT */
191 if(!MSVCRT_CHECK_PMT(mode
==MSVCRT__O_TEXT
|| mode
==MSVCRT__O_BINARY
))
192 return MSVCRT_EINVAL
;
194 MSVCRT__fmode
= mode
;
198 /***********************************************************************
199 * _get_fmode (MSVCRT.@)
201 int CDECL
MSVCRT__get_fmode(int *mode
)
203 if(!MSVCRT_CHECK_PMT(mode
))
204 return MSVCRT_EINVAL
;
206 *mode
= MSVCRT__fmode
;
210 /***********************************************************************
211 * __p__osver (MSVCRT.@)
213 unsigned int* CDECL
__p__osver(void) { return &MSVCRT__osver
; }
215 /***********************************************************************
216 * __p__winmajor (MSVCRT.@)
218 unsigned int* CDECL
__p__winmajor(void) { return &MSVCRT__winmajor
; }
220 /***********************************************************************
221 * __p__winminor (MSVCRT.@)
223 unsigned int* CDECL
__p__winminor(void) { return &MSVCRT__winminor
; }
225 /***********************************************************************
226 * __p__winver (MSVCRT.@)
228 unsigned int* CDECL
__p__winver(void) { return &MSVCRT__winver
; }
230 /*********************************************************************
231 * __p__acmdln (MSVCRT.@)
233 char** CDECL
MSVCRT___p__acmdln(void) { return &MSVCRT__acmdln
; }
235 /*********************************************************************
236 * __p__wcmdln (MSVCRT.@)
238 MSVCRT_wchar_t
** CDECL
MSVCRT___p__wcmdln(void) { return &MSVCRT__wcmdln
; }
240 /*********************************************************************
241 * __p___argv (MSVCRT.@)
243 char*** CDECL
MSVCRT___p___argv(void) { return &MSVCRT___argv
; }
245 /*********************************************************************
246 * __p___wargv (MSVCRT.@)
248 MSVCRT_wchar_t
*** CDECL
MSVCRT___p___wargv(void) { return &MSVCRT___wargv
; }
250 /*********************************************************************
251 * __p__environ (MSVCRT.@)
253 char*** CDECL
MSVCRT___p__environ(void)
255 return &MSVCRT__environ
;
258 /*********************************************************************
259 * __p__wenviron (MSVCRT.@)
261 MSVCRT_wchar_t
*** CDECL
MSVCRT___p__wenviron(void)
263 return &MSVCRT__wenviron
;
266 /*********************************************************************
267 * __p___initenv (MSVCRT.@)
269 char*** CDECL
__p___initenv(void) { return &MSVCRT___initenv
; }
271 /*********************************************************************
272 * __p___winitenv (MSVCRT.@)
274 MSVCRT_wchar_t
*** CDECL
__p___winitenv(void) { return &MSVCRT___winitenv
; }
276 /*********************************************************************
277 * _get_osplatform (MSVCRT.@)
279 int CDECL
MSVCRT__get_osplatform(int *pValue
)
281 if (!MSVCRT_CHECK_PMT(pValue
!= NULL
)) return MSVCRT_EINVAL
;
282 *pValue
= MSVCRT__osplatform
;
286 /* INTERNAL: Create a wide string from an ascii string */
287 MSVCRT_wchar_t
*msvcrt_wstrdupa(const char *str
)
289 const unsigned int len
= strlen(str
) + 1 ;
290 MSVCRT_wchar_t
*wstr
= MSVCRT_malloc(len
* sizeof (MSVCRT_wchar_t
));
293 MultiByteToWideChar(CP_ACP
, MB_PRECOMPOSED
,str
,len
,wstr
,len
);
297 /*********************************************************************
298 * ___unguarded_readlc_active_add_func (MSVCRT.@)
300 unsigned int * CDECL
MSVCRT____unguarded_readlc_active_add_func(void)
302 return &MSVCRT___unguarded_readlc_active
;
305 /*********************************************************************
306 * ___setlc_active_func (MSVCRT.@)
308 unsigned int CDECL
MSVCRT____setlc_active_func(void)
310 return MSVCRT___setlc_active
;
313 /* INTERNAL: Since we can't rely on Winelib startup code calling w/getmainargs,
314 * we initialise data values during DLL loading. When called by a native
315 * program we simply return the data we've already initialised. This also means
316 * you can call multiple times without leaking
318 void msvcrt_init_args(void)
322 MSVCRT__acmdln
= MSVCRT__strdup( GetCommandLineA() );
323 MSVCRT__wcmdln
= msvcrt_wstrdupa(MSVCRT__acmdln
);
324 MSVCRT___argc
= __wine_main_argc
;
325 MSVCRT___argv
= __wine_main_argv
;
326 MSVCRT___wargv
= __wine_main_wargv
;
328 TRACE("got %s, wide = %s argc=%d\n", debugstr_a(MSVCRT__acmdln
),
329 debugstr_w(MSVCRT__wcmdln
),MSVCRT___argc
);
331 osvi
.dwOSVersionInfoSize
= sizeof(OSVERSIONINFOW
);
332 GetVersionExW( &osvi
);
333 MSVCRT__winver
= (osvi
.dwMajorVersion
<< 8) | osvi
.dwMinorVersion
;
334 MSVCRT__winmajor
= osvi
.dwMajorVersion
;
335 MSVCRT__winminor
= osvi
.dwMinorVersion
;
336 MSVCRT__osver
= osvi
.dwBuildNumber
;
337 MSVCRT__osplatform
= osvi
.dwPlatformId
;
338 TRACE( "winver %08x winmajor %08x winminor %08x osver %08x\n",
339 MSVCRT__winver
, MSVCRT__winmajor
, MSVCRT__winminor
, MSVCRT__osver
);
341 MSVCRT__HUGE
= HUGE_VAL
;
342 MSVCRT___setlc_active
= 0;
343 MSVCRT___unguarded_readlc_active
= 0;
344 MSVCRT__fmode
= MSVCRT__O_TEXT
;
346 MSVCRT__environ
= msvcrt_SnapshotOfEnvironmentA(NULL
);
347 MSVCRT___initenv
= msvcrt_SnapshotOfEnvironmentA(NULL
);
348 MSVCRT___winitenv
= msvcrt_SnapshotOfEnvironmentW(NULL
);
350 MSVCRT__pgmptr
= HeapAlloc(GetProcessHeap(), 0, MAX_PATH
);
353 if (!GetModuleFileNameA(0, MSVCRT__pgmptr
, MAX_PATH
))
354 MSVCRT__pgmptr
[0] = '\0';
356 MSVCRT__pgmptr
[MAX_PATH
- 1] = '\0';
359 MSVCRT__wpgmptr
= HeapAlloc(GetProcessHeap(), 0, MAX_PATH
* sizeof(WCHAR
));
362 if (!GetModuleFileNameW(0, MSVCRT__wpgmptr
, MAX_PATH
))
363 MSVCRT__wpgmptr
[0] = '\0';
365 MSVCRT__wpgmptr
[MAX_PATH
- 1] = '\0';
369 /* INTERNAL: free memory used by args */
370 void msvcrt_free_args(void)
372 /* FIXME: more things to free */
373 HeapFree(GetProcessHeap(), 0, MSVCRT___initenv
);
374 HeapFree(GetProcessHeap(), 0, MSVCRT___winitenv
);
375 HeapFree(GetProcessHeap(), 0, MSVCRT__environ
);
376 HeapFree(GetProcessHeap(), 0, MSVCRT__wenviron
);
377 HeapFree(GetProcessHeap(), 0, MSVCRT__pgmptr
);
378 HeapFree(GetProcessHeap(), 0, MSVCRT__wpgmptr
);
379 HeapFree(GetProcessHeap(), 0, argv_expand
);
380 HeapFree(GetProcessHeap(), 0, wargv_expand
);
383 static int build_expanded_argv(int *argc
, char **argv
)
385 int i
, size
=0, args_no
=0, path_len
;
390 for(i
=0; i
<__wine_main_argc
; i
++) {
391 WIN32_FIND_DATAA data
;
394 is_expandable
= FALSE
;
395 for(path_len
= strlen(__wine_main_argv
[i
])-1; path_len
>=0; path_len
--) {
396 if(__wine_main_argv
[i
][path_len
]=='*' || __wine_main_argv
[i
][path_len
]=='?')
397 is_expandable
= TRUE
;
398 else if(__wine_main_argv
[i
][path_len
]=='\\' || __wine_main_argv
[i
][path_len
]=='/')
404 h
= FindFirstFileA(__wine_main_argv
[i
], &data
);
406 h
= INVALID_HANDLE_VALUE
;
408 if(h
!= INVALID_HANDLE_VALUE
) {
410 if(data
.cFileName
[0]=='.' && (data
.cFileName
[1]=='\0' ||
411 (data
.cFileName
[1]=='.' && data
.cFileName
[2]=='\0')))
414 len
= strlen(data
.cFileName
)+1;
416 argv
[args_no
] = (char*)(argv
+*argc
+1)+size
;
417 memcpy(argv
[args_no
], __wine_main_argv
[i
], path_len
*sizeof(char));
418 memcpy(argv
[args_no
]+path_len
, data
.cFileName
, len
*sizeof(char));
421 size
+= len
+path_len
;
422 }while(FindNextFileA(h
, &data
));
427 len
= strlen(__wine_main_argv
[i
])+1;
429 argv
[args_no
] = (char*)(argv
+*argc
+1)+size
;
430 memcpy(argv
[args_no
], __wine_main_argv
[i
], len
*sizeof(char));
438 argv
[args_no
] = NULL
;
439 size
+= (args_no
+1)*sizeof(char*);
444 /*********************************************************************
445 * __getmainargs (MSVCRT.@)
447 int CDECL
__getmainargs(int *argc
, char** *argv
, char** *envp
,
448 int expand_wildcards
, int *new_mode
)
450 TRACE("(%p,%p,%p,%d,%p).\n", argc
, argv
, envp
, expand_wildcards
, new_mode
);
452 if (expand_wildcards
) {
453 HeapFree(GetProcessHeap(), 0, argv_expand
);
456 argv_expand
= HeapAlloc(GetProcessHeap(), 0,
457 build_expanded_argv(&argc_expand
, NULL
));
459 build_expanded_argv(&argc_expand
, argv_expand
);
461 MSVCRT___argc
= argc_expand
;
462 MSVCRT___argv
= argv_expand
;
464 expand_wildcards
= 0;
467 if (!expand_wildcards
) {
468 MSVCRT___argc
= __wine_main_argc
;
469 MSVCRT___argv
= __wine_main_argv
;
472 *argc
= MSVCRT___argc
;
473 *argv
= MSVCRT___argv
;
474 *envp
= MSVCRT___initenv
;
477 MSVCRT__set_new_mode( *new_mode
);
481 static int build_expanded_wargv(int *argc
, MSVCRT_wchar_t
**argv
)
483 int i
, size
=0, args_no
=0, path_len
;
488 for(i
=0; i
<__wine_main_argc
; i
++) {
489 WIN32_FIND_DATAW data
;
492 is_expandable
= FALSE
;
493 for(path_len
= strlenW(__wine_main_wargv
[i
])-1; path_len
>=0; path_len
--) {
494 if(__wine_main_wargv
[i
][path_len
]=='*' || __wine_main_wargv
[i
][path_len
]=='?')
495 is_expandable
= TRUE
;
496 else if(__wine_main_wargv
[i
][path_len
]=='\\' || __wine_main_wargv
[i
][path_len
]=='/')
502 h
= FindFirstFileW(__wine_main_wargv
[i
], &data
);
504 h
= INVALID_HANDLE_VALUE
;
506 if(h
!= INVALID_HANDLE_VALUE
) {
508 if(data
.cFileName
[0]=='.' && (data
.cFileName
[1]=='\0' ||
509 (data
.cFileName
[1]=='.' && data
.cFileName
[2]=='\0')))
512 len
= strlenW(data
.cFileName
)+1;
514 argv
[args_no
] = (MSVCRT_wchar_t
*)(argv
+*argc
+1)+size
;
515 memcpy(argv
[args_no
], __wine_main_wargv
[i
], path_len
*sizeof(MSVCRT_wchar_t
));
516 memcpy(argv
[args_no
]+path_len
, data
.cFileName
, len
*sizeof(MSVCRT_wchar_t
));
519 size
+= len
+path_len
;
520 }while(FindNextFileW(h
, &data
));
525 len
= strlenW(__wine_main_wargv
[i
])+1;
527 argv
[args_no
] = (MSVCRT_wchar_t
*)(argv
+*argc
+1)+size
;
528 memcpy(argv
[args_no
], __wine_main_wargv
[i
], len
*sizeof(MSVCRT_wchar_t
));
536 argv
[args_no
] = NULL
;
537 size
*= sizeof(MSVCRT_wchar_t
);
538 size
+= (args_no
+1)*sizeof(MSVCRT_wchar_t
*);
543 /*********************************************************************
544 * __wgetmainargs (MSVCRT.@)
546 int CDECL
__wgetmainargs(int *argc
, MSVCRT_wchar_t
** *wargv
, MSVCRT_wchar_t
** *wenvp
,
547 int expand_wildcards
, int *new_mode
)
549 TRACE("(%p,%p,%p,%d,%p).\n", argc
, wargv
, wenvp
, expand_wildcards
, new_mode
);
551 if (expand_wildcards
) {
552 HeapFree(GetProcessHeap(), 0, wargv_expand
);
555 wargv_expand
= HeapAlloc(GetProcessHeap(), 0,
556 build_expanded_wargv(&wargc_expand
, NULL
));
558 build_expanded_wargv(&wargc_expand
, wargv_expand
);
560 MSVCRT___argc
= wargc_expand
;
561 MSVCRT___wargv
= wargv_expand
;
563 expand_wildcards
= 0;
566 if (!expand_wildcards
) {
567 MSVCRT___argc
= __wine_main_argc
;
568 MSVCRT___wargv
= __wine_main_wargv
;
571 /* Initialize the _wenviron array if it's not already created. */
572 if (!MSVCRT__wenviron
)
573 MSVCRT__wenviron
= msvcrt_SnapshotOfEnvironmentW(NULL
);
574 *argc
= MSVCRT___argc
;
575 *wargv
= MSVCRT___wargv
;
576 *wenvp
= MSVCRT___winitenv
;
578 MSVCRT__set_new_mode( *new_mode
);
582 /*********************************************************************
583 * _initterm (MSVCRT.@)
585 void CDECL
_initterm(_INITTERMFUN
*start
,_INITTERMFUN
*end
)
587 _INITTERMFUN
* current
= start
;
589 TRACE("(%p,%p)\n",start
,end
);
594 TRACE("Call init function %p\n",*current
);
602 /*********************************************************************
603 * _initterm_e (MSVCRT.@)
605 * call an array of application initialization functions and report the return value
607 int CDECL
_initterm_e(_INITTERM_E_FN
*table
, _INITTERM_E_FN
*end
)
611 TRACE("(%p, %p)\n", table
, end
);
613 while (!res
&& table
< end
) {
615 TRACE("calling %p\n", **table
);
618 TRACE("function %p failed: 0x%x\n", *table
, res
);
626 /*********************************************************************
627 * __set_app_type (MSVCRT.@)
629 void CDECL
MSVCRT___set_app_type(int app_type
)
631 TRACE("(%d) %s application\n", app_type
, app_type
== 2 ? "Gui" : "Console");
632 MSVCRT_app_type
= app_type
;
637 /*********************************************************************
638 * _get_initial_narrow_environment (UCRTBASE.@)
640 char** CDECL
_get_initial_narrow_environment(void)
642 return MSVCRT___initenv
;
645 /*********************************************************************
646 * _configure_narrow_argv (UCRTBASE.@)
648 int CDECL
_configure_narrow_argv(int mode
)
650 TRACE("(%d)\n", mode
);
654 /*********************************************************************
655 * _initialize_narrow_environment (UCRTBASE.@)
657 int CDECL
_initialize_narrow_environment(void)
663 /*********************************************************************
664 * _get_initial_wide_environment (UCRTBASE.@)
666 MSVCRT_wchar_t
** CDECL
_get_initial_wide_environment(void)
668 return MSVCRT___winitenv
;
671 /*********************************************************************
672 * _configure_wide_argv (UCRTBASE.@)
674 int CDECL
_configure_wide_argv(int mode
)
676 FIXME("(%d) stub\n", mode
);
680 /*********************************************************************
681 * _initialize_wide_environment (UCRTBASE.@)
683 int CDECL
_initialize_wide_environment(void)
689 /*********************************************************************
690 * _get_narrow_winmain_command_line (UCRTBASE.@)
692 char* CDECL
_get_narrow_winmain_command_line(void)
694 static char *narrow_command_line
;
697 if (narrow_command_line
)
698 return narrow_command_line
;
700 s
= GetCommandLineA();
701 while (*s
&& *s
!= ' ' && *s
!= '\t')
705 while (*s
&& *s
++ != '"')
710 while (*s
== ' ' || *s
== '\t')
713 return narrow_command_line
= s
;
716 /*********************************************************************
717 * _get_wide_winmain_command_line (UCRTBASE.@)
719 MSVCRT_wchar_t
* CDECL
_get_wide_winmain_command_line(void)
721 static MSVCRT_wchar_t
*wide_command_line
;
724 if (wide_command_line
)
725 return wide_command_line
;
727 s
= GetCommandLineW();
728 while (*s
&& *s
!= ' ' && *s
!= '\t')
732 while (*s
&& *s
++ != '"')
737 while (*s
== ' ' || *s
== '\t')
740 return wide_command_line
= s
;
743 #endif /* _MSVCR_VER>=140 */
745 /*********************************************************************
746 * _get_winmajor (MSVCRT.@)
748 int CDECL
MSVCRT__get_winmajor(int* value
)
750 if (!MSVCRT_CHECK_PMT(value
!= NULL
)) return MSVCRT_EINVAL
;
751 *value
= MSVCRT__winmajor
;
755 /*********************************************************************
756 * _get_winminor (MSVCRT.@)
758 int CDECL
MSVCRT__get_winminor(int* value
)
760 if (!MSVCRT_CHECK_PMT(value
!= NULL
)) return MSVCRT_EINVAL
;
761 *value
= MSVCRT__winminor
;
765 /*********************************************************************
766 * _get_osver (MSVCRT.@)
768 int CDECL
MSVCRT__get_osver(int* value
)
770 if (!MSVCRT_CHECK_PMT(value
!= NULL
)) return MSVCRT_EINVAL
;
771 *value
= MSVCRT__osver
;