File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11
2- WINRT_EXPORT namespace winrt ::impl
2+ namespace winrt ::impl
33{
44 inline std::int32_t make_marshaler (unknown_abi* outer, void ** result) noexcept
55 {
Original file line number Diff line number Diff line change 1+ #include " pch.h"
2+ #include < objidl.h>
3+
4+ import std;
5+ import winrt.Windows.Foundation.Collections;
6+
7+ using namespace winrt ;
8+
9+ struct S : implements<S, Windows::Foundation::IStringable>
10+ {
11+ hstring ToString ()
12+ {
13+ return L" S" ;
14+ }
15+ };
16+
17+ // When winrt::impl::get_marshaler was being exported, an MSVC bug caused the marshaler
18+ // object to have a null vtable, which caused a crash when calling any method on the marshaler.
19+ // This test ensures that the marshaler vtable is properly initialized.
20+ TEST_CASE (" IMarshal" )
21+ {
22+ auto s = make<S>();
23+ auto marshal = s.as <IMarshal>();
24+ }
Original file line number Diff line number Diff line change 2525 <Configuration >Release</Configuration >
2626 <Platform >x64</Platform >
2727 </ProjectConfiguration >
28- </ItemGroup > <PropertyGroup Label =" Globals" >
28+ </ItemGroup >
29+ <PropertyGroup Label =" Globals" >
2930 <VCProjectVersion >16.0</VCProjectVersion >
3031 <ProjectGuid >{B8E3A5CE-4E91-4F27-9B02-E0CAF7E10D72}</ProjectGuid >
3132 <RootNamespace >test_cpp20_module</RootNamespace >
9192 <ClInclude Include =" pch.h" />
9293 </ItemGroup >
9394 <ItemGroup >
95+ <ClCompile Include =" marshal.cpp" />
9496 <ClCompile Include =" pch.cpp" >
9597 <PrecompiledHeader >Create</PrecompiledHeader >
9698 </ClCompile >
You can’t perform that action at this time.
0 commit comments