From 27906c876fe5057bca410780d6001d1d346864c5 Mon Sep 17 00:00:00 2001 From: Mike Battista <13860912+mikebattista@users.noreply.github.com> Date: Sun, 11 Dec 2022 15:39:06 -0800 Subject: [PATCH] Fixed SAL parsing of _opt (#1405) * Fixed #1005. * Added missed API to the baseline. * Detect _Maybenull_ as [In][Optional]. * Support overloads in winmd diffing tool. --- scripts/ChangesSinceLastRelease.txt | 293 ++++++++++++++++++ .../MetadataSyntaxTreeCleaner.cs | 47 +-- sources/WinmdUtils/Program.cs | 15 +- .../WinmdUtils/Properties/launchSettings.json | 2 +- 4 files changed, 327 insertions(+), 30 deletions(-) diff --git a/scripts/ChangesSinceLastRelease.txt b/scripts/ChangesSinceLastRelease.txt index 1cd12f69c..6820800d4 100644 --- a/scripts/ChangesSinceLastRelease.txt +++ b/scripts/ChangesSinceLastRelease.txt @@ -236,3 +236,296 @@ Windows.Win32.System.Threading.Apis.CreateProcessAsUserW : dwCreationFlags...UIn Windows.Win32.System.Threading.Apis.CreateProcessWithLogonW : dwCreationFlags...UInt32 => PROCESS_CREATION_FLAGS # Added missed API for #1402. Windows.Win32.System.Threading.Apis.CreateProcessWithTokenW : dwCreationFlags...UInt32 => PROCESS_CREATION_FLAGS +# Fixed #1005. +Windows.Win32.AI.MachineLearning.WinML.IMLOperatorKernelContext.GetExecutionInterface : executionObject : [Optional,Out] => [Out] +Windows.Win32.AI.MachineLearning.WinML.IMLOperatorKernelContext.GetInputTensor : tensor : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.AI.MachineLearning.WinML.IMLOperatorKernelContext.GetOutputTensor : tensor : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.AI.MachineLearning.WinML.IMLOperatorKernelContext.GetOutputTensor : tensor : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.AI.MachineLearning.WinML.IMLOperatorKernelCreationContext.GetExecutionInterface : executionObject : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.AI.MachineLearning.WinML.IMLOperatorTensor.GetDataInterface : dataInterface : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.Data.Xml.XmlLite.IXmlReader.GetBaseUri : ppwszBaseUri : [Optional,Out] => [Out] +Windows.Win32.Data.Xml.XmlLite.IXmlReader.GetLocalName : ppwszLocalName : [Optional,Out] => [Out] +Windows.Win32.Data.Xml.XmlLite.IXmlReader.GetNamespaceUri : ppwszNamespaceUri : [Optional,Out] => [Out] +Windows.Win32.Data.Xml.XmlLite.IXmlReader.GetPrefix : ppwszPrefix : [Optional,Out] => [Out] +Windows.Win32.Data.Xml.XmlLite.IXmlReader.GetQualifiedName : ppwszQualifiedName : [Optional,Out] => [Out] +Windows.Win32.Data.Xml.XmlLite.IXmlReader.GetValue : ppwszValue : [Optional,Out] => [Out] +Windows.Win32.Devices.BiometricFramework.Apis.WinBioCaptureSample : Sample : [Optional,Out] => [Out] +Windows.Win32.Devices.BiometricFramework.Apis.WinBioEnumEnrollments : SubFactorArray : [Optional,Out] => [Out] +Windows.Win32.Devices.BiometricFramework.Apis.WinBioGetProperty : PropertyBuffer : [Optional,Out] => [Out] +Windows.Win32.Devices.BiometricFramework.PIBIO_FRAMEWORK_GET_PROPERTY_FN.Invoke : PropertyBuffer : [Optional,Out] => [Out] +Windows.Win32.Devices.BiometricFramework.PIBIO_SENSOR_ASYNC_IMPORT_RAW_BUFFER_FN.Invoke : ResultBufferAddress : [Optional,Out] => [Out] +Windows.Win32.Devices.BiometricFramework.PIBIO_SENSOR_ASYNC_IMPORT_SECURE_BUFFER_FN.Invoke : ResultBufferAddress : [Optional,Out] => [Out] +Windows.Win32.Devices.DeviceQuery.Apis.DevGetObjects : ppObjects : [Const,Optional,Out] => [Const,Out] +Windows.Win32.Devices.DeviceQuery.Apis.DevGetObjectsEx : ppObjects : [Const,Optional,Out] => [Const,Out] +Windows.Win32.Devices.Enumeration.Pnp.Apis.SwDeviceInterfaceRegister : ppszDeviceInterfaceId : [Optional,Out] => [Out] +Windows.Win32.Devices.ImageAcquisition.IWiaMiniDrvTransferCallback.GetNextStream : ppIStream : [Optional,Out] => [Out] +Windows.Win32.Devices.ImageAcquisition.IWiaTransferCallback.GetNextStream : ppDestination : [Optional,Out] => [Out] +Windows.Win32.Graphics.Direct2D.ID2D1Bitmap1.GetColorContext : colorContext : [Optional,Out] => [Out] +Windows.Win32.Graphics.Direct2D.ID2D1Bitmap1.GetSurface : dxgiSurface : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.Graphics.Direct2D.ID2D1BitmapBrush.GetBitmap : bitmap : [Optional,Out] => [Out] +Windows.Win32.Graphics.Direct2D.ID2D1DeviceContext.GetTarget : image : [Optional,Out] => [Out] +Windows.Win32.Graphics.Direct2D.ID2D1DrawingStateBlock.GetTextRenderingParams : textRenderingParams : [Optional,Out] => [Out] +Windows.Win32.Graphics.Direct2D.ID2D1Effect.GetInput : input : [Optional,Out] => [Out] +Windows.Win32.Graphics.Direct2D.ID2D1ImageBrush.GetImage : image : [Optional,Out] => [Out] +Windows.Win32.Graphics.Direct2D.ID2D1ImageSourceFromWic.GetSource : wicBitmapSource : [Optional,Out] => [Out] +Windows.Win32.Graphics.Direct2D.ID2D1Properties.GetSubProperties : subProperties : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.Graphics.Direct2D.ID2D1RenderTarget.GetTextRenderingParams : textRenderingParams : [Optional,Out] => [Out] +Windows.Win32.Graphics.Direct2D.ID2D1SvgAttribute.GetElement : element : [Optional,Out] => [Out] +Windows.Win32.Graphics.Direct2D.ID2D1SvgDocument.FindElementById : svgElement : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.Graphics.Direct2D.ID2D1SvgDocument.GetRoot : root : [Optional,Out] => [Out] +Windows.Win32.Graphics.Direct2D.ID2D1SvgElement.GetAttributeValue : value : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.Graphics.Direct2D.ID2D1SvgElement.GetDocument : document : [Optional,Out] => [Out] +Windows.Win32.Graphics.Direct2D.ID2D1SvgElement.GetFirstChild : child : [Optional,Out] => [Out] +Windows.Win32.Graphics.Direct2D.ID2D1SvgElement.GetLastChild : child : [Optional,Out] => [Out] +Windows.Win32.Graphics.Direct2D.ID2D1SvgElement.GetNextChild : nextChild : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.Graphics.Direct2D.ID2D1SvgElement.GetParent : parent : [Optional,Out] => [Out] +Windows.Win32.Graphics.Direct2D.ID2D1SvgElement.GetPreviousChild : previousChild : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.Graphics.Direct2D.ID2D1SvgGlyphStyle.GetFill : brush : [Optional,Out] => [Out] +Windows.Win32.Graphics.Direct2D.ID2D1TransformedImageSource.GetSource : imageSource : [Optional,Out] => [Out] +Windows.Win32.Graphics.Direct3D.Dxc.IDxcIncludeHandler.LoadSource : ppIncludeSource : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.Graphics.Direct3D.Dxc.IDxcOperationResult.GetErrorBuffer : ppErrors : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.Graphics.Direct3D.Dxc.IDxcOperationResult.GetResult : ppResult : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.Graphics.Direct3D11.ID3D11DeviceContext.CSGetShader : ppComputeShader : [Optional,Out] => [Out] +Windows.Win32.Graphics.Direct3D11.ID3D11DeviceContext.DSGetShader : ppDomainShader : [Optional,Out] => [Out] +Windows.Win32.Graphics.Direct3D11.ID3D11DeviceContext.GSGetShader : ppGeometryShader : [Optional,Out] => [Out] +Windows.Win32.Graphics.Direct3D11.ID3D11DeviceContext.HSGetShader : ppHullShader : [Optional,Out] => [Out] +Windows.Win32.Graphics.Direct3D11.ID3D11DeviceContext.IAGetInputLayout : ppInputLayout : [Optional,Out] => [Out] +Windows.Win32.Graphics.Direct3D11.ID3D11DeviceContext.PSGetShader : ppPixelShader : [Optional,Out] => [Out] +Windows.Win32.Graphics.Direct3D11.ID3D11DeviceContext.RSGetState : ppRasterizerState : [Optional,Out] => [Out] +Windows.Win32.Graphics.Direct3D11.ID3D11DeviceContext.VSGetShader : ppVertexShader : [Optional,Out] => [Out] +Windows.Win32.Graphics.DirectWrite.IDWriteFont.GetInformationalStrings : informationalStrings : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.Graphics.DirectWrite.IDWriteFontFace3.GetInformationalStrings : informationalStrings : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.Graphics.DirectWrite.IDWriteFontFace4.GetGlyphImageData : glyphDataContext : [Optional,Out] => [Out] +Windows.Win32.Graphics.DirectWrite.IDWriteFontFallback.MapCharacters : mappedFont : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.Graphics.DirectWrite.IDWriteFontSet.GetPropertyValues : values : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.Graphics.DirectWrite.IDWriteRemoteFontFileStream.BeginDownload : asyncResult : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.Media.Audio.Apo.IAudioSystemEffects2.GetEffectsList : ppEffectsIds : [Optional,Out] => [Out] +Windows.Win32.Media.Audio.Apo.IAudioSystemEffects3.GetControllableSystemEffectsList : effects : [Optional,Out] => [Out] +Windows.Win32.Media.Audio.IActivateAudioInterfaceAsyncOperation.GetActivateResult : activatedInterface : [Optional,Out] => [Out] +Windows.Win32.Media.Audio.IAudioEffectsManager.GetAudioEffects : effects : [Optional,Out] => [Out] +Windows.Win32.Media.DirectShow.IMediaFilter.GetSyncSource : pClock : [Optional,Out] => [Out] +Windows.Win32.Media.MediaFoundation.Apis.MFCreateVideoPresenter : ppVideoPresenter : [Optional,Out] => [Out] +Windows.Win32.Media.MediaFoundation.Apis.MFCreateVideoRenderer : ppVideoRenderer : [Optional,Out] => [Out] +Windows.Win32.Media.MediaFoundation.IDirectXVideoDecoderService.GetDecoderConfigurations : ppConfigs : [Optional,Out] => [Out] +Windows.Win32.Media.MediaFoundation.IDirectXVideoDecoderService.GetDecoderDeviceGuids : pGuids : [Optional,Out] => [Out] +Windows.Win32.Media.MediaFoundation.IDirectXVideoDecoderService.GetDecoderRenderTargets : pFormats : [Optional,Out] => [Out] +Windows.Win32.Media.MediaFoundation.IDirectXVideoProcessorService.GetVideoProcessorDeviceGuids : pGuids : [Optional,Out] => [Out] +Windows.Win32.Media.MediaFoundation.IDirectXVideoProcessorService.GetVideoProcessorRenderTargets : pFormats : [Optional,Out] => [Out] +Windows.Win32.Media.MediaFoundation.IDirectXVideoProcessorService.GetVideoProcessorSubStreamFormats : pFormats : [Optional,Out] => [Out] +Windows.Win32.Media.MediaFoundation.IMFMediaEngineEME.get_Keys : keys : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.Media.MediaFoundation.IMFMediaEngineSrcElementsEx.GetKeySystem : pType : [Optional,Out] => [Out] +Windows.Win32.Media.MediaFoundation.IMFSensorDevice.GetDeviceAttributes : ppAttributes : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.Media.MediaFoundation.IMFSensorGroup.GetSensorGroupAttributes : ppAttributes : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.Media.MediaFoundation.IMFSensorTransformFactory.GetTransformInformation : ppAttributes : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.Media.MediaFoundation.IMFTimedTextCue.GetData : data : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.Media.MediaFoundation.IMFTimedTextCue.GetRegion : region : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.Media.MediaFoundation.IMFTimedTextCue.GetStyle : style : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.Media.MediaFoundation.IMFTimedTextFormattedText.GetSubformatting : style : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.Media.MediaFoundation.IMFTimedTextFormattedText.GetText : text : [Optional,Out] => [Out] +Windows.Win32.Media.MediaFoundation.IMFTimedTextStyle2.GetBouten : bouten : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.Media.MediaFoundation.IMFTimedTextStyle2.GetRuby : ruby : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.Media.MediaFoundation.IMFTranscodeProfile.GetAudioAttributes : ppAttrs : [Optional,Out] => [Out] +Windows.Win32.Media.MediaFoundation.IMFTranscodeProfile.GetContainerAttributes : ppAttrs : [Optional,Out] => [Out] +Windows.Win32.Media.MediaFoundation.IMFTranscodeProfile.GetVideoAttributes : ppAttrs : [Optional,Out] => [Out] +Windows.Win32.Networking.Clustering.Apis.ResUtilGetBinaryValue : ppbOutValue : [MemorySize(BytesParamIndex=3),Optional,Out] => [MemorySize(BytesParamIndex=3),Out] +Windows.Win32.Networking.Clustering.Apis.ResUtilGetPropertiesToParameterBlock : pszNameOfPropInError : [Optional,Out] => [Out] +Windows.Win32.Networking.Clustering.PRESUTIL_GET_BINARY_VALUE.Invoke : ppbOutValue : [MemorySize(BytesParamIndex=3),Optional,Out] => [MemorySize(BytesParamIndex=3),Out] +Windows.Win32.Networking.Ldap.Apis.ldap_result : res : [Optional,Out] => [Out] +Windows.Win32.Networking.Ldap.Apis.ldap_search_ext_s : res : [Optional,Out] => [Out] +Windows.Win32.Networking.Ldap.Apis.ldap_search_ext_sA : res : [Optional,Out] => [Out] +Windows.Win32.Networking.Ldap.Apis.ldap_search_ext_sW : res : [Optional,Out] => [Out] +Windows.Win32.Networking.Ldap.Apis.ldap_search_s : res : [Optional,Out] => [Out] +Windows.Win32.Networking.Ldap.Apis.ldap_search_sA : res : [Optional,Out] => [Out] +Windows.Win32.Networking.Ldap.Apis.ldap_search_st : res : [Optional,Out] => [Out] +Windows.Win32.Networking.Ldap.Apis.ldap_search_stA : res : [Optional,Out] => [Out] +Windows.Win32.Networking.Ldap.Apis.ldap_search_stW : res : [Optional,Out] => [Out] +Windows.Win32.Networking.Ldap.Apis.ldap_search_sW : res : [Optional,Out] => [Out] +Windows.Win32.Networking.WindowsWebServices.Apis.WebAuthNAuthenticatorGetAssertion : ppWebAuthNAssertion : [Optional,Out] => [Out] +Windows.Win32.Networking.WindowsWebServices.Apis.WebAuthNAuthenticatorMakeCredential : ppWebAuthNCredentialAttestation : [Optional,Out] => [Out] +Windows.Win32.Networking.WindowsWebServices.Apis.WsGetDictionary : dictionary : [Optional,Out] => [Out] +Windows.Win32.Networking.WindowsWebServices.Apis.WsGetMissingMetadataDocumentAddress : address : [Optional,Out] => [Out] +Windows.Win32.Networking.WinHttp.Apis.WinHttpDetectAutoProxyConfigUrl : ppwstrAutoConfigUrl : [Optional,Out] => [Out] +Windows.Win32.Networking.WinInet.Apis.GetUrlCacheEntryBinaryBlob : ppbBlob : [NativeArrayInfo(CountParamIndex=6),Optional,Out] => [NativeArrayInfo(CountParamIndex=6),Out] +Windows.Win32.NetworkManagement.Dhcp.Apis.DhcpAuditLogGetParams : AuditLogDir : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.Dns.Apis.DnsFreeProxyName : proxyName : [Optional] => [In,Optional] +Windows.Win32.NetworkManagement.Dns.Apis.DnsQuery_A : ppQueryResults : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.Dns.Apis.DnsQuery_UTF8 : ppQueryResults : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.Dns.Apis.DnsQuery_W : ppQueryResults : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.NetManagement.Apis.NetApiBufferFree : Buffer : [Optional] => [In,Optional] +Windows.Win32.NetworkManagement.NetManagement.Apis.NetApiBufferReallocate : OldBuffer : [Optional] => [In,Optional] +Windows.Win32.NetworkManagement.NetManagement.Apis.NetGetAadJoinInformation : ppJoinInfo : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.Rras.Apis.MprConfigInterfaceEnum : lplpBuffer : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.Rras.Apis.MprConfigInterfaceTransportEnum : lplpBuffer : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.Rras.Apis.MprConfigTransportEnum : lplpBuffer : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsConnectionManager.Apis.WcmQueryProperty : ppData : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmCalloutGetSecurityInfoByKey0 : dacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmCalloutGetSecurityInfoByKey0 : sacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmCalloutGetSecurityInfoByKey0 : sidGroup : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmCalloutGetSecurityInfoByKey0 : sidOwner : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmConnectionGetSecurityInfo0 : dacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmConnectionGetSecurityInfo0 : sacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmConnectionGetSecurityInfo0 : sidGroup : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmConnectionGetSecurityInfo0 : sidOwner : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmEngineGetSecurityInfo0 : dacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmEngineGetSecurityInfo0 : sacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmEngineGetSecurityInfo0 : sidGroup : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmEngineGetSecurityInfo0 : sidOwner : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmFilterGetSecurityInfoByKey0 : dacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmFilterGetSecurityInfoByKey0 : sacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmFilterGetSecurityInfoByKey0 : sidGroup : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmFilterGetSecurityInfoByKey0 : sidOwner : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmLayerGetSecurityInfoByKey0 : dacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmLayerGetSecurityInfoByKey0 : sacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmLayerGetSecurityInfoByKey0 : sidGroup : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmLayerGetSecurityInfoByKey0 : sidOwner : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmNetEventsGetSecurityInfo0 : dacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmNetEventsGetSecurityInfo0 : sacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmNetEventsGetSecurityInfo0 : sidGroup : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmNetEventsGetSecurityInfo0 : sidOwner : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmProviderContextGetSecurityInfoByKey0 : dacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmProviderContextGetSecurityInfoByKey0 : sacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmProviderContextGetSecurityInfoByKey0 : sidGroup : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmProviderContextGetSecurityInfoByKey0 : sidOwner : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmProviderGetSecurityInfoByKey0 : dacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmProviderGetSecurityInfoByKey0 : sacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmProviderGetSecurityInfoByKey0 : sidGroup : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmProviderGetSecurityInfoByKey0 : sidOwner : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmSubLayerGetSecurityInfoByKey0 : dacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmSubLayerGetSecurityInfoByKey0 : sacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmSubLayerGetSecurityInfoByKey0 : sidGroup : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmSubLayerGetSecurityInfoByKey0 : sidOwner : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmvSwitchEventsGetSecurityInfo0 : dacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmvSwitchEventsGetSecurityInfo0 : sacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmvSwitchEventsGetSecurityInfo0 : sidGroup : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.FwpmvSwitchEventsGetSecurityInfo0 : sidOwner : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.IkeextSaDbGetSecurityInfo0 : dacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.IkeextSaDbGetSecurityInfo0 : sacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.IkeextSaDbGetSecurityInfo0 : sidGroup : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.IkeextSaDbGetSecurityInfo0 : sidOwner : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.IPsecDospGetSecurityInfo0 : dacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.IPsecDospGetSecurityInfo0 : sacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.IPsecDospGetSecurityInfo0 : sidGroup : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.IPsecDospGetSecurityInfo0 : sidOwner : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.IPsecKeyManagerGetSecurityInfoByKey0 : dacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.IPsecKeyManagerGetSecurityInfoByKey0 : sacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.IPsecKeyManagerGetSecurityInfoByKey0 : sidGroup : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.IPsecKeyManagerGetSecurityInfoByKey0 : sidOwner : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.IPsecSaDbGetSecurityInfo0 : dacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.IPsecSaDbGetSecurityInfo0 : sacl : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.IPsecSaDbGetSecurityInfo0 : sidGroup : [Optional,Out] => [Out] +Windows.Win32.NetworkManagement.WindowsFilteringPlatform.Apis.IPsecSaDbGetSecurityInfo0 : sidOwner : [Optional,Out] => [Out] +Windows.Win32.Security.Apis.DeriveCapabilitySidsFromName : CapabilityGroupSids : [Optional,Out] => [Out] +Windows.Win32.Security.Apis.DeriveCapabilitySidsFromName : CapabilitySids : [Optional,Out] => [Out] +Windows.Win32.Security.Authentication.Identity.Apis.SspiEncodeAuthIdentityAsStrings : ppszDomainName : [Optional,Out] => [Out] +Windows.Win32.Security.Authentication.Identity.Apis.SspiEncodeAuthIdentityAsStrings : ppszUserName : [Optional,Out] => [Out] +Windows.Win32.Security.Authorization.Apis.LookupSecurityDescriptorPartsA : ppListOfAccessEntries : [Optional,Out] => [Out] +Windows.Win32.Security.Authorization.Apis.LookupSecurityDescriptorPartsA : ppListOfAuditEntries : [Optional,Out] => [Out] +Windows.Win32.Security.Authorization.Apis.LookupSecurityDescriptorPartsW : ppListOfAccessEntries : [Optional,Out] => [Out] +Windows.Win32.Security.Authorization.Apis.LookupSecurityDescriptorPartsW : ppListOfAuditEntries : [Optional,Out] => [Out] +Windows.Win32.Security.Credentials.Apis.SCardGetReaderIconA : pbIcon : [MemorySize(BytesParamIndex=3),Optional,Out] => [MemorySize(BytesParamIndex=3),Out] +Windows.Win32.Security.Credentials.Apis.SCardGetReaderIconW : pbIcon : [MemorySize(BytesParamIndex=3),Optional,Out] => [MemorySize(BytesParamIndex=3),Out] +Windows.Win32.Security.Cryptography.Apis.CertFindCertificateInCRL : ppCrlEntry : [Optional,Out] => [Out] +Windows.Win32.Security.Cryptography.Apis.CryptRetrieveTimeStamp : ppTsSigner : [Optional,Out] => [Out] +Windows.Win32.Security.Cryptography.Apis.CryptVerifyTimeStampSignature : ppTsSigner : [Optional,Out] => [Out] +Windows.Win32.Security.Cryptography.Apis.CryptXmlAddObject : ppObject : [Const,Optional,Out] => [Const,Out] +Windows.Win32.Security.Cryptography.PFN_CRYPT_EXTRACT_ENCODED_SIGNATURE_PARAMETERS_FUNC.Invoke : ppvDecodedSignPara : [Optional,Out] => [Out] +Windows.Win32.Security.Cryptography.PFN_CRYPT_OBJECT_LOCATOR_PROVIDER_GET.Invoke : ppIdentifier : [Optional,Out] => [Out] +Windows.Win32.Security.Cryptography.PFN_CRYPT_OBJECT_LOCATOR_PROVIDER_GET.Invoke : ppwszPassword : [Optional,Out] => [Out] +Windows.Win32.Security.Cryptography.PFN_CRYPT_OBJECT_LOCATOR_PROVIDER_INITIALIZE.Invoke : ppPluginContext : [Optional,Out] => [Out] +Windows.Win32.Security.Cryptography.UI.Apis.CertSelectionGetSerializedBlob : ppOutBuffer : [Optional,Out] => [Out] +Windows.Win32.Storage.Packaging.Appx.Apis.GetIdForPackageDependencyContext : packageDependencyId : [Optional,Out] => [Out] +Windows.Win32.Storage.Packaging.Appx.Apis.GetResolvedPackageFullNameForPackageDependency : packageFullName : [Optional,Out] => [Out] +Windows.Win32.Storage.Packaging.Appx.Apis.TryCreatePackageDependency : packageDependencyId : [Optional,Out] => [Out] +Windows.Win32.Storage.Vss.IVssComponentEx.GetPostSnapshotFailureMsg : pbstrFailureMsg : [Optional,Out] => [Out] +Windows.Win32.Storage.Vss.IVssComponentEx.GetPrepareForBackupFailureMsg : pbstrFailureMsg : [Optional,Out] => [Out] +Windows.Win32.Storage.Vss.IVssComponentEx.GetRestoreName : pbstrName : [Optional,Out] => [Out] +Windows.Win32.Storage.Vss.IVssComponentEx.GetRollForward : pbstrPoint : [Optional,Out] => [Out] +Windows.Win32.Storage.Vss.IVssWriterImpl.GetSnapshotDeviceName : ppwszSnapshotDevice : [Optional,Out] => [Out] +Windows.Win32.System.AddressBook.IMAPIContainer.GetSearchCriteria : lppContainerList : [Optional,Out] => [Out] +Windows.Win32.System.AddressBook.IMAPIContainer.GetSearchCriteria : lppRestriction : [Optional,Out] => [Out] +Windows.Win32.System.AddressBook.IMsgStore.GetReceiveFolder : lppszExplicitClass : [Optional,Out] => [Out] +Windows.Win32.System.AddressBook.IWABObject.LDAPUrl : lppMailUser : [Optional,Out] => [Out] +Windows.Win32.System.ApplicationInstallationAndServicing.Apis.MsiGetPatchFileListA : pphFileRecords : [Optional,Out] => [Out] +Windows.Win32.System.ApplicationInstallationAndServicing.Apis.MsiGetPatchFileListW : pphFileRecords : [Optional,Out] => [Out] +Windows.Win32.System.Com.Apis.CoTaskMemFree : pv : [Optional] => [In,Optional] +Windows.Win32.System.Com.Apis.CoTaskMemRealloc : pv : [Optional] => [In,Optional] +Windows.Win32.System.Com.CallObj.ICallFrame.GetNames : pwszInterface : [Optional,Out] => [Out] +Windows.Win32.System.Com.CallObj.ICallFrame.GetNames : pwszMethod : [Optional,Out] => [Out] +Windows.Win32.System.Com.CallObj.ICallIndirect.GetIID : pwszInterface : [Optional,Out] => [Out] +Windows.Win32.System.Com.CallObj.ICallIndirect.GetMethodInfo : pwszMethod : [Optional,Out] => [Out] +Windows.Win32.System.Com.IClientSecurity.QueryBlanket : pAuthInfo : [Optional,Out] => [Out] +Windows.Win32.System.Com.IRpcChannelBuffer.GetDestCtx : ppvDestContext : [Optional,Out] => [Out] +Windows.Win32.System.Com.IServerSecurity.QueryBlanket : pPrivs : [Optional,Out] => [Out] +Windows.Win32.System.Com.IUriBuilder.GetFragment : ppwzFragment : [Optional,Out] => [Out] +Windows.Win32.System.Com.IUriBuilder.GetHost : ppwzHost : [Optional,Out] => [Out] +Windows.Win32.System.Com.IUriBuilder.GetIUri : ppIUri : [Optional,Out] => [Out] +Windows.Win32.System.Com.IUriBuilder.GetPassword : ppwzPassword : [Optional,Out] => [Out] +Windows.Win32.System.Com.IUriBuilder.GetPath : ppwzPath : [Optional,Out] => [Out] +Windows.Win32.System.Com.IUriBuilder.GetQuery : ppwzQuery : [Optional,Out] => [Out] +Windows.Win32.System.Com.IUriBuilder.GetSchemeName : ppwzSchemeName : [Optional,Out] => [Out] +Windows.Win32.System.Com.IUriBuilder.GetUserName : ppwzUserName : [Optional,Out] => [Out] +Windows.Win32.System.Com.Urlmon.IInternetHostSecurityManager.QueryCustomPolicy : ppPolicy : [NativeArrayInfo(CountParamIndex=2),Optional,Out] => [NativeArrayInfo(CountParamIndex=2),Out] +Windows.Win32.System.Diagnostics.Debug.Apis.MiniDumpReadDumpStream : Dir : [Optional,Out] => [Out] +Windows.Win32.System.Diagnostics.Debug.Apis.MiniDumpReadDumpStream : StreamPointer : [Optional,Out] => [Out] +Windows.Win32.System.Diagnostics.Debug.IDynamicConceptProviderConcept.GetConcept : conceptInterface : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.System.Diagnostics.Debug.IModelObject.GetContext : context : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.System.Diagnostics.Debug.IModelObject.GetParentModel : contextObject : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.System.Diagnostics.Etw.Apis.TdhCreatePayloadFilter : PayloadFilter : [Optional,Out] => [Out] +Windows.Win32.System.Memory.Apis.GlobalFree : hMem : [Optional] => [In,Optional] +Windows.Win32.System.Memory.Apis.HeapFree : lpMem : [Optional] => [In,Optional] +Windows.Win32.System.Memory.Apis.HeapReAlloc : lpMem : [Optional] => [In,Optional] +Windows.Win32.System.Memory.Apis.LocalFree : hMem : [Optional] => [In,Optional] +Windows.Win32.System.Memory.Apis.LocalReAlloc : hMem : [Optional] => [In,Optional] +Windows.Win32.System.Ole.Apis.GetAltMonthNames : prgp : [Optional,Out] => [Out] +Windows.Win32.System.Ole.IOleUIObjInfoA.GetConvertInfo : lplpClsidExclude : [Optional,Out] => [Out] +Windows.Win32.System.Ole.IOleUIObjInfoW.GetConvertInfo : lplpClsidExclude : [Optional,Out] => [Out] +Windows.Win32.System.Rpc.Apis.I_RpcBindingInqDynamicEndpointA : DynamicEndpoint : [Optional,Out] => [Out] +Windows.Win32.System.Rpc.Apis.I_RpcBindingInqDynamicEndpointW : DynamicEndpoint : [Optional,Out] => [Out] +Windows.Win32.System.Search.IAccessor.GetBindings : prgBindings : [Optional,Out] => [Out] +Windows.Win32.System.Search.IColumnsInfo.GetColumnInfo : prgInfo : [Optional,Out] => [Out] +Windows.Win32.System.Search.ICommand.GetDBSession : ppSession : [Optional,Out] => [Out] +Windows.Win32.System.Search.ICommandProperties.GetProperties : prgPropertySets : [Optional,Out] => [Out] +Windows.Win32.System.Search.ICommandWithParameters.GetParameterInfo : prgParamInfo : [Optional,Out] => [Out] +Windows.Win32.System.Search.IDBDataSourceAdmin.GetCreationProperties : prgPropertyInfoSets : [Optional,Out] => [Out] +Windows.Win32.System.Search.IDBProperties.GetProperties : prgPropertySets : [Optional,Out] => [Out] +Windows.Win32.System.Search.IDBProperties.GetPropertyInfo : prgPropertyInfoSets : [Optional,Out] => [Out] +Windows.Win32.System.Search.IDBSchemaRowset.GetRowset : ppRowset : [Optional,Out] => [Out] +Windows.Win32.System.Search.IDBSchemaRowset.GetSchemas : prgRestrictionSupport : [Optional,Out] => [Out] +Windows.Win32.System.Search.IDBSchemaRowset.GetSchemas : prgSchemas : [Optional,Out] => [Out] +Windows.Win32.System.Search.IErrorLookup.GetHelpInfo : pbstrHelpFile : [Optional,Out] => [Out] +Windows.Win32.System.Search.IErrorRecords.GetCustomErrorObject : ppObject : [Optional,Out] => [Out] +Windows.Win32.System.Search.IGetDataSource.GetDataSource : ppDataSource : [Optional,Out] => [Out] +Windows.Win32.System.Search.IRowsetInfo.GetProperties : prgPropertySets : [Optional,Out] => [Out] +Windows.Win32.System.Search.IRowsetInfo.GetReferencedRowset : ppReferencedRowset : [Optional,Out] => [Out] +Windows.Win32.System.Search.IRowsetInfo.GetSpecification : ppSpecification : [Optional,Out] => [Out] +Windows.Win32.System.Search.ISessionProperties.GetProperties : prgPropertySets : [Optional,Out] => [Out] +Windows.Win32.System.Search.IViewFilter.GetFilterBindings : prgBindings : [Optional,Out] => [Out] +Windows.Win32.System.WinRT.Apis.GetRestrictedErrorInfo : ppRestrictedErrorInfo : [Optional,Out] => [Out] +Windows.Win32.System.WinRT.Apis.WindowsConcatString : newString : [Optional,Out] => [Out] +Windows.Win32.System.WinRT.Apis.WindowsCreateString : string : [Optional,Out] => [Out] +Windows.Win32.System.WinRT.Apis.WindowsCreateStringReference : string : [Optional,Out] => [Out] +Windows.Win32.System.WinRT.Apis.WindowsDuplicateString : newString : [Optional,Out] => [Out] +Windows.Win32.System.WinRT.Apis.WindowsPromoteStringBuffer : string : [Optional,Out] => [Out] +Windows.Win32.System.WinRT.Apis.WindowsReplaceString : newString : [Optional,Out] => [Out] +Windows.Win32.System.WinRT.Apis.WindowsSubstring : newString : [Optional,Out] => [Out] +Windows.Win32.System.WinRT.Apis.WindowsSubstringWithSpecifiedLength : newString : [Optional,Out] => [Out] +Windows.Win32.System.WinRT.Apis.WindowsTrimStringEnd : newString : [Optional,Out] => [Out] +Windows.Win32.System.WinRT.Apis.WindowsTrimStringStart : newString : [Optional,Out] => [Out] +Windows.Win32.System.WinRT.Graphics.Direct2D.IGeometrySource2DInterop.TryGetGeometryUsingFactory : value : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.System.Wmi.MI_ProviderFT_Subscribe.Invoke : subscriptionSelf : [Optional,Out] => [Out] +Windows.Win32.UI.HiDpi.Apis.SystemParametersInfoForDpi : pvParam : [Optional,Out] => [In,Optional] +Windows.Win32.UI.Shell.ICredentialProviderCredential.GetSerialization : ppszOptionalStatusText : [Optional,Out] => [Out] +Windows.Win32.UI.Shell.ICredentialProviderCredential.ReportResult : ppszOptionalStatusText : [Optional,Out] => [Out] +Windows.Win32.UI.Shell.ICredentialProviderCredential2.GetUserSid : sid : [Optional,Out] => [Out] +Windows.Win32.UI.Shell.IShellFolderView.SetCallback : ppOldCB : [Optional,Out] => [Out] +Windows.Win32.UI.Shell.PropertiesSystem.Apis.PropVariantToWinRTPropertyValue : ppv : [ComOutPtr,Optional,Out] => [ComOutPtr,Out] +Windows.Win32.UI.WindowsAndMessaging.Apis.SendMessageW : lParam : [Optional] => [In,Optional] +Windows.Win32.UI.WindowsAndMessaging.Apis.SendMessageW : wParam : [Optional] => [In,Optional] +Windows.Win32.UI.WindowsAndMessaging.Apis.SystemParametersInfoA : pvParam : [Optional,Out] => [In,Optional] +Windows.Win32.UI.WindowsAndMessaging.Apis.SystemParametersInfoW : pvParam : [Optional,Out] => [In,Optional] +Windows.Win32.Web.MsHtml.IDocHostUIHandler.FilterDataObject : ppDORet : [Optional,Out] => [Out] +Windows.Win32.Web.MsHtml.IDocHostUIHandler.GetExternal : ppDispatch : [Optional,Out] => [Out] +# Detect _Maybenull_ as [In][Optional]. +Windows.Win32.System.EventLog.Apis.EvtSubscribe : Callback : [Optional] => [In,Optional] +Windows.Win32.System.EventLog.Apis.EvtSubscribe : Context : [Optional] => [In,Optional] +Windows.Win32.System.EventLog.EVT_SUBSCRIBE_CALLBACK.Invoke : UserContext : [Optional] => [In,Optional] diff --git a/sources/ClangSharpSourceToWinmd/MetadataSyntaxTreeCleaner.cs b/sources/ClangSharpSourceToWinmd/MetadataSyntaxTreeCleaner.cs index 7957f5b07..0ca293181 100644 --- a/sources/ClangSharpSourceToWinmd/MetadataSyntaxTreeCleaner.cs +++ b/sources/ClangSharpSourceToWinmd/MetadataSyntaxTreeCleaner.cs @@ -803,17 +803,7 @@ private SyntaxNode CreateAttributeListForSal(AttributeListSyntax cppAttrList) { if (salAttr.Name == "SAL_name") { - if (salAttr.P1.StartsWith("_COM_Outptr")) - { - isComOutPtr = true; - continue; - } - else if (salAttr.P1.StartsWith("_Outptr_") && !isComOutPtr) - { - isOut = true; - continue; - } - else if (salAttr.P1.StartsWith("__RPC__")) + if (salAttr.P1.StartsWith("__RPC__")) { // TODO: Handle ecount, xcount and others that deal with counts bool deref = false; @@ -853,6 +843,29 @@ private SyntaxNode CreateAttributeListForSal(AttributeListSyntax cppAttrList) break; } + else if (salAttr.P1 == "_Maybenull_" || salAttr.P1 == "_Pre_maybenull_") + { + isIn = true; + isOpt = true; + + break; + } + + if (salAttr.P1.Contains("_opt")) + { + isOpt = true; + } + + if (salAttr.P1.StartsWith("_COM_Outptr")) + { + isComOutPtr = true; + continue; + } + else if (salAttr.P1.StartsWith("_Outptr_") && !isComOutPtr) + { + isOut = true; + continue; + } else if (salAttr.P1 == "_Reserved_") { isReserved = true; @@ -860,12 +873,6 @@ private SyntaxNode CreateAttributeListForSal(AttributeListSyntax cppAttrList) } } - if (salAttr.Name == "SAL_null" && salAttr.P1 == "__maybe") - { - isOpt = true; - continue; - } - if (salAttr.Name == "SAL_retval") { isRetVal = true; @@ -908,12 +915,6 @@ private SyntaxNode CreateAttributeListForSal(AttributeListSyntax cppAttrList) continue; } - if (salAttr.Name == "SAL_name" && salAttr.P1 == "_Post_valid_") - { - isOut = true; - continue; - } - if (!marshalAsAdded && (salAttr.Name == "SAL_writableTo" || salAttr.Name == "SAL_readableTo") && pre.HasValue && pre.Value) { nativeArrayInfoParams = GetArrayMarshalAsFromP1(paramNode, salAttr.P1); diff --git a/sources/WinmdUtils/Program.cs b/sources/WinmdUtils/Program.cs index b91afcd86..f6da9b78c 100644 --- a/sources/WinmdUtils/Program.cs +++ b/sources/WinmdUtils/Program.cs @@ -13,8 +13,8 @@ using ICSharpCode.Decompiler; using ICSharpCode.Decompiler.Metadata; using ICSharpCode.Decompiler.TypeSystem; -using Windows.Win32.Interop; using MetadataUtils; +using Windows.Win32.Interop; namespace WinmdUtilsProgram { @@ -1808,12 +1808,13 @@ public static int ShowMissingImports(FileInfo first, FileInfo second, string exc private class DifferencesWriter { - private HashSet differencesToIgnore = new HashSet(); - private List differences = new List(); + private HashSet differencesToIgnore = new(); + private HashSet unusedDifferencesToIgnore = new(); + private readonly List differences = new(); public bool DifferencesFound => this.DifferencesCount != 0; - public bool KnownDifferencesNotVisitedFound => this.differencesToIgnore.Count != 0; + public bool KnownDifferencesNotVisitedFound => this.unusedDifferencesToIgnore.Count != 0; public int DifferencesCount { get; private set; } @@ -1851,6 +1852,8 @@ public DifferencesWriter(IEnumerable differencesToIgnore) { this.differencesToIgnore.Add(value); } + + this.unusedDifferencesToIgnore = new HashSet(differencesToIgnore); } public void WriteDifference(string line, bool infoOnly) @@ -1859,7 +1862,7 @@ public void WriteDifference(string line, bool infoOnly) { if (this.differencesToIgnore.Contains(line)) { - this.differencesToIgnore.Remove(line); + this.unusedDifferencesToIgnore.Remove(line); return; } @@ -1876,7 +1879,7 @@ public void WriteDifference(string line) public IEnumerable Differences => this.differences; - public IEnumerable KnownDifferencesNotVisited => this.differencesToIgnore; + public IEnumerable KnownDifferencesNotVisited => this.unusedDifferencesToIgnore; } } } diff --git a/sources/WinmdUtils/Properties/launchSettings.json b/sources/WinmdUtils/Properties/launchSettings.json index 13a076423..8c552f3e3 100644 --- a/sources/WinmdUtils/Properties/launchSettings.json +++ b/sources/WinmdUtils/Properties/launchSettings.json @@ -6,7 +6,7 @@ }, "compare": { "commandName": "Project", - "commandLineArgs": "compare --first $(USERPROFILE)\\.nuget\\packages\\microsoft.windows.sdk.win32metadata\\29.0.6-preview\\Windows.Win32.winmd --second $(ProjectDir)..\\..\\bin\\Windows.Win32.winmd --knownDiffsFile $(ProjectDir)..\\..\\scripts\\ChangesSinceLastRelease.txt" + "commandLineArgs": "compare --first $(USERPROFILE)\\.nuget\\packages\\microsoft.windows.sdk.win32metadata\\39.0.18-preview\\Windows.Win32.winmd --second $(ProjectDir)..\\..\\bin\\Windows.Win32.winmd --knownDiffsFile $(ProjectDir)..\\..\\scripts\\ChangesSinceLastRelease.txt" }, "compareWithUpdate": { "commandName": "Project",