From 07a5dcdb2a0f70b6d48fb6c025f8f32d63f64c23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20K=C3=A4s?= Date: Sat, 12 Oct 2019 10:00:50 +0200 Subject: [PATCH 1/2] Fix PreserveSig attributes. Remove unnecessary MethodImpl attributes. --- .../WindowsTaskbarJumpList/ComInterfaces.cs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Microsoft.PowerShell.ConsoleHost/WindowsTaskbarJumpList/ComInterfaces.cs b/src/Microsoft.PowerShell.ConsoleHost/WindowsTaskbarJumpList/ComInterfaces.cs index 1cf2749928d..7f48ee61572 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/WindowsTaskbarJumpList/ComInterfaces.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/WindowsTaskbarJumpList/ComInterfaces.cs @@ -106,7 +106,7 @@ internal interface IPropertyStore /// /// /// - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] + [PreserveSig] HResult GetCount([Out] out uint propertyCount); /// @@ -115,7 +115,7 @@ internal interface IPropertyStore /// /// /// - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] + [PreserveSig] HResult GetAt([In] uint propertyIndex, out PropertyKey key); /// @@ -124,7 +124,7 @@ internal interface IPropertyStore /// /// /// - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] + [PreserveSig] HResult GetValue([In] ref PropertyKey key, [Out] PropVariant pv); /// @@ -133,7 +133,7 @@ internal interface IPropertyStore /// /// /// - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), PreserveSig] + [PreserveSig] HResult SetValue([In] ref PropertyKey key, [In] PropVariant pv); /// @@ -141,7 +141,6 @@ internal interface IPropertyStore /// /// [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] HResult Commit(); } @@ -199,9 +198,7 @@ void GetAt( internal interface IObjectCollection { // IObjectArray - [PreserveSig] void GetCount(out uint cObjects); - [PreserveSig] void GetAt( uint iIndex, ref Guid riid, From c478c061ba2c1afbd7f7c658a64fd0fedad3109c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20K=C3=A4s?= Date: Sat, 12 Oct 2019 10:00:51 +0200 Subject: [PATCH 2/2] Fix whitespace issue --- .../WindowsTaskbarJumpList/ComInterfaces.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Microsoft.PowerShell.ConsoleHost/WindowsTaskbarJumpList/ComInterfaces.cs b/src/Microsoft.PowerShell.ConsoleHost/WindowsTaskbarJumpList/ComInterfaces.cs index 7f48ee61572..a62e51c29fb 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/WindowsTaskbarJumpList/ComInterfaces.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/WindowsTaskbarJumpList/ComInterfaces.cs @@ -199,6 +199,7 @@ internal interface IObjectCollection { // IObjectArray void GetCount(out uint cObjects); + void GetAt( uint iIndex, ref Guid riid,