Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

Commit

Permalink
More test and product fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AArnott committed Sep 10, 2022
1 parent 6553e58 commit ce2d380
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Windows.Core.Tests/NTStatusFacts.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © .NET Foundation and Contributors. All rights reserved.
// Copyright © .NET Foundation and Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
Expand Down Expand Up @@ -139,7 +139,7 @@ public void EqualOperators()
[Fact]
public void Severity()
{
Assert.Equal((NTSTATUS.SeverityCode)0xc, new NTSTATUS(0xffffffff).Severity);
Assert.Equal((NTSTATUS.SeverityCode)0x3, new NTSTATUS(0xffffffff).Severity);
}

[Fact]
Expand Down
2 changes: 1 addition & 1 deletion src/Windows.Core/HResult+FacilityCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public enum FacilityCode : uint
FACILITY_ACTION_QUEUE = 44,
FACILITY_ACS = 20,
FACILITY_AAF = 18,
FACILITY_NT_BIT = 4096,
FACILITY_NT_BIT = 0x10000000,
}
}
}
2 changes: 1 addition & 1 deletion src/Windows.Core/PInvokeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static HResult ToHResult(this Win32ErrorCode error)
// (HRESULT)(x) <= 0 ? (HRESULT)(x) : (HRESULT) (((x) & 0x0000FFFF) | (FACILITY_WIN32 << 16) | 0x80000000)
return error <= 0
? (HResult)(int)error
: (HResult)(int)(((int)error & 0x0000ffff) | ((int)FACILITY_WIN32 /*<< 16*/) | 0x80000000);
: (HResult)(int)(((int)error & 0x0000ffff) | ((int)FACILITY_WIN32 << 16) | 0x80000000);
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Windows.Core/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ PInvoke.HResult.FacilityCode.FACILITY_MOBILE = 1793 -> PInvoke.HResult.FacilityC
PInvoke.HResult.FacilityCode.FACILITY_MSMQ = 14 -> PInvoke.HResult.FacilityCode
PInvoke.HResult.FacilityCode.FACILITY_NAP = 39 -> PInvoke.HResult.FacilityCode
PInvoke.HResult.FacilityCode.FACILITY_NDIS = 52 -> PInvoke.HResult.FacilityCode
PInvoke.HResult.FacilityCode.FACILITY_NT_BIT = 4096 -> PInvoke.HResult.FacilityCode
PInvoke.HResult.FacilityCode.FACILITY_NT_BIT = 268435456 -> PInvoke.HResult.FacilityCode
PInvoke.HResult.FacilityCode.FACILITY_NULL = 0 -> PInvoke.HResult.FacilityCode
PInvoke.HResult.FacilityCode.FACILITY_ONLINE_ID = 134 -> PInvoke.HResult.FacilityCode
PInvoke.HResult.FacilityCode.FACILITY_OPC = 81 -> PInvoke.HResult.FacilityCode
Expand Down

0 comments on commit ce2d380

Please sign in to comment.