internal static ulong LuidToLong(Luid luid) { ulong high = (((ulong)luid.HighPart) << 32); ulong low = (((ulong)luid.LowPart) & 0x00000000FFFFFFFF); return high | low; }
internal static extern bool LookupPrivilegeValue([MarshalAs(UnmanagedType.LPWStr)] string lpSystemName, [MarshalAs(UnmanagedType.LPWStr)] string lpName, out Luid lpLuid);