diff --git a/dlls/api-ms-win-crt-private-l1-1-0/api-ms-win-crt-private-l1-1-0.spec b/dlls/api-ms-win-crt-private-l1-1-0/api-ms-win-crt-private-l1-1-0.spec index 2fa639c8403..ee323885478 100644 --- a/dlls/api-ms-win-crt-private-l1-1-0/api-ms-win-crt-private-l1-1-0.spec +++ b/dlls/api-ms-win-crt-private-l1-1-0/api-ms-win-crt-private-l1-1-0.spec @@ -24,7 +24,7 @@ @ cdecl -arch=i386,x86_64,arm __CxxQueryExceptionSize() ucrtbase.__CxxQueryExceptionSize @ cdecl __CxxRegisterExceptionObject(ptr ptr) ucrtbase.__CxxRegisterExceptionObject @ stub __CxxUnregisterExceptionObject -@ stub __DestructExceptionObject +@ cdecl __DestructExceptionObject(ptr) ucrtbase.__DestructExceptionObject @ stub __FrameUnwindFilter @ stub __GetPlatformExceptionInfo @ stub __NLG_Dispatch2 diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index cfce95662eb..73b86884fb5 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -556,7 +556,7 @@ @ cdecl -arch=i386,x86_64,arm __CxxQueryExceptionSize() @ cdecl __CxxRegisterExceptionObject(ptr ptr) @ stub __CxxUnregisterExceptionObject -@ stub __DestructExceptionObject +@ cdecl __DestructExceptionObject(ptr) @ stub __FrameUnwindFilter @ cdecl __RTCastToVoid(ptr) MSVCRT___RTCastToVoid @ cdecl __RTDynamicCast(ptr long ptr ptr long) MSVCRT___RTDynamicCast diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index 84b50e1c96e..9659942b1f8 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -883,7 +883,7 @@ @ cdecl -arch=i386,x86_64,arm __CxxQueryExceptionSize() @ cdecl __CxxRegisterExceptionObject(ptr ptr) @ stub __CxxUnregisterExceptionObject -@ stub __DestructExceptionObject +@ cdecl __DestructExceptionObject(ptr) @ stub __FrameUnwindFilter @ cdecl __RTCastToVoid(ptr) MSVCRT___RTCastToVoid @ cdecl __RTDynamicCast(ptr long ptr ptr long) MSVCRT___RTDynamicCast diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 29c6965c790..c9f49a327b2 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -867,7 +867,7 @@ @ cdecl -arch=i386,x86_64,arm __CxxQueryExceptionSize() @ cdecl __CxxRegisterExceptionObject(ptr ptr) @ stub __CxxUnregisterExceptionObject -@ stub __DestructExceptionObject +@ cdecl __DestructExceptionObject(ptr) @ stub __FrameUnwindFilter @ stub __GetPlatformExceptionInfo @ cdecl __RTCastToVoid(ptr) MSVCRT___RTCastToVoid diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index 51d3ef0ef74..a8165c9f366 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -861,7 +861,7 @@ @ cdecl -arch=i386,x86_64,arm __CxxQueryExceptionSize() msvcr120.__CxxQueryExceptionSize @ cdecl __CxxRegisterExceptionObject(ptr ptr) msvcr120.__CxxRegisterExceptionObject @ stub __CxxUnregisterExceptionObject -@ stub __DestructExceptionObject +@ cdecl __DestructExceptionObject(ptr) msvcr120.__DestructExceptionObject @ stub __FrameUnwindFilter @ stub __GetPlatformExceptionInfo @ cdecl __RTCastToVoid(ptr) msvcr120.__RTCastToVoid diff --git a/dlls/msvcr70/msvcr70.spec b/dlls/msvcr70/msvcr70.spec index a4e0279bee9..d7fe7896201 100644 --- a/dlls/msvcr70/msvcr70.spec +++ b/dlls/msvcr70/msvcr70.spec @@ -125,7 +125,7 @@ @ cdecl -arch=i386,x86_64,arm __CxxQueryExceptionSize() @ cdecl __CxxRegisterExceptionObject(ptr ptr) @ stub __CxxUnregisterExceptionObject -@ stub __DestructExceptionObject +@ cdecl __DestructExceptionObject(ptr) @ cdecl __RTCastToVoid(ptr) MSVCRT___RTCastToVoid @ cdecl __RTDynamicCast(ptr long ptr ptr long) MSVCRT___RTDynamicCast @ cdecl __RTtypeid(ptr) MSVCRT___RTtypeid diff --git a/dlls/msvcr71/msvcr71.spec b/dlls/msvcr71/msvcr71.spec index 31d80b2cc8f..944b43741f3 100644 --- a/dlls/msvcr71/msvcr71.spec +++ b/dlls/msvcr71/msvcr71.spec @@ -120,7 +120,7 @@ @ cdecl -arch=i386,x86_64,arm __CxxQueryExceptionSize() @ cdecl __CxxRegisterExceptionObject(ptr ptr) @ stub __CxxUnregisterExceptionObject -@ stub __DestructExceptionObject +@ cdecl __DestructExceptionObject(ptr) @ cdecl __RTCastToVoid(ptr) MSVCRT___RTCastToVoid @ cdecl __RTDynamicCast(ptr long ptr ptr long) MSVCRT___RTDynamicCast @ cdecl __RTtypeid(ptr) MSVCRT___RTtypeid diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index 36d1058cf53..84f0f58d72a 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -190,7 +190,7 @@ @ cdecl -arch=i386,x86_64,arm __CxxQueryExceptionSize() @ cdecl __CxxRegisterExceptionObject(ptr ptr) @ stub __CxxUnregisterExceptionObject -@ stub __DestructExceptionObject +@ cdecl __DestructExceptionObject(ptr) @ stub __FrameUnwindFilter @ cdecl __RTCastToVoid(ptr) MSVCRT___RTCastToVoid @ cdecl __RTDynamicCast(ptr long ptr ptr long) MSVCRT___RTDynamicCast diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index 56448bc229b..db99449673d 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -181,7 +181,7 @@ @ cdecl -arch=i386,x86_64,arm __CxxQueryExceptionSize() @ cdecl __CxxRegisterExceptionObject(ptr ptr) @ stub __CxxUnregisterExceptionObject -@ stub __DestructExceptionObject +@ cdecl __DestructExceptionObject(ptr) @ stub __FrameUnwindFilter @ cdecl __RTCastToVoid(ptr) MSVCRT___RTCastToVoid @ cdecl __RTDynamicCast(ptr long ptr ptr long) MSVCRT___RTDynamicCast diff --git a/dlls/msvcrt/except.c b/dlls/msvcrt/except.c index a7ae0dae23c..f950707befa 100644 --- a/dlls/msvcrt/except.c +++ b/dlls/msvcrt/except.c @@ -37,6 +37,8 @@ #include "wincon.h" #include "wine/debug.h" +#include "cppexcept.h" + WINE_DEFAULT_DEBUG_CHANNEL(seh); static MSVCRT_security_error_handler security_error_handler; @@ -370,6 +372,28 @@ void CDECL _FindAndUnlinkFrame(frame_info *fi) ERR("frame not found, native crashes in this case\n"); } +/********************************************************************* + * __DestructExceptionObject (MSVCRT.@) + */ +void CDECL __DestructExceptionObject(EXCEPTION_RECORD *rec) +{ + cxx_exception_type *info = (cxx_exception_type*) rec->ExceptionInformation[2]; + void *object = (void*)rec->ExceptionInformation[1]; + + TRACE("(%p)\n", rec); + + if (!info || !info->destructor) + return; + +#if defined(__i386__) + __asm__ __volatile__("call *%0" : : "r" (info->destructor), "c" (object) : "eax", "edx", "memory" ); +#elif defined(__x86_64__) + ((void (__cdecl*)(void*))(info->destructor+rec->ExceptionInformation[3]))(object); +#else + ((void (__cdecl*)(void*))info->destructor)(object); +#endif +} + /********************************************************************* * __CxxRegisterExceptionObject (MSVCRT.@) */ diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index a96ac352045..3093cd4ad2e 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -186,7 +186,7 @@ @ cdecl -arch=i386,x86_64,arm __CxxQueryExceptionSize() @ cdecl __CxxRegisterExceptionObject(ptr ptr) # stub __CxxUnregisterExceptionObject -# stub __DestructExceptionObject +@ cdecl __DestructExceptionObject(ptr) @ cdecl __RTCastToVoid(ptr) MSVCRT___RTCastToVoid @ cdecl __RTDynamicCast(ptr long ptr ptr long) MSVCRT___RTDynamicCast @ cdecl __RTtypeid(ptr) MSVCRT___RTtypeid diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index d286bf3c1c7..e85ae8afe2e 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -58,7 +58,7 @@ @ cdecl -arch=i386,x86_64,arm __CxxQueryExceptionSize() @ cdecl __CxxRegisterExceptionObject(ptr ptr) @ stub __CxxUnregisterExceptionObject -@ stub __DestructExceptionObject +@ cdecl __DestructExceptionObject(ptr) @ stub __FrameUnwindFilter @ stub __GetPlatformExceptionInfo @ stub __NLG_Dispatch2 diff --git a/dlls/vcruntime140/vcruntime140.spec b/dlls/vcruntime140/vcruntime140.spec index 2ba8f1e2aac..f0b11fdc003 100644 --- a/dlls/vcruntime140/vcruntime140.spec +++ b/dlls/vcruntime140/vcruntime140.spec @@ -21,7 +21,7 @@ @ cdecl -arch=i386,x86_64,arm __CxxQueryExceptionSize() ucrtbase.__CxxQueryExceptionSize @ cdecl __CxxRegisterExceptionObject(ptr ptr) ucrtbase.__CxxRegisterExceptionObject @ stub __CxxUnregisterExceptionObject -@ stub __DestructExceptionObject +@ cdecl __DestructExceptionObject(ptr) ucrtbase.__DestructExceptionObject @ stub __FrameUnwindFilter @ stub __GetPlatformExceptionInfo @ stub __NLG_Dispatch2