Commit abb74600 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Fix _get/_set_invalid_parameter_handler implementation.

parent f377e4be
...@@ -470,7 +470,7 @@ ...@@ -470,7 +470,7 @@
@ stub _get_errno @ stub _get_errno
@ stub _get_fmode @ stub _get_fmode
@ stub _get_heap_handle @ stub _get_heap_handle
@ cdecl _get_invalid_parameter_handler() msvcr90._get_invalid_parameter_handler @ cdecl _get_invalid_parameter_handler() msvcrt._get_invalid_parameter_handler
@ cdecl _get_osfhandle(long) msvcrt._get_osfhandle @ cdecl _get_osfhandle(long) msvcrt._get_osfhandle
@ stub _get_osplatform @ stub _get_osplatform
@ stub _get_osver @ stub _get_osver
...@@ -533,7 +533,7 @@ ...@@ -533,7 +533,7 @@
@ stub _inp @ stub _inp
@ stub _inpd @ stub _inpd
@ stub _inpw @ stub _inpw
@ extern _invalid_parameter msvcrt._invalid_parameter @ stub _invalid_parameter
@ stub _invalid_parameter_noinfo @ stub _invalid_parameter_noinfo
@ stub _invoke_watson @ stub _invoke_watson
@ extern _iob msvcrt._iob @ extern _iob msvcrt._iob
...@@ -873,7 +873,7 @@ ...@@ -873,7 +873,7 @@
@ stub _set_errno @ stub _set_errno
@ cdecl _set_error_mode(long) msvcrt._set_error_mode @ cdecl _set_error_mode(long) msvcrt._set_error_mode
@ stub _set_fmode @ stub _set_fmode
@ cdecl _set_invalid_parameter_handler(ptr) msvcr90._set_invalid_parameter_handler @ cdecl _set_invalid_parameter_handler(ptr) msvcrt._set_invalid_parameter_handler
@ stub _set_malloc_crt_max_wait @ stub _set_malloc_crt_max_wait
@ stub _set_output_format @ stub _set_output_format
@ stub _set_printf_count_output @ stub _set_printf_count_output
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(msvcr90); WINE_DEFAULT_DEBUG_CHANNEL(msvcr90);
typedef int (CDECL *_INITTERM_E_FN)(void); typedef int (CDECL *_INITTERM_E_FN)(void);
typedef void (__cdecl *_invalid_parameter_handler)(const wchar_t*, const wchar_t*, const wchar_t*, unsigned, unsigned*);
/********************************************************************* /*********************************************************************
* DllMain (MSVCR90.@) * DllMain (MSVCR90.@)
...@@ -78,30 +77,6 @@ void * CDECL _encoded_null(void) ...@@ -78,30 +77,6 @@ void * CDECL _encoded_null(void)
} }
/********************************************************************* /*********************************************************************
* _get_invalid_parameter_handler (MSVCR90.@)
*/
_invalid_parameter_handler CDECL _get_invalid_parameter_handler(void)
{
TRACE("\n");
return *((_invalid_parameter_handler*)GetProcAddress(GetModuleHandleA("msvcrt.dll"), "_invalid_parameter"));
}
/*********************************************************************
* _set_invalid_parameter_handler (MSVCR90.@)
*/
_invalid_parameter_handler CDECL _set_invalid_parameter_handler(_invalid_parameter_handler handler)
{
_invalid_parameter_handler *ptr = (_invalid_parameter_handler*)GetProcAddress(
GetModuleHandleA("msvcrt.dll"), "_invalid_parameter");
_invalid_parameter_handler old = *ptr;
TRACE("(%p)\n", handler);
*ptr = handler;
return old;
}
/*********************************************************************
* _initterm_e (MSVCR90.@) * _initterm_e (MSVCR90.@)
* *
* call an array of application initialization functions and report the return value * call an array of application initialization functions and report the return value
......
...@@ -462,7 +462,7 @@ ...@@ -462,7 +462,7 @@
@ stub _get_errno @ stub _get_errno
@ stub _get_fmode @ stub _get_fmode
@ stub _get_heap_handle @ stub _get_heap_handle
@ cdecl _get_invalid_parameter_handler() @ cdecl _get_invalid_parameter_handler() msvcrt._get_invalid_parameter_handler
@ cdecl _get_osfhandle(long) msvcrt._get_osfhandle @ cdecl _get_osfhandle(long) msvcrt._get_osfhandle
@ stub _get_output_format @ stub _get_output_format
@ stub _get_pgmptr @ stub _get_pgmptr
...@@ -521,7 +521,7 @@ ...@@ -521,7 +521,7 @@
@ stub _inp @ stub _inp
@ stub _inpd @ stub _inpd
@ stub _inpw @ stub _inpw
@ extern _invalid_parameter msvcrt._invalid_parameter @ stub _invalid_parameter
@ stub _invalid_parameter_noinfo @ stub _invalid_parameter_noinfo
@ stub _invoke_watson @ stub _invoke_watson
@ extern _iob msvcrt._iob @ extern _iob msvcrt._iob
...@@ -859,7 +859,7 @@ ...@@ -859,7 +859,7 @@
@ stub _set_errno @ stub _set_errno
@ cdecl _set_error_mode(long) msvcrt._set_error_mode @ cdecl _set_error_mode(long) msvcrt._set_error_mode
@ stub _set_fmode @ stub _set_fmode
@ cdecl _set_invalid_parameter_handler(ptr) @ cdecl _set_invalid_parameter_handler(ptr) msvcrt._set_invalid_parameter_handler
@ stub _set_malloc_crt_max_wait @ stub _set_malloc_crt_max_wait
@ stub _set_output_format @ stub _set_output_format
@ stub _set_printf_count_output @ stub _set_printf_count_output
......
...@@ -286,3 +286,22 @@ void CDECL _seterrormode(int mode) ...@@ -286,3 +286,22 @@ void CDECL _seterrormode(int mode)
{ {
SetErrorMode( mode ); SetErrorMode( mode );
} }
/* _get_invalid_parameter_handler - not exported in native msvcrt, added in msvcr80 */
MSVCRT_invalid_parameter_handler CDECL _get_invalid_parameter_handler(void)
{
TRACE("\n");
return MSVCRT_invalid_parameter;
}
/* _set_invalid_parameter_handler - not exproted in native msvcrt, added in msvcr80 */
MSVCRT_invalid_parameter_handler CDECL _set_invalid_parameter_handler(
MSVCRT_invalid_parameter_handler handler)
{
MSVCRT_invalid_parameter_handler old = MSVCRT_invalid_parameter;
TRACE("(%p)\n", handler);
MSVCRT_invalid_parameter = handler;
return old;
}
...@@ -479,7 +479,7 @@ ...@@ -479,7 +479,7 @@
@ stub _inp #(long) -i386 @ stub _inp #(long) -i386
@ stub _inpd #(long) -i386 @ stub _inpd #(long) -i386
@ stub _inpw #(long) -i386 @ stub _inpw #(long) -i386
@ extern _invalid_parameter MSVCRT_invalid_parameter @ stub _invalid_parameter
@ extern _iob MSVCRT__iob @ extern _iob MSVCRT__iob
# stub _isalnum_l # stub _isalnum_l
# stub _isalpha_l # stub _isalpha_l
...@@ -1409,3 +1409,7 @@ ...@@ -1409,3 +1409,7 @@
# stub wprintf_s # stub wprintf_s
@ varargs wscanf(wstr) MSVCRT_wscanf @ varargs wscanf(wstr) MSVCRT_wscanf
# stub wscanf_s # stub wscanf_s
# Functions not exported in native dll:
@ cdecl _get_invalid_parameter_handler()
@ cdecl _set_invalid_parameter_handler(ptr)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment