Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new proposed API to Ancillary.Interop #81063

Merged
merged 26 commits into from
Feb 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
51539a7
Update API's and make minimum changes to build
jtschuster Jan 23, 2023
3113a20
Update src/libraries/System.Runtime.InteropServices/tests/ComInterfac…
jtschuster Jan 24, 2023
0f061fd
PR feedback
jtschuster Jan 24, 2023
e51c0d8
Merge branch 'vtableGenUpdate' of https://github.com/jtschuster/runti…
jtschuster Jan 24, 2023
4b936c7
PR Feedback:
jtschuster Jan 25, 2023
d2cecc6
Update API's and make minimum changes to build
jtschuster Jan 23, 2023
1403ae8
PR feedback
jtschuster Jan 24, 2023
b4205b4
Update src/libraries/System.Runtime.InteropServices/tests/ComInterfac…
jtschuster Jan 24, 2023
046b9d1
PR Feedback:
jtschuster Jan 25, 2023
65012f8
Passing tests - not cleaned; do not review
jtschuster Jan 27, 2023
2cddf1c
Merge branch 'vtableGenUpdate' of https://github.com/jtschuster/runti…
jtschuster Jan 31, 2023
53baeeb
Merge branch 'main' of https://github.com/dotnet/runtime into vtableG…
jtschuster Jan 31, 2023
0d15662
Make unwrapperType optional
jtschuster Jan 31, 2023
f4afef5
Remove unused code, clean up comments, format
jtschuster Jan 31, 2023
1599274
PR Feedback
jtschuster Feb 1, 2023
3bb44a1
Pass unwrapper type through NativeThisInfo
jtschuster Feb 2, 2023
8a4d125
Update src/libraries/System.Runtime.InteropServices/gen/Microsoft.Int…
jtschuster Feb 2, 2023
6d0198a
Update src/libraries/System.Runtime.InteropServices/gen/ComInterfaceG…
jtschuster Feb 2, 2023
e5b10e2
Update src/libraries/System.Runtime.InteropServices/gen/ComInterfaceG…
jtschuster Feb 14, 2023
e4529db
Use traditional namespace blocks
jtschuster Feb 14, 2023
0356350
Add InternalsVisibleTo to Ancillary.Interop for VTableGenerator tests
jtschuster Feb 14, 2023
9be677a
Make UnmanagedObjectUnwrapper internal
jtschuster Feb 14, 2023
b643733
Make types public instead of using InternalsVisibleTo
jtschuster Feb 14, 2023
c4f4cc0
Merge branch 'main' of https://github.com/dotnet/runtime into vtableG…
jtschuster Feb 15, 2023
d63a2da
Build xlf, add WrapperType to context
jtschuster Feb 16, 2023
8cd216a
Update xlf
jtschuster Feb 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
PR feedback
- Add license banner to new files
- Change count to 0 for null VTables
  • Loading branch information
jtschuster committed Jan 31, 2023
commit 1403ae88e1bb02dff6af194ff4bb5d64e193d91d
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

// Types for the COM Source Generator that define the basic vtable interactions and that we would need in the COM source generator in one form or another.
namespace System.Runtime.InteropServices.Marshalling;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

// Types for the COM source generator that implement the COM-specific interactions.
// All of these APIs need to be exposed to implement the COM source generator in one form or another.

Expand Down Expand Up @@ -322,4 +325,4 @@ public ComObject GetOrCreateUniqueObjectForComInstance(nint comInstance, CreateO
}
return (ComObject)GetOrCreateObjectForComInstance(comInstance, flags | CreateObjectFlags.UniqueInstance);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

// Implementations of the COM strategy interfaces defined in Com.cs that we would want to ship (can be internal only if we don't want to allow users to provide their own implementations in v1).
using System.Collections.Generic;
using System.Runtime.CompilerServices;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

// Types that are only needed for the VTable source generator or to provide abstract concepts that the COM generator would use under the hood.
jtschuster marked this conversation as resolved.
Show resolved Hide resolved
// These are types that we can exclude from the API proposals and either inline into the generated code, provide as file-scoped types, or not provide publicly (indicated by comments on each type).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void Bar() {}

public unsafe partial class MyComWrappers : GeneratedComWrappersBase
{
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 1; return null;}
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 0; return null;}
}

""";
Expand All @@ -57,7 +57,7 @@ void Bar() {}

public unsafe partial class MyComWrappers : GeneratedComWrappersBase
{
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 1; return null;}
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 0; return null;}
}

""";
Expand All @@ -79,7 +79,7 @@ void Bar() {}

public unsafe partial class MyComWrappers : GeneratedComWrappersBase
{
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 1; return null;}
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 0; return null;}
}

""";
Expand All @@ -100,7 +100,7 @@ void Bar() {}

public unsafe partial class MyComWrappers : GeneratedComWrappersBase
{
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 1; return null;}
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 0; return null;}
}

""";
Expand All @@ -121,7 +121,7 @@ void Bar() {}

public unsafe partial class MyComWrappers : GeneratedComWrappersBase
{
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 1; return null;}
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 0; return null;}
}

""";
Expand All @@ -142,7 +142,7 @@ void Bar() {}

public unsafe partial class MyComWrappers : GeneratedComWrappersBase
{
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 1; return null;}
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 0; return null;}
}

""";
Expand All @@ -163,7 +163,7 @@ void Bar() {}

public unsafe partial class MyComWrappers : GeneratedComWrappersBase
{
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 1; return null;}
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 0; return null;}
}

""";
Expand All @@ -184,7 +184,7 @@ void Bar() {}

public unsafe partial class MyComWrappers : GeneratedComWrappersBase
{
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 1; return null;}
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 0; return null;}
}

""";
Expand All @@ -209,7 +209,7 @@ void Bar() {}

public unsafe partial class MyComWrappers : GeneratedComWrappersBase
{
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 1; return null;}
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 0; return null;}
}

""";
Expand All @@ -235,7 +235,7 @@ void Bar() {}

public unsafe partial class MyComWrappers : GeneratedComWrappersBase
{
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 1; return null;}
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 0; return null;}
}

""";
Expand All @@ -257,7 +257,7 @@ void Bar() {}

public unsafe partial class MyComWrappers : GeneratedComWrappersBase
{
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 1; return null;}
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 0; return null;}
}

""";
Expand All @@ -279,7 +279,7 @@ void Bar() {}

public unsafe partial class MyComWrappers : GeneratedComWrappersBase
{
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 1; return null;}
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 0; return null;}
}

""";
Expand All @@ -305,7 +305,7 @@ void Bar() {}

public unsafe partial class MyComWrappers : GeneratedComWrappersBase
{
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 1; return null;}
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 0; return null;}
}

""";
Expand All @@ -331,7 +331,7 @@ void Bar() {}

public unsafe partial class MyComWrappers : GeneratedComWrappersBase
{
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 1; return null;}
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 0; return null;}
}

""";
Expand All @@ -357,7 +357,7 @@ void Bar() {}

public unsafe partial class MyComWrappers : GeneratedComWrappersBase
{
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 1; return null;}
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 0; return null;}
}

""";
Expand All @@ -383,7 +383,7 @@ void Bar() {}

public unsafe partial class MyComWrappers : GeneratedComWrappersBase
{
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 1; return null;}
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 0; return null;}
}

""";
Expand All @@ -409,7 +409,7 @@ void Bar() {}

public unsafe partial class MyComWrappers : GeneratedComWrappersBase
{
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 1; return null;}
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 0; return null;}
}

""";
Expand Down Expand Up @@ -441,7 +441,7 @@ partial interface IFoo { }

public unsafe partial class MyComWrappers : GeneratedComWrappersBase
{
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 1; return null;}
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 0; return null;}
}

""";
Expand All @@ -465,7 +465,7 @@ partial interface IFoo { }

public unsafe partial class MyComWrappers : GeneratedComWrappersBase
{
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 1; return null;}
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 0; return null;}
}

""";
Expand All @@ -489,7 +489,7 @@ partial interface IFoo { }

public unsafe partial class MyComWrappers : GeneratedComWrappersBase
{
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 1; return null;}
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 0; return null;}
}

""";
Expand Down Expand Up @@ -517,7 +517,7 @@ partial interface IFoo { }

public unsafe partial class MyComWrappers : GeneratedComWrappersBase
{
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 1; return null;}
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 0; return null;}
}

""";
Expand Down Expand Up @@ -545,7 +545,7 @@ partial interface IFoo { }

public unsafe partial class MyComWrappers : GeneratedComWrappersBase
{
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 1; return null;}
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 0; return null;}
}

""";
Expand Down Expand Up @@ -573,7 +573,7 @@ partial interface IFoo { }

public unsafe partial class MyComWrappers : GeneratedComWrappersBase
{
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 1; return null;}
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 0; return null;}
}

""";
Expand Down Expand Up @@ -601,7 +601,7 @@ partial interface IFoo { }

public unsafe partial class MyComWrappers : GeneratedComWrappersBase
{
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 1; return null;}
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 0; return null;}
}

""";
Expand Down Expand Up @@ -629,7 +629,7 @@ partial interface IFoo { }

public unsafe partial class MyComWrappers : GeneratedComWrappersBase
{
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 1; return null;}
protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) {count = 0; return null;}
}

""";
Expand Down