Skip to content

Commit c38ca78

Browse files
github-actions[bot]jkoritzinskyjtschuster
authored
[release/8.0] Use strategy in StrategyBasedComWrappers.ComputeVtables (#92250)
* Use strategy in StrategyBasedComWrappers.ComputeVtables We didn't actually use the strategy object here, so users like WinForms can't actually use it. * Update src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/Marshalling/StrategyBasedComWrappers.cs Co-authored-by: Jackson Schuster <[email protected]> --------- Co-authored-by: Jeremy Koritzinsky <[email protected]> Co-authored-by: Jackson Schuster <[email protected]>
1 parent f678a18 commit c38ca78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/Marshalling/StrategyBasedComWrappers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ static IIUnknownInterfaceDetailsStrategy GetInteropStrategy()
7676
/// <inheritdoc cref="ComWrappers.ComputeVtables" />
7777
protected sealed override unsafe ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count)
7878
{
79-
if (obj.GetType().GetCustomAttribute(typeof(ComExposedClassAttribute<>)) is IComExposedDetails details)
79+
if (GetOrCreateInterfaceDetailsStrategy().GetComExposedTypeDetails(obj.GetType().TypeHandle) is { } details)
8080
{
8181
return details.GetComInterfaceEntries(out count);
8282
}

0 commit comments

Comments
 (0)