From f5c290ccd6463d63968dda734a282c10a5b499ec Mon Sep 17 00:00:00 2001 From: Jordan Borean Date: Thu, 22 Jan 2026 04:52:08 +1000 Subject: [PATCH] Fix WSManInstance COM interface with ResourceURI (#26692) --- src/Microsoft.WSMan.Management/Interop.cs | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/Microsoft.WSMan.Management/Interop.cs b/src/Microsoft.WSMan.Management/Interop.cs index e5dd462e2f..3abb938a57 100644 --- a/src/Microsoft.WSMan.Management/Interop.cs +++ b/src/Microsoft.WSMan.Management/Interop.cs @@ -734,18 +734,19 @@ namespace Microsoft.WSMan.Management [SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings")] string ResourceUri { + // IDL: HRESULT resourceUri (BSTR value); + [SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1212:PropertyAccessorsMustFollowOrder", Justification = "COM interface defines put_ before get_.")] + [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "resource")] + [SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings")] + [DispId(1)] + set; + // IDL: HRESULT resourceUri ([out, retval] BSTR* ReturnValue); [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "resource")] [SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings")] [DispId(1)] [return: MarshalAs(UnmanagedType.BStr)] get; - - // IDL: HRESULT resourceUri (BSTR value); - [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "resource")] - [SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings")] - [DispId(1)] - set; } /// AddSelector method of IWSManResourceLocator interface. Add selector to resource locator @@ -818,14 +819,16 @@ namespace Microsoft.WSMan.Management int MustUnderstandOptions { + // IDL: HRESULT MustUnderstandOptions (long value); + + [SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1212:PropertyAccessorsMustFollowOrder", Justification = "COM interface defines put_ before get_.")] + [DispId(7)] + set; + // IDL: HRESULT MustUnderstandOptions ([out, retval] long* ReturnValue); [DispId(7)] get; - // IDL: HRESULT MustUnderstandOptions (long value); - - [DispId(7)] - set; } /// ClearOptions method of IWSManResourceLocator interface. Clear all options