dotnet / pinvoke

A library containing all P/Invoke code so you don't have to import it every time. Maintained and updated to support the latest Windows OS.
MIT License
2.12k stars 222 forks source link

Refactor FacilityCode bitshift op to Facility properties #605

Closed BinToss closed 2 years ago

BinToss commented 2 years ago

closes #604

BREAKING CHANGE

AArnott commented 2 years ago

/azp run

azure-pipelines[bot] commented 2 years ago
Azure Pipelines successfully started running 1 pipeline(s).
AArnott commented 2 years ago

Thank you for these submissions!

AArnott commented 2 years ago

@bintoss Do you think you can finish getting this to build?

BinToss commented 2 years ago

Compiles with warnings now. I'm pretty sure they existed before I started on these two pull requests.

I'd also noticed the Solution file contains a path to a missing file at L22. The file "..\tools\Update-CoverageReport.ps1" doesn't exist.

C:\Repos\BinToss\pinvoke [pr/RefactorFacilityCode ≡ +0 ~2 -0 !]> dotnet build .\src\Windows.Core\Windows.Core.csproj --framework net45
Microsoft (R) Build Engine version 17.0.0+c9eb9dd64 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  All projects are up-to-date for restore.

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:00.87
  CodeGenerationAttributes -> C:\Repos\BinToss\pinvoke\bin\Debug\netstandard2.0\CodeGenerationAttributes.dll
  CodeGeneration -> C:\Repos\BinToss\pinvoke\bin\Debug\netstandard2.0\CodeGeneration.dll
  CodeGenerationAttributes -> C:\Repos\BinToss\pinvoke\bin\Debug\net45\CodeGenerationAttributes.dll
C:\Repos\BinToss\pinvoke\src\Windows.Core\HResult+FacilityCode.cs(90,13): warning RS0016: Symbol 'FACILITY_LEAP' is not part of the declared API. [C:\Repos\BinToss\pinvoke\src\Windows.Core\Windows.Core.csproj]
C:\Repos\BinToss\pinvoke\src\Windows.Core\HResult+FacilityCode.cs(137,13): warning RS0016: Symbol 'FACILITY_AUDIOSTREAMING' is not part of the declared API. [C:\Repos\BinToss\pinvoke\src\Windows.Core\Windows.Core.csproj]
C:\Repos\BinToss\pinvoke\src\Windows.Core\PublicAPI.Shipped.txt(34,1): warning RS0017: Symbol 'PInvoke.HResult.FacilityCode.FACILITY_AUDIOSTREAMING = 1096 -> PInvoke.HResult.FacilityCode' is part of the declared API, but is either not public or could not be found [C:\Repos\BinToss\pinvoke\src\Windows.Core\Windows.Core.csproj]
C:\Repos\BinToss\pinvoke\src\Windows.Core\PublicAPI.Shipped.txt(82,1): warning RS0017: Symbol 'PInvoke.HResult.FacilityCode.FACILITY_LEAP = 2164 -> PInvoke.HResult.FacilityCode' is part of the declared API, but is either not public or could not be found [C:\Repos\BinToss\pinvoke\src\Windows.Core\Windows.Core.csproj]
  Windows.Core -> C:\Repos\BinToss\pinvoke\bin\Debug\net45\PInvoke.Windows.Core.dll

Build succeeded.

C:\Repos\BinToss\pinvoke\src\Windows.Core\HResult+FacilityCode.cs(90,13): warning RS0016: Symbol 'FACILITY_LEAP' is not part of the declared API. [C:\Repos\BinToss\pinvoke\src\Windows.Core\Windows.Core.csproj]
C:\Repos\BinToss\pinvoke\src\Windows.Core\HResult+FacilityCode.cs(137,13): warning RS0016: Symbol 'FACILITY_AUDIOSTREAMING' is not part of the declared API. [C:\Repos\BinToss\pinvoke\src\Windows.Core\Windows.Core.csproj]
C:\Repos\BinToss\pinvoke\src\Windows.Core\PublicAPI.Shipped.txt(34,1): warning RS0017: Symbol 'PInvoke.HResult.FacilityCode.FACILITY_AUDIOSTREAMING = 1096 -> PInvoke.HResult.FacilityCode' is part of the declared API, but is either not public or could not be found [C:\Repos\BinToss\pinvoke\src\Windows.Core\Windows.Core.csproj]
C:\Repos\BinToss\pinvoke\src\Windows.Core\PublicAPI.Shipped.txt(82,1): warning RS0017: Symbol 'PInvoke.HResult.FacilityCode.FACILITY_LEAP = 2164 -> PInvoke.HResult.FacilityCode' is part of the declared API, but is either not public or could not be found [C:\Repos\BinToss\pinvoke\src\Windows.Core\Windows.Core.csproj]
    4 Warning(s)
    0 Error(s)

Time Elapsed 00:00:01.66
AArnott commented 2 years ago

Thanks. In 5265f77a9e5cd2 you introduced the remaining build warnings by adding FACILITY_AUDIOSTREAMING = 1094 in the .cs file but FACILITY_AUDIOSTREAMING = 1096 in the .txt file (note the different ordinal values). Similar issue with FACILITY_LEAP. Easy fix though. Thank you very much for your contribution.