From 300978283aa3c5829fe5b263a9a6cb265b252b94 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 13 Apr 2010 17:19:27 +0200 Subject: [PATCH] msvcrt: Implement the missing exception constructor functions. --- dlls/msvcr70/msvcr70.spec | 8 +++--- dlls/msvcr71/msvcr71.spec | 8 +++--- dlls/msvcr80/msvcr80.spec | 56 +++++++++++++++++++-------------------- dlls/msvcr90/msvcr90.spec | 56 +++++++++++++++++++-------------------- dlls/msvcrt/cpp.c | 44 ++++++++++++++++++++++++++++++ dlls/msvcrt/heap.c | 10 +++++++ dlls/msvcrt/msvcrt.spec | 18 ++++++------- 7 files changed, 127 insertions(+), 73 deletions(-) diff --git a/dlls/msvcr70/msvcr70.spec b/dlls/msvcr70/msvcr70.spec index aefc7e827d..102b6db86f 100644 --- a/dlls/msvcr70/msvcr70.spec +++ b/dlls/msvcr70/msvcr70.spec @@ -2,10 +2,10 @@ @ cdecl -i386 -norelay ??0__non_rtti_object@@QAE@ABV0@@Z(ptr) msvcrt.??0__non_rtti_object@@QAE@ABV0@@Z @ cdecl -i386 -norelay ??0__non_rtti_object@@QAE@PBD@Z(ptr) msvcrt.??0__non_rtti_object@@QAE@PBD@Z -@ stub ??0bad_cast@@AAE@PBQBD@Z +@ cdecl -i386 -norelay ??0bad_cast@@AAE@PBQBD@Z(ptr) msvcrt.??0bad_cast@@AAE@PBQBD@Z @ cdecl -i386 -norelay ??0bad_cast@@QAE@ABQBD@Z(ptr) msvcrt.??0bad_cast@@QAE@ABQBD@Z @ cdecl -i386 -norelay ??0bad_cast@@QAE@ABV0@@Z(ptr) msvcrt.??0bad_cast@@QAE@ABV0@@Z -@ stub ??0bad_cast@@QAE@PBD@Z +@ cdecl -i386 -norelay ??0bad_cast@@QAE@PBD@Z(ptr) msvcrt.??0bad_cast@@QAE@PBD@Z @ cdecl -i386 -norelay ??0bad_typeid@@QAE@ABV0@@Z(ptr) msvcrt.??0bad_typeid@@QAE@ABV0@@Z @ cdecl -i386 -norelay ??0bad_typeid@@QAE@PBD@Z(ptr) msvcrt.??0bad_typeid@@QAE@PBD@Z @ cdecl -i386 -norelay ??0exception@@QAE@ABQBD@Z(ptr) msvcrt.??0exception@@QAE@ABQBD@Z @@ -32,8 +32,8 @@ @ cdecl -i386 -norelay ??_Ebad_cast@@UAEPAXI@Z(long) msvcrt.??_Ebad_cast@@UAEPAXI@Z @ cdecl -i386 -norelay ??_Ebad_typeid@@UAEPAXI@Z(long) msvcrt.??_Ebad_typeid@@UAEPAXI@Z @ cdecl -i386 -norelay ??_Eexception@@UAEPAXI@Z(long) msvcrt.??_Eexception@@UAEPAXI@Z -@ stub ??_Fbad_cast@@QAEXXZ -@ stub ??_Fbad_typeid@@QAEXXZ +@ cdecl -i386 -norelay ??_Fbad_cast@@QAEXXZ() msvcrt.??_Fbad_cast@@QAEXXZ +@ cdecl -i386 -norelay ??_Fbad_typeid@@QAEXXZ() msvcrt.??_Fbad_typeid@@QAEXXZ @ cdecl -i386 -norelay ??_G__non_rtti_object@@UAEPAXI@Z(long) msvcrt.??_G__non_rtti_object@@UAEPAXI@Z @ cdecl -i386 -norelay ??_Gbad_cast@@UAEPAXI@Z(long) msvcrt.??_Gbad_cast@@UAEPAXI@Z @ cdecl -i386 -norelay ??_Gbad_typeid@@UAEPAXI@Z(long) msvcrt.??_Gbad_typeid@@UAEPAXI@Z diff --git a/dlls/msvcr71/msvcr71.spec b/dlls/msvcr71/msvcr71.spec index bdd11fd9e3..c9542bc6aa 100644 --- a/dlls/msvcr71/msvcr71.spec +++ b/dlls/msvcr71/msvcr71.spec @@ -1,9 +1,9 @@ @ cdecl -i386 ??0__non_rtti_object@@QAE@ABV0@@Z(ptr) msvcrt.??0__non_rtti_object@@QAE@ABV0@@Z @ cdecl -i386 ??0__non_rtti_object@@QAE@PBD@Z(ptr) msvcrt.??0__non_rtti_object@@QAE@PBD@Z -@ stub ??0bad_cast@@AAE@PBQBD@Z +@ cdecl -i386 ??0bad_cast@@AAE@PBQBD@Z(ptr) msvcrt.??0bad_cast@@AAE@PBQBD@Z @ cdecl -i386 ??0bad_cast@@QAE@ABQBD@Z(ptr) msvcrt.??0bad_cast@@QAE@ABQBD@Z @ cdecl -i386 ??0bad_cast@@QAE@ABV0@@Z(ptr) msvcrt.??0bad_cast@@QAE@ABV0@@Z -@ stub ??0bad_cast@@QAE@PBD@Z +@ cdecl -i386 ??0bad_cast@@QAE@PBD@Z(ptr) msvcrt.??0bad_cast@@QAE@PBD@Z @ cdecl -i386 ??0bad_typeid@@QAE@ABV0@@Z(ptr) msvcrt.??0bad_typeid@@QAE@ABV0@@Z @ cdecl -i386 ??0bad_typeid@@QAE@PBD@Z(ptr) msvcrt.??0bad_typeid@@QAE@PBD@Z @ cdecl -i386 ??0exception@@QAE@ABQBD@Z(ptr) msvcrt.??0exception@@QAE@ABQBD@Z @@ -26,8 +26,8 @@ @ extern -i386 ??_7bad_cast@@6B@ msvcrt.??_7bad_cast@@6B@ @ extern -i386 ??_7bad_typeid@@6B@ msvcrt.??_7bad_typeid@@6B@ @ extern -i386 ??_7exception@@6B@ msvcrt.??_7exception@@6B@ -@ stub ??_Fbad_cast@@QAEXXZ -@ stub ??_Fbad_typeid@@QAEXXZ +@ cdecl -i386 ??_Fbad_cast@@QAEXXZ() msvcrt.??_Fbad_cast@@QAEXXZ +@ cdecl -i386 ??_Fbad_typeid@@QAEXXZ() msvcrt.??_Fbad_typeid@@QAEXXZ @ cdecl ??_U@YAPAXI@Z(long) msvcrt.??_U@YAPAXI@Z @ cdecl ??_V@YAXPAX@Z(ptr) msvcrt.??_V@YAXPAX@Z @ cdecl __uncaught_exception() msvcrt.__uncaught_exception diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index 4fcc545cfb..ec80a7f166 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -1,37 +1,37 @@ # MS VC++2005 runtime library -@ stub ??0__non_rtti_object@std@@QAE@ABV01@@Z -@ stub ??0bad_cast@std@@QAE@ABV01@@Z -@ stub ??0bad_cast@std@@QAE@PBD@Z -@ stub ??0bad_typeid@std@@QAE@ABV01@@Z -@ stub ??0bad_typeid@std@@QAE@PBD@Z -@ stub ??0exception@std@@QAE@ABQBD@Z -@ stub ??0exception@std@@QAE@ABQBDH@Z -@ stub ??0exception@std@@QAE@ABV01@@Z -@ stub ??0exception@std@@QAE@XZ -@ stub ??1__non_rtti_object@std@@UAE@XZ -@ stub ??1bad_cast@std@@UAE@XZ -@ stub ??1bad_typeid@std@@UAE@XZ -@ stub ??1exception@std@@UAE@XZ +@ cdecl -i386 -norelay ??0__non_rtti_object@std@@QAE@ABV01@@Z(ptr) msvcrt.??0__non_rtti_object@@QAE@ABV0@@Z +@ cdecl -i386 -norelay ??0bad_cast@std@@QAE@ABV01@@Z(ptr) msvcrt.??0bad_cast@@QAE@ABV0@@Z +@ cdecl -i386 -norelay ??0bad_cast@std@@QAE@PBD@Z(ptr) msvcrt.??0bad_cast@@QAE@PBD@Z +@ cdecl -i386 -norelay ??0bad_typeid@std@@QAE@ABV01@@Z(ptr) msvcrt.??0bad_typeid@@QAE@ABV0@@Z +@ cdecl -i386 -norelay ??0bad_typeid@std@@QAE@PBD@Z(ptr) msvcrt.??0bad_typeid@@QAE@PBD@Z +@ cdecl -i386 -norelay ??0exception@std@@QAE@ABQBD@Z(ptr) msvcrt.??0exception@@QAE@ABQBD@Z +@ cdecl -i386 -norelay ??0exception@std@@QAE@ABQBDH@Z(ptr long) msvcrt.??0exception@@QAE@ABQBDH@Z +@ cdecl -i386 -norelay ??0exception@std@@QAE@ABV01@@Z(ptr) msvcrt.??0exception@@QAE@ABV0@@Z +@ cdecl -i386 -norelay ??0exception@std@@QAE@XZ() msvcrt.??0exception@@QAE@XZ +@ cdecl -i386 -norelay ??1__non_rtti_object@std@@UAE@XZ() msvcrt.??1__non_rtti_object@@UAE@XZ +@ cdecl -i386 -norelay ??1bad_cast@std@@UAE@XZ() msvcrt.??1bad_cast@@UAE@XZ +@ cdecl -i386 -norelay ??1bad_typeid@std@@UAE@XZ() msvcrt.??1bad_typeid@@UAE@XZ +@ cdecl -i386 -norelay ??1exception@std@@UAE@XZ() msvcrt.??1exception@@UAE@XZ @ cdecl -i386 -norelay ??1type_info@@UAE@XZ() msvcrt.??1type_info@@UAE@XZ @ cdecl ??2@YAPAXI@Z(long) msvcrt.??2@YAPAXI@Z -@ stub ??2@YAPAXIHPBDH@Z +@ cdecl ??2@YAPAXIHPBDH@Z(long long str long) msvcrt.??2@YAPAXIHPBDH@Z @ cdecl ??3@YAXPAX@Z(ptr) msvcrt.??3@YAXPAX@Z -@ stub ??4__non_rtti_object@std@@QAEAAV01@ABV01@@Z -@ stub ??4bad_cast@std@@QAEAAV01@ABV01@@Z -@ stub ??4bad_typeid@std@@QAEAAV01@ABV01@@Z -@ stub ??4exception@std@@QAEAAV01@ABV01@@Z -@ stub ??8type_info@@QBE_NABV0@@Z -@ stub ??9type_info@@QBE_NABV0@@Z -@ stub ??_7__non_rtti_object@std@@6B@ -@ stub ??_7bad_cast@std@@6B@ -@ stub ??_7bad_typeid@std@@6B@ +@ cdecl -i386 -norelay ??4__non_rtti_object@std@@QAEAAV01@ABV01@@Z(ptr) msvcrt.??4__non_rtti_object@@QAEAAV0@ABV0@@Z +@ cdecl -i386 -norelay ??4bad_cast@std@@QAEAAV01@ABV01@@Z(ptr) msvcrt.??4bad_cast@@QAEAAV0@ABV0@@Z +@ cdecl -i386 -norelay ??4bad_typeid@std@@QAEAAV01@ABV01@@Z(ptr) msvcrt.??4bad_typeid@@QAEAAV0@ABV0@@Z +@ cdecl -i386 -norelay ??4exception@std@@QAEAAV01@ABV01@@Z(ptr) msvcrt.??4exception@@QAEAAV0@ABV0@@Z +@ cdecl -i386 -norelay ??8type_info@@QBE_NABV0@@Z(ptr) msvcrt.??8type_info@@QBEHABV0@@Z +@ cdecl -i386 -norelay ??9type_info@@QBE_NABV0@@Z(ptr) msvcrt.??9type_info@@QBEHABV0@@Z +@ extern -i386 ??_7__non_rtti_object@std@@6B@ msvcrt.??_7__non_rtti_object@@6B@ +@ extern -i386 ??_7bad_cast@std@@6B@ msvcrt.??_7bad_cast@@6B@ +@ extern -i386 ??_7bad_typeid@std@@6B@ msvcrt.??_7bad_typeid@@6B@ @ extern -i386 ??_7exception@@6B@ msvcrt.??_7exception@@6B@ -@ stub ??_7exception@std@@6B@ -@ stub ??_Fbad_cast@std@@QAEXXZ -@ stub ??_Fbad_typeid@std@@QAEXXZ +@ extern -i386 ??_7exception@std@@6B@ msvcrt.??_7exception@@6B@ +@ cdecl -i386 -norelay ??_Fbad_cast@std@@QAEXXZ() msvcrt.??_Fbad_cast@@QAEXXZ +@ cdecl -i386 -norelay ??_Fbad_typeid@std@@QAEXXZ() msvcrt.??_Fbad_typeid@@QAEXXZ @ cdecl ??_U@YAPAXI@Z(long) msvcrt.??_U@YAPAXI@Z -@ stub ??_U@YAPAXIHPBDH@Z +@ cdecl ??_U@YAPAXIHPBDH@Z(long long str long) msvcrt.??_U@YAPAXIHPBDH@Z @ cdecl ??_V@YAXPAX@Z(ptr) msvcrt.??_V@YAXPAX@Z @ stub ?_Name_base@type_info@@CAPBDPBV1@PAU__type_info_node@@@Z @ stub ?_Name_base_internal@type_info@@CAPBDPBV1@PAU__type_info_node@@@Z @@ -70,7 +70,7 @@ @ cdecl ?terminate@@YAXXZ() msvcrt.?terminate@@YAXXZ @ cdecl ?unexpected@@YAXXZ() msvcrt.?unexpected@@YAXXZ @ stub ?vswprintf@@YAHPA_WIPB_WPAD@Z -@ stub ?what@exception@std@@UBEPBDXZ +@ cdecl -i386 -norelay ?what@exception@std@@UBEPBDXZ() msvcrt.?what@exception@@UBEPBDXZ @ stub @_calloc_crt@8 @ cdecl @_malloc_crt@4(long) msvcrt.malloc @ stub @_realloc_crt@8 diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index d1bf29cd89..5854663a8f 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -1,37 +1,37 @@ # MS VC++2008 runtime library -@ stub ??0__non_rtti_object@std@@QAE@ABV01@@Z -@ stub ??0bad_cast@std@@QAE@ABV01@@Z -@ stub ??0bad_cast@std@@QAE@PBD@Z -@ stub ??0bad_typeid@std@@QAE@ABV01@@Z -@ stub ??0bad_typeid@std@@QAE@PBD@Z -@ stub ??0exception@std@@QAE@ABQBD@Z -@ stub ??0exception@std@@QAE@ABQBDH@Z -@ stub ??0exception@std@@QAE@ABV01@@Z -@ stub ??0exception@std@@QAE@XZ -@ stub ??1__non_rtti_object@std@@UAE@XZ -@ stub ??1bad_cast@std@@UAE@XZ -@ stub ??1bad_typeid@std@@UAE@XZ -@ stub ??1exception@std@@UAE@XZ +@ cdecl -i386 -norelay ??0__non_rtti_object@std@@QAE@ABV01@@Z(ptr) msvcrt.??0__non_rtti_object@@QAE@ABV0@@Z +@ cdecl -i386 -norelay ??0bad_cast@std@@QAE@ABV01@@Z(ptr) msvcrt.??0bad_cast@@QAE@ABV0@@Z +@ cdecl -i386 -norelay ??0bad_cast@std@@QAE@PBD@Z(ptr) msvcrt.??0bad_cast@@QAE@PBD@Z +@ cdecl -i386 -norelay ??0bad_typeid@std@@QAE@ABV01@@Z(ptr) msvcrt.??0bad_typeid@@QAE@ABV0@@Z +@ cdecl -i386 -norelay ??0bad_typeid@std@@QAE@PBD@Z(ptr) msvcrt.??0bad_typeid@@QAE@PBD@Z +@ cdecl -i386 -norelay ??0exception@std@@QAE@ABQBD@Z(ptr) msvcrt.??0exception@@QAE@ABQBD@Z +@ cdecl -i386 -norelay ??0exception@std@@QAE@ABQBDH@Z(ptr long) msvcrt.??0exception@@QAE@ABQBDH@Z +@ cdecl -i386 -norelay ??0exception@std@@QAE@ABV01@@Z(ptr) msvcrt.??0exception@@QAE@ABV0@@Z +@ cdecl -i386 -norelay ??0exception@std@@QAE@XZ() msvcrt.??0exception@@QAE@XZ +@ cdecl -i386 -norelay ??1__non_rtti_object@std@@UAE@XZ() msvcrt.??1__non_rtti_object@@UAE@XZ +@ cdecl -i386 -norelay ??1bad_cast@std@@UAE@XZ() msvcrt.??1bad_cast@@UAE@XZ +@ cdecl -i386 -norelay ??1bad_typeid@std@@UAE@XZ() msvcrt.??1bad_typeid@@UAE@XZ +@ cdecl -i386 -norelay ??1exception@std@@UAE@XZ() msvcrt.??1exception@@UAE@XZ @ cdecl -i386 -norelay ??1type_info@@UAE@XZ() msvcrt.??1type_info@@UAE@XZ @ cdecl ??2@YAPAXI@Z(long) msvcrt.??2@YAPAXI@Z -@ stub ??2@YAPAXIHPBDH@Z +@ cdecl ??2@YAPAXIHPBDH@Z(long long str long) msvcrt.??2@YAPAXIHPBDH@Z @ cdecl ??3@YAXPAX@Z(ptr) msvcrt.??3@YAXPAX@Z -@ stub ??4__non_rtti_object@std@@QAEAAV01@ABV01@@Z -@ stub ??4bad_cast@std@@QAEAAV01@ABV01@@Z -@ stub ??4bad_typeid@std@@QAEAAV01@ABV01@@Z -@ stub ??4exception@std@@QAEAAV01@ABV01@@Z -@ stub ??8type_info@@QBE_NABV0@@Z -@ stub ??9type_info@@QBE_NABV0@@Z -@ stub ??_7__non_rtti_object@std@@6B@ -@ stub ??_7bad_cast@std@@6B@ -@ stub ??_7bad_typeid@std@@6B@ +@ cdecl -i386 -norelay ??4__non_rtti_object@std@@QAEAAV01@ABV01@@Z(ptr) msvcrt.??4__non_rtti_object@@QAEAAV0@ABV0@@Z +@ cdecl -i386 -norelay ??4bad_cast@std@@QAEAAV01@ABV01@@Z(ptr) msvcrt.??4bad_cast@@QAEAAV0@ABV0@@Z +@ cdecl -i386 -norelay ??4bad_typeid@std@@QAEAAV01@ABV01@@Z(ptr) msvcrt.??4bad_typeid@@QAEAAV0@ABV0@@Z +@ cdecl -i386 -norelay ??4exception@std@@QAEAAV01@ABV01@@Z(ptr) msvcrt.??4exception@@QAEAAV0@ABV0@@Z +@ cdecl -i386 -norelay ??8type_info@@QBE_NABV0@@Z(ptr) msvcrt.??8type_info@@QBEHABV0@@Z +@ cdecl -i386 -norelay ??9type_info@@QBE_NABV0@@Z(ptr) msvcrt.??9type_info@@QBEHABV0@@Z +@ extern -i386 ??_7__non_rtti_object@std@@6B@ msvcrt.??_7__non_rtti_object@@6B@ +@ extern -i386 ??_7bad_cast@std@@6B@ msvcrt.??_7bad_cast@@6B@ +@ extern -i386 ??_7bad_typeid@std@@6B@ msvcrt.??_7bad_typeid@@6B@ @ extern -i386 ??_7exception@@6B@ msvcrt.??_7exception@@6B@ -@ stub ??_7exception@std@@6B@ -@ stub ??_Fbad_cast@std@@QAEXXZ -@ stub ??_Fbad_typeid@std@@QAEXXZ +@ extern -i386 ??_7exception@std@@6B@ msvcrt.??_7exception@@6B@ +@ cdecl -i386 -norelay ??_Fbad_cast@std@@QAEXXZ() msvcrt.??_Fbad_cast@@QAEXXZ +@ cdecl -i386 -norelay ??_Fbad_typeid@std@@QAEXXZ() msvcrt.??_Fbad_typeid@@QAEXXZ @ cdecl ??_U@YAPAXI@Z(long) msvcrt.??_U@YAPAXI@Z -@ stub ??_U@YAPAXIHPBDH@Z +@ cdecl ??_U@YAPAXIHPBDH@Z(long long str long) msvcrt.??_U@YAPAXIHPBDH@Z @ cdecl ??_V@YAXPAX@Z(ptr) msvcrt.??_V@YAXPAX@Z @ stub ?_Name_base@type_info@@CAPBDPBV1@PAU__type_info_node@@@Z @ stub ?_Name_base_internal@type_info@@CAPBDPBV1@PAU__type_info_node@@@Z @@ -70,7 +70,7 @@ @ cdecl ?terminate@@YAXXZ() msvcrt.?terminate@@YAXXZ @ cdecl ?unexpected@@YAXXZ() msvcrt.?unexpected@@YAXXZ @ stub ?vswprintf@@YAHPA_WIPB_WPAD@Z -@ stub ?what@exception@std@@UBEPBDXZ +@ cdecl -i386 -norelay ?what@exception@std@@UBEPBDXZ() msvcrt.?what@exception@@UBEPBDXZ @ cdecl $I10_OUTPUT() msvcrt.$I10_OUTPUT @ cdecl -arch=i386 _CIacos() msvcrt._CIacos @ cdecl -arch=i386 _CIasin() msvcrt._CIasin diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c index 2ac9b8f11d..f6f3906c3d 100644 --- a/dlls/msvcrt/cpp.c +++ b/dlls/msvcrt/cpp.c @@ -159,6 +159,19 @@ exception * __stdcall MSVCRT_exception_ctor(exception * _this, const char ** nam return _this; } +/****************************************************************** + * ??0exception@@QAE@ABQBDH@Z (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER(MSVCRT_exception_ctor_noalloc,12) +exception * __stdcall MSVCRT_exception_ctor_noalloc(exception * _this, char ** name, int noalloc) +{ + TRACE("(%p,%s)\n", _this, *name); + _this->vtable = &MSVCRT_exception_vtable; + _this->name = *name; + _this->do_free = FALSE; + return _this; +} + /****************************************************************** * ??0exception@@QAE@ABV0@@Z (MSVCRT.@) */ @@ -288,6 +301,15 @@ bad_typeid * __stdcall MSVCRT_bad_typeid_ctor(bad_typeid * _this, const char * n return _this; } +/****************************************************************** + * ??_Fbad_typeid@@QAEXXZ (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER(MSVCRT_bad_typeid_default_ctor,4) +bad_typeid * __stdcall MSVCRT_bad_typeid_default_ctor(bad_typeid * _this) +{ + return MSVCRT_bad_typeid_ctor( _this, "bad typeid" ); +} + /****************************************************************** * ??1bad_typeid@@UAE@XZ (MSVCRT.@) */ @@ -428,6 +450,7 @@ void * __stdcall MSVCRT___non_rtti_object_scalar_dtor(__non_rtti_object * _this, } /****************************************************************** + * ??0bad_cast@@AAE@PBQBD@Z (MSVCRT.@) * ??0bad_cast@@QAE@ABQBD@Z (MSVCRT.@) */ DEFINE_THISCALL_WRAPPER(MSVCRT_bad_cast_ctor,8) @@ -451,6 +474,27 @@ bad_cast * __stdcall MSVCRT_bad_cast_copy_ctor(bad_cast * _this, const bad_cast return _this; } +/****************************************************************** + * ??0bad_cast@@QAE@PBD@Z (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER(MSVCRT_bad_cast_ctor_charptr,8) +bad_cast * __stdcall MSVCRT_bad_cast_ctor_charptr(bad_cast * _this, const char * name) +{ + TRACE("(%p %s)\n", _this, name); + EXCEPTION_ctor(_this, &name); + _this->vtable = &MSVCRT_bad_cast_vtable; + return _this; +} + +/****************************************************************** + * ??_Fbad_cast@@QAEXXZ (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER(MSVCRT_bad_cast_default_ctor,4) +bad_cast * __stdcall MSVCRT_bad_cast_default_ctor(bad_cast * _this) +{ + return MSVCRT_bad_cast_ctor_charptr( _this, "bad cast" ); +} + /****************************************************************** * ??1bad_cast@@UAE@XZ (MSVCRT.@) */ diff --git a/dlls/msvcrt/heap.c b/dlls/msvcrt/heap.c index 7adaf90880..7fd5d3b426 100644 --- a/dlls/msvcrt/heap.c +++ b/dlls/msvcrt/heap.c @@ -64,6 +64,16 @@ void* CDECL MSVCRT_operator_new(MSVCRT_size_t size) return retval; } + +/********************************************************************* + * ??2@YAPAXIHPBDH@Z (MSVCRT.@) + */ +void* CDECL MSVCRT_operator_new_dbg(MSVCRT_size_t size, int type, const char *file, int line) +{ + return MSVCRT_operator_new( size ); +} + + /********************************************************************* * ??3@YAXPAX@Z (MSVCRT.@) */ diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 4bb1992005..c90110f7bb 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -3,14 +3,14 @@ @ cdecl $I10_OUTPUT() MSVCRT_I10_OUTPUT @ cdecl -i386 -norelay ??0__non_rtti_object@@QAE@ABV0@@Z(ptr) __thiscall_MSVCRT___non_rtti_object_copy_ctor @ cdecl -i386 -norelay ??0__non_rtti_object@@QAE@PBD@Z(ptr) __thiscall_MSVCRT___non_rtti_object_ctor -# stub ??0bad_cast@@AAE@PBQBD@Z +@ cdecl -i386 -norelay ??0bad_cast@@AAE@PBQBD@Z(ptr) __thiscall_MSVCRT_bad_cast_ctor @ cdecl -i386 -norelay ??0bad_cast@@QAE@ABQBD@Z(ptr) __thiscall_MSVCRT_bad_cast_ctor @ cdecl -i386 -norelay ??0bad_cast@@QAE@ABV0@@Z(ptr) __thiscall_MSVCRT_bad_cast_copy_ctor -# stub ??0bad_cast@@QAE@PBD@Z +@ cdecl -i386 -norelay ??0bad_cast@@QAE@PBD@Z(ptr) __thiscall_MSVCRT_bad_cast_ctor_charptr @ cdecl -i386 -norelay ??0bad_typeid@@QAE@ABV0@@Z(ptr) __thiscall_MSVCRT_bad_typeid_copy_ctor @ cdecl -i386 -norelay ??0bad_typeid@@QAE@PBD@Z(ptr) __thiscall_MSVCRT_bad_typeid_ctor @ cdecl -i386 -norelay ??0exception@@QAE@ABQBD@Z(ptr) __thiscall_MSVCRT_exception_ctor -# stub ??0exception@@QAE@ABQBDH@Z +@ cdecl -i386 -norelay ??0exception@@QAE@ABQBDH@Z(ptr long) __thiscall_MSVCRT_exception_ctor_noalloc @ cdecl -i386 -norelay ??0exception@@QAE@ABV0@@Z(ptr) __thiscall_MSVCRT_exception_copy_ctor @ cdecl -i386 -norelay ??0exception@@QAE@XZ() __thiscall_MSVCRT_exception_default_ctor @ cdecl -i386 -norelay ??1__non_rtti_object@@UAE@XZ() __thiscall_MSVCRT___non_rtti_object_dtor @@ -19,11 +19,8 @@ @ cdecl -i386 -norelay ??1exception@@UAE@XZ() __thiscall_MSVCRT_exception_dtor @ cdecl -i386 -norelay ??1type_info@@UAE@XZ() __thiscall_MSVCRT_type_info_dtor @ cdecl ??2@YAPAXI@Z(long) MSVCRT_operator_new -# stub ??2@YAPAXIHPBDH@Z -@ cdecl ??_U@YAPAXI@Z(long) MSVCRT_operator_new -# stub ??_U@YAPAXIHPBDH@Z +@ cdecl ??2@YAPAXIHPBDH@Z(long long str long) MSVCRT_operator_new_dbg @ cdecl ??3@YAXPAX@Z(ptr) MSVCRT_operator_delete -@ cdecl ??_V@YAXPAX@Z(ptr) MSVCRT_operator_delete @ cdecl -i386 -norelay ??4__non_rtti_object@@QAEAAV0@ABV0@@Z(ptr) __thiscall_MSVCRT___non_rtti_object_opequals @ cdecl -i386 -norelay ??4bad_cast@@QAEAAV0@ABV0@@Z(ptr) __thiscall_MSVCRT_bad_cast_opequals @ cdecl -i386 -norelay ??4bad_typeid@@QAEAAV0@ABV0@@Z(ptr) __thiscall_MSVCRT_bad_typeid_opequals @@ -38,12 +35,15 @@ @ cdecl -i386 -norelay ??_Ebad_cast@@UAEPAXI@Z(long) __thiscall_MSVCRT_bad_cast_vector_dtor @ cdecl -i386 -norelay ??_Ebad_typeid@@UAEPAXI@Z(long) __thiscall_MSVCRT_bad_typeid_vector_dtor @ cdecl -i386 -norelay ??_Eexception@@UAEPAXI@Z(long) __thiscall_MSVCRT_exception_vector_dtor -# stub ??_Fbad_cast@@QAEXXZ -# stub ??_Fbad_typeid@@QAEXXZ +@ cdecl -i386 -norelay ??_Fbad_cast@@QAEXXZ() __thiscall_MSVCRT_bad_cast_default_ctor +@ cdecl -i386 -norelay ??_Fbad_typeid@@QAEXXZ() __thiscall_MSVCRT_bad_typeid_default_ctor @ cdecl -i386 -norelay ??_G__non_rtti_object@@UAEPAXI@Z(long) __thiscall_MSVCRT___non_rtti_object_scalar_dtor @ cdecl -i386 -norelay ??_Gbad_cast@@UAEPAXI@Z(long) __thiscall_MSVCRT_bad_cast_scalar_dtor @ cdecl -i386 -norelay ??_Gbad_typeid@@UAEPAXI@Z(long) __thiscall_MSVCRT_bad_typeid_scalar_dtor @ cdecl -i386 -norelay ??_Gexception@@UAEPAXI@Z(long) __thiscall_MSVCRT_exception_scalar_dtor +@ cdecl ??_U@YAPAXI@Z(long) MSVCRT_operator_new +@ cdecl ??_U@YAPAXIHPBDH@Z(long long str long) MSVCRT_operator_new_dbg +@ cdecl ??_V@YAXPAX@Z(ptr) MSVCRT_operator_delete @ cdecl ?_query_new_handler@@YAP6AHI@ZXZ() MSVCRT__query_new_handler @ cdecl ?_query_new_mode@@YAHXZ() MSVCRT__query_new_mode @ cdecl ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z(ptr) MSVCRT__set_new_handler -- 2.32.0.93.g670b81a890