@@ -471,7 +471,7 @@ WINRT_EXPORT namespace winrt::impl
471471 winrt::hresult winrt_cast_result_code;
472472 auto const winrt_casted_result = try_as_with_reason<Base, Derive const *>(d, winrt_cast_result_code);
473473 check_hresult (winrt_cast_result_code);
474- auto const winrt_abi_type = *( abi_t <Base>**)& winrt_casted_result;
474+ auto const winrt_abi_type = *abi_t_abi_cast ( static_cast <Base const &>( winrt_casted_result)) ;
475475 (winrt_abi_type->*mptr)(std::forward<Args>(args)...);
476476 }
477477 else
@@ -489,7 +489,7 @@ WINRT_EXPORT namespace winrt::impl
489489 winrt::hresult winrt_cast_result_code;
490490 auto const winrt_casted_result = try_as_with_reason<Base, Derive const *>(d, winrt_cast_result_code);
491491 check_hresult (winrt_cast_result_code);
492- auto const winrt_abi_type = *( abi_t <Base>**)& winrt_casted_result;
492+ auto const winrt_abi_type = *abi_t_abi_cast ( static_cast <Base const &>( winrt_casted_result)) ;
493493 WINRT_VERIFY_ (0 , (winrt_abi_type->*mptr)(std::forward<Args>(args)...));
494494 }
495495 else
@@ -507,7 +507,7 @@ WINRT_EXPORT namespace winrt::impl
507507 winrt::hresult winrt_cast_result_code;
508508 auto const winrt_casted_result = try_as_with_reason<Base, Derive const *>(d, winrt_cast_result_code);
509509 check_hresult (winrt_cast_result_code);
510- auto const winrt_abi_type = *( abi_t <Base>**)& winrt_casted_result;
510+ auto const winrt_abi_type = *abi_t_abi_cast ( static_cast <Base const &>( winrt_casted_result)) ;
511511 check_hresult ((winrt_abi_type->*mptr)(std::forward<Args>(args)...));
512512 }
513513 else
0 commit comments