From: Pent Ploompuu Date: Mon, 31 Dec 2018 05:43:09 +0000 (+0200) Subject: Remove parsing from GUID constants (dotnet/coreclr#21717) X-Git-Tag: submit/tizen/20210909.063632~11030^2~2976 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6a9b7880922609f307545e2e6eb6df1dc48dbe44;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Remove parsing from GUID constants (dotnet/coreclr#21717) Commit migrated from https://github.com/dotnet/coreclr/commit/bac3ac897c0bfe943ca27fd8ca9188d1c74d1643 --- diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsSink.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsSink.cs index 0ddde5d..9281d24 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsSink.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsSink.cs @@ -122,8 +122,6 @@ namespace System.Runtime.InteropServices #endregion - private static Guid IID_IManagedObject = new Guid("{C3FCC19E-A970-11D2-8B5A-00A0C9B7C9C4}"); - CustomQueryInterfaceResult ICustomQueryInterface.GetInterface(ref Guid iid, out IntPtr ppv) { ppv = IntPtr.Zero; @@ -132,10 +130,6 @@ namespace System.Runtime.InteropServices ppv = Marshal.GetComInterfaceForObject(this, typeof(IDispatch), CustomQueryInterfaceMode.Ignore); return CustomQueryInterfaceResult.Handled; } - else if (iid == IID_IManagedObject) - { - return CustomQueryInterfaceResult.Failed; - } return CustomQueryInterfaceResult.NotHandled; } diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.cs index eeef8eb..8af2cd2 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.cs @@ -29,7 +29,10 @@ namespace System.Runtime.InteropServices public static partial class Marshal { #if FEATURE_COMINTEROP - internal static Guid IID_IUnknown = new Guid("00000000-0000-0000-C000-000000000046"); + /// + /// IUnknown is {00000000-0000-0000-C000-000000000046} + /// + internal static Guid IID_IUnknown = new Guid(0, 0, 0, 0xC0, 0, 0, 0, 0, 0, 0, 0x46); #endif //FEATURE_COMINTEROP private const int LMEM_FIXED = 0;