Skip to content

Commit 1f9764f

Browse files
Use strategy in StrategyBasedComWrappers.ComputeVtables (#92085)
Co-authored-by: Jackson Schuster <[email protected]>
1 parent e1ca02f commit 1f9764f

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)