Skip to content

Commit fb6e682

Browse files
committed
Fix generated 'ActivateInstance<I>' method
1 parent 6bf1908 commit fb6e682

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cswinrt/code_writers.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -9971,13 +9971,13 @@ public static IntPtr Make()
99719971
static readonly % _factory = new %();
99729972
public static ObjectReference<I> ActivateInstance<
99739973
#if NET5_0_OR_GREATER
9974-
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.NonPublicConstructors | DynamicallyAccessedMemberTypes.PublicFields)]
9974+
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields)]
99759975
#endif
99769976
I>()
99779977
{
99789978
IntPtr instance = _factory.ActivateInstance();
99799979

9980-
return ObjectReference<IInspectable.Vftbl>.Attach(ref instance).As<I>();
9980+
return ObjectReference<IInspectable.Vftbl>.Attach(ref instance, global::WinRT.Interop.IID.IID_IInspectable).As<I>();
99819981
}
99829982

99839983
public IntPtr ActivateInstance()

0 commit comments

Comments
 (0)