Module: wine Branch: master Commit: 97b9ff81b8c0764ba1fed1fc884f77967f1bb38b URL: http://source.winehq.org/git/wine.git/?a=commit;h=97b9ff81b8c0764ba1fed1fc88...
Author: Piotr Caban piotr@codeweavers.com Date: Thu Feb 25 11:09:03 2016 +0100
msvcrt: Fix 64-bit _CxxThrowException implementation.
Signed-off-by: Piotr Caban piotr@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/msvcrt/cpp.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c index 7cffa00..17292d5 100644 --- a/dlls/msvcrt/cpp.c +++ b/dlls/msvcrt/cpp.c @@ -1152,6 +1152,7 @@ void* CDECL MSVCRT___RTCastToVoid(void *cppobj) /********************************************************************* * _CxxThrowException (MSVCRT.@) */ +#ifndef __x86_64__ void WINAPI _CxxThrowException( exception *object, const cxx_exception_type *type ) { ULONG_PTR args[3]; @@ -1161,6 +1162,18 @@ void WINAPI _CxxThrowException( exception *object, const cxx_exception_type *typ args[2] = (ULONG_PTR)type; RaiseException( CXX_EXCEPTION, EH_NONCONTINUABLE, 3, args ); } +#else +void WINAPI _CxxThrowException( exception *object, const cxx_exception_type *type ) +{ + ULONG_PTR args[4]; + + args[0] = CXX_FRAME_MAGIC_VC6; + args[1] = (ULONG_PTR)object; + args[2] = (ULONG_PTR)type; + RtlPcToFileHeader( (void*)type, (void**)&args[3]); + RaiseException( CXX_EXCEPTION, EH_NONCONTINUABLE, 4, args ); +} +#endif
/********************************************************************* * ?_is_exception_typeof@@YAHABVtype_info@@PAU_EXCEPTION_POINTERS@@@Z