From 9083a3b3365a7c6220a1aabd7b7a003bcf90a144 Mon Sep 17 00:00:00 2001 From: Aaron Robinson Date: Tue, 26 Mar 2024 09:23:04 -0700 Subject: [PATCH] The layout of the ITypeLib2 interface is incorrect. (#100255) Since build-in COM marshalling relies on the declaration order to build the RCW vtable, this is and has almost always resulted in an A/V or undefined behavior. --- .../src/System/Runtime/InteropServices/ComTypes/ITypeLib2.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/ITypeLib2.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/ITypeLib2.cs index da3dd8411a50a..0253739e8da80 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/ITypeLib2.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/ITypeLib2.cs @@ -25,9 +25,9 @@ public interface ITypeLib2 : ITypeLib [PreserveSig] new void ReleaseTLibAttr(IntPtr pTLibAttr); void GetCustData(ref Guid guid, out object pVarVal); + void GetLibStatistics(IntPtr pcUniqueNames, out int pcchUniqueNames); [LCIDConversion(1)] void GetDocumentation2(int index, out string pbstrHelpString, out int pdwHelpStringContext, out string pbstrHelpStringDll); - void GetLibStatistics(IntPtr pcUniqueNames, out int pcchUniqueNames); void GetAllCustData(IntPtr pCustData); } }