diff --git a/PInvoke/Kernel32/WinNT.cs b/PInvoke/Kernel32/WinNT.cs index 1c1df309..125f5cf0 100644 --- a/PInvoke/Kernel32/WinNT.cs +++ b/PInvoke/Kernel32/WinNT.cs @@ -1,6 +1,6 @@ using System; using System.Runtime.InteropServices; -using static Vanara.Extensions.BitHelper; +using Vanara.Extensions; namespace Vanara.PInvoke { @@ -638,36 +638,36 @@ namespace Vanara.PInvoke /// /// The type of segment. This member can be one of the following values: /// - public byte Type { get => (byte)GetBits(Flags, 0, 5); set => SetBits(ref Flags, 0, 5, value); } + public byte Type { get => (byte)Flags.GetBits(0, 5); set => BitHelper.SetBits(ref Flags, 0, 5, value); } /// /// /// The privilege level of the descriptor. This member is an integer value in the range 0 (most privileged) through 3 (least privileged). /// /// - public byte Dpl { get => (byte)GetBits(Flags, 5, 2); set => SetBits(ref Flags, 5, 2, value); } + public byte Dpl { get => (byte)Flags.GetBits(5, 2); set => BitHelper.SetBits(ref Flags, 5, 2, value); } /// /// The present flag. This member is 1 if the segment is present in physical memory or 0 if it is not. /// - public bool Pres { get => GetBit(Flags, 7); set => SetBit(ref Flags, 7, value); } + public bool Pres { get => Flags.GetBit(7); set => BitHelper.SetBit(ref Flags, 7, value); } /// /// The high bits (16–19) of the address of the last byte in the segment. /// - public byte LimitHi { get => (byte)GetBits(Flags, 8, 4); set => SetBits(ref Flags, 8, 4, value); } + public byte LimitHi { get => (byte)Flags.GetBits(8, 4); set => BitHelper.SetBits(ref Flags, 8, 4, value); } /// /// /// The space that is available to system programmers. This member might be used for marking segments in some system-specific way. /// /// - public bool Sys { get => GetBit(Flags, 12); set => SetBit(ref Flags, 12, value); } + public bool Sys { get => Flags.GetBit(12); set => BitHelper.SetBit(ref Flags, 12, value); } /// /// Reserved. /// - public bool Reserved_0 { get => GetBit(Flags, 13); set => SetBit(ref Flags, 13, value); } + public bool Reserved_0 { get => Flags.GetBit(13); set => BitHelper.SetBit(ref Flags, 13, value); } /// /// @@ -678,12 +678,12 @@ namespace Vanara.PInvoke /// If the segment is a code segment, this member contains 1. The segment runs with the default (native mode) instruction set. /// /// - public bool Default_Big { get => GetBit(Flags, 14); set => SetBit(ref Flags, 14, value); } + public bool Default_Big { get => Flags.GetBit(14); set => BitHelper.SetBit(ref Flags, 14, value); } /// /// The granularity. This member contains 0 if the segment is byte granular, 1 if the segment is page granular. /// - public bool Granularity { get => GetBit(Flags, 15); set => SetBit(ref Flags, 15, value); } + public bool Granularity { get => Flags.GetBit(15); set => BitHelper.SetBit(ref Flags, 15, value); } } /// Used by thread context functions.