From 4ec5601f6f28dee330a0545fa6c11df514dae666 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Fri, 1 Dec 2023 13:27:58 +0100 Subject: [PATCH] Use hardcoded IIDs for well known IReferenceArray-s --- src/WinRT.Runtime/ComWrappersSupport.cs | 34 ++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/WinRT.Runtime/ComWrappersSupport.cs b/src/WinRT.Runtime/ComWrappersSupport.cs index 1a080d12f..7778e6603 100644 --- a/src/WinRT.Runtime/ComWrappersSupport.cs +++ b/src/WinRT.Runtime/ComWrappersSupport.cs @@ -776,7 +776,7 @@ private static ComInterfaceEntry ProvideIReferenceArray(Type arrayType) { return new ComInterfaceEntry { - IID = global::WinRT.GuidGenerator.GetIID(typeof(IReferenceArray)), + IID = InterfaceIIDs.IReferenceArrayOfInt32_IID, Vtable = BoxedArrayIReferenceArrayImpl.AbiToProjectionVftablePtr }; } @@ -784,7 +784,7 @@ private static ComInterfaceEntry ProvideIReferenceArray(Type arrayType) { return new ComInterfaceEntry { - IID = global::WinRT.GuidGenerator.GetIID(typeof(IReferenceArray)), + IID = InterfaceIIDs.IReferenceArrayOfString_IID, Vtable = BoxedArrayIReferenceArrayImpl.AbiToProjectionVftablePtr }; } @@ -792,7 +792,7 @@ private static ComInterfaceEntry ProvideIReferenceArray(Type arrayType) { return new ComInterfaceEntry { - IID = global::WinRT.GuidGenerator.GetIID(typeof(IReferenceArray)), + IID = InterfaceIIDs.IReferenceArrayOfByte_IID, Vtable = BoxedArrayIReferenceArrayImpl.AbiToProjectionVftablePtr }; } @@ -800,7 +800,7 @@ private static ComInterfaceEntry ProvideIReferenceArray(Type arrayType) { return new ComInterfaceEntry { - IID = global::WinRT.GuidGenerator.GetIID(typeof(IReferenceArray)), + IID = InterfaceIIDs.IReferenceArrayOfInt16_IID, Vtable = BoxedArrayIReferenceArrayImpl.AbiToProjectionVftablePtr }; } @@ -808,7 +808,7 @@ private static ComInterfaceEntry ProvideIReferenceArray(Type arrayType) { return new ComInterfaceEntry { - IID = global::WinRT.GuidGenerator.GetIID(typeof(IReferenceArray)), + IID = InterfaceIIDs.IReferenceArrayOfUInt16_IID, Vtable = BoxedArrayIReferenceArrayImpl.AbiToProjectionVftablePtr }; } @@ -816,7 +816,7 @@ private static ComInterfaceEntry ProvideIReferenceArray(Type arrayType) { return new ComInterfaceEntry { - IID = global::WinRT.GuidGenerator.GetIID(typeof(IReferenceArray)), + IID = InterfaceIIDs.IReferenceArrayOfUInt32_IID, Vtable = BoxedArrayIReferenceArrayImpl.AbiToProjectionVftablePtr }; } @@ -824,7 +824,7 @@ private static ComInterfaceEntry ProvideIReferenceArray(Type arrayType) { return new ComInterfaceEntry { - IID = global::WinRT.GuidGenerator.GetIID(typeof(IReferenceArray)), + IID = InterfaceIIDs.IReferenceArrayOfInt64_IID, Vtable = BoxedArrayIReferenceArrayImpl.AbiToProjectionVftablePtr }; } @@ -832,7 +832,7 @@ private static ComInterfaceEntry ProvideIReferenceArray(Type arrayType) { return new ComInterfaceEntry { - IID = global::WinRT.GuidGenerator.GetIID(typeof(IReferenceArray)), + IID = InterfaceIIDs.IReferenceArrayOfUInt64_IID, Vtable = BoxedArrayIReferenceArrayImpl.AbiToProjectionVftablePtr }; } @@ -840,7 +840,7 @@ private static ComInterfaceEntry ProvideIReferenceArray(Type arrayType) { return new ComInterfaceEntry { - IID = global::WinRT.GuidGenerator.GetIID(typeof(IReferenceArray)), + IID = InterfaceIIDs.IReferenceArrayOfSingle_IID, Vtable = BoxedArrayIReferenceArrayImpl.AbiToProjectionVftablePtr }; } @@ -848,7 +848,7 @@ private static ComInterfaceEntry ProvideIReferenceArray(Type arrayType) { return new ComInterfaceEntry { - IID = global::WinRT.GuidGenerator.GetIID(typeof(IReferenceArray)), + IID = InterfaceIIDs.IReferenceArrayOfDouble_IID, Vtable = BoxedArrayIReferenceArrayImpl.AbiToProjectionVftablePtr }; } @@ -856,7 +856,7 @@ private static ComInterfaceEntry ProvideIReferenceArray(Type arrayType) { return new ComInterfaceEntry { - IID = global::WinRT.GuidGenerator.GetIID(typeof(IReferenceArray)), + IID = InterfaceIIDs.IReferenceArrayOfChar_IID, Vtable = BoxedArrayIReferenceArrayImpl.AbiToProjectionVftablePtr }; } @@ -864,7 +864,7 @@ private static ComInterfaceEntry ProvideIReferenceArray(Type arrayType) { return new ComInterfaceEntry { - IID = global::WinRT.GuidGenerator.GetIID(typeof(IReferenceArray)), + IID = InterfaceIIDs.IReferenceArrayOfBoolean_IID, Vtable = BoxedArrayIReferenceArrayImpl.AbiToProjectionVftablePtr }; } @@ -872,7 +872,7 @@ private static ComInterfaceEntry ProvideIReferenceArray(Type arrayType) { return new ComInterfaceEntry { - IID = global::WinRT.GuidGenerator.GetIID(typeof(IReferenceArray)), + IID = InterfaceIIDs.IReferenceArrayOfGuid_IID, Vtable = BoxedArrayIReferenceArrayImpl.AbiToProjectionVftablePtr }; } @@ -880,7 +880,7 @@ private static ComInterfaceEntry ProvideIReferenceArray(Type arrayType) { return new ComInterfaceEntry { - IID = global::WinRT.GuidGenerator.GetIID(typeof(IReferenceArray)), + IID = InterfaceIIDs.IReferenceArrayOfDateTimeOffset_IID, Vtable = BoxedArrayIReferenceArrayImpl.AbiToProjectionVftablePtr }; } @@ -888,7 +888,7 @@ private static ComInterfaceEntry ProvideIReferenceArray(Type arrayType) { return new ComInterfaceEntry { - IID = global::WinRT.GuidGenerator.GetIID(typeof(IReferenceArray)), + IID = InterfaceIIDs.IReferenceArrayOfTimeSpan_IID, Vtable = BoxedArrayIReferenceArrayImpl.AbiToProjectionVftablePtr }; } @@ -896,7 +896,7 @@ private static ComInterfaceEntry ProvideIReferenceArray(Type arrayType) { return new ComInterfaceEntry { - IID = global::WinRT.GuidGenerator.GetIID(typeof(IReferenceArray)), + IID = InterfaceIIDs.IReferenceArrayOfObject_IID, Vtable = BoxedArrayIReferenceArrayImpl.AbiToProjectionVftablePtr }; } @@ -904,7 +904,7 @@ private static ComInterfaceEntry ProvideIReferenceArray(Type arrayType) { return new ComInterfaceEntry { - IID = global::WinRT.GuidGenerator.GetIID(typeof(IReferenceArray)), + IID = InterfaceIIDs.IReferenceArrayOfType_IID, Vtable = BoxedArrayIReferenceArrayImpl.AbiToProjectionVftablePtr }; }