public unsafe SECURITY_QUALITY_OF_SERVICE(ImpersonationLevel impersonationLevel, ContextTrackingMode contextTrackingMode, bool effectiveOnly)
 {
     Length              = (uint)sizeof(SECURITY_QUALITY_OF_SERVICE);
     ImpersonationLevel  = impersonationLevel;
     ContextTrackingMode = contextTrackingMode;
     EffectiveOnly       = effectiveOnly ? BOOLEAN.TRUE : BOOLEAN.FALSE;
 }
Esempio n. 2
0
 public static extern NTSTATUS NtQueryDirectoryObject(
     DirectoryObjectHandle DirectoryHandle,
     SafeHandle Buffer,
     uint Length,
     BOOLEAN ReturnSingleEntry,
     BOOLEAN RestartScan,
     ref uint Context,
     out uint ReturnLength);
 public static unsafe extern int NtQueryDirectoryFile(
     IntPtr FileHandle,
     IntPtr Event,
     IntPtr ApcRoutine,
     IntPtr ApcContext,
     IO_STATUS_BLOCK *IoStatusBlock,
     IntPtr FileInformation,
     uint Length,
     FILE_INFORMATION_CLASS FileInformationClass,
     BOOLEAN ReturnSingleEntry,
     UNICODE_STRING *FileName,
     BOOLEAN RestartScan);
Esempio n. 4
0
 public unsafe static extern NTSTATUS NtQueryDirectoryFile(
     SafeFileHandle FileHandle,
     IntPtr Event,
     AsyncProcedureCall ApcRoutine,
     IntPtr ApcContext,
     out IO_STATUS_BLOCK IoStatusBlock,
     void *FileInformation,
     uint Length,
     FileInformationClass FileInformationClass,
     BOOLEAN ReturnSingleEntry,
     UNICODE_STRING *FileName,
     BOOLEAN RestartScan);
Esempio n. 5
0
        public void BOOLEANConversion()
        {
            BOOLEAN B = true;

            (B == true).Should().BeTrue("Comparison of TRUE with true is true");
            (B == false).Should().BeFalse("Comparison of TRUE with false is false");
            B.IsTrue.Should().BeTrue("IsTrue should be true when true");
            B.IsFalse.Should().BeFalse("IsFalse should be false when true");
            bool b = B;

            b.Should().BeTrue("assignment is true");
            b = false;
            B = b;
            (B == true).Should().BeFalse("Comparison of FALSE with true is false");
            (B == false).Should().BeTrue("Comparison of FALSE with false is true");
            B.IsTrue.Should().BeFalse("IsTrue should be false when false");
            B.IsFalse.Should().BeTrue("IsFalse should be true when False");
        }
Esempio n. 6
0
 public unsafe static extern BOOLEAN RtlIsNameInExpression(
     UNICODE_STRING *Expression,
     UNICODE_STRING *Name,
     BOOLEAN IgnoreCase,
     IntPtr UpcaseTable);
Esempio n. 7
0
 public static extern BOOLEAN SetSuspendState(BOOLEAN bHibernate, BOOLEAN bForce, BOOLEAN bWakeupEventsDisabled);
Esempio n. 8
0
 public static bool IsFalse(this BOOLEAN b) => b == BOOLEAN.FALSE;
Esempio n. 9
0
 public static bool IsTrue(this BOOLEAN b) => b != BOOLEAN.FALSE;
Esempio n. 10
0
 /// <summary>
 /// Конвертирует значение BOOLEAN в массив байтов
 /// </summary>
 /// <param name="Value">Значение</param>
 /// <returns></returns>
 public static byte[] ToBytes(BOOLEAN Value) => BitConverter.GetBytes(Value);
Esempio n. 11
0
        public static async void DownloadFileAsync(string TypeFile, string Company, string SubFolder, BOOLEAN FileDialog, ButtonWpf ButtonWpf, TypeFile TypeFileEnum, bool Run, params string[] FileName)
        {
            Request Request = new Request("http://wolf.wolfproject.ru/UIUser/Download/")
            {
                ["login"]     = Login,
                ["password"]  = Password,
                ["keyaccess"] = KeyAccess,
                ["typefile"]  = TypeFile,
                ["company"]   = Company,
                ["subfolder"] = SubFolder
            };

            string GetRespone = await Request.GetResponeAsync();

            string Path(string GetFile) => TypeFile + "/" + Company + "/" + SubFolder + "/" + GetFile;
            string PathFileInfo(string GetFile) => TypeFile + "/" + Company + "/" + SubFolder + "/" + GetFile + ".info";

            string PathDirectory = TypeFile + "/" + Company + "/" + SubFolder;

            using WebClient WebClient = new WebClient();

            if (GetRespone != "False")
            {
                if (!Directory.Exists(PathDirectory))
                {
                    Directory.CreateDirectory(PathDirectory);
                }

                ButtonWpf.Content   = "Загружается";
                ButtonWpf.IsEnabled = false;

                DownloadFileInfo(GetRespone, SubFolder, PathFileInfo(SubFolder), WebClient);

                switch (TypeFileEnum)
                {
                case Enum.TypeFile.Library:
                    if (FileDialog)
                    {
                        using (SaveFileDialog SaveFile = new SaveFileDialog
                        {
                            Title = "Сохранить файл",
                            FileName = FileName[0],
                            Filter = "Все файлы (*.*) | *.*"
                        })
                        {
                            if (SaveFile.ShowDialog() == DialogResult.OK)
                            {
                                await WebClient.DownloadFileTaskAsync(new Uri(GetRespone + "/" + FileName[0]), SaveFile.FileName);
                            }
                        }
                    }
                    else
                    {
                        await WebClient.DownloadFileTaskAsync(new Uri(GetRespone + "/" + FileName[0]), Path(FileName[0]));

                        if (Run)
                        {
                            Process.Start(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86) + @"\" + PathDirectory);
                        }
                    }

                    ButtonWpf.Content   = "Скачать";
                    ButtonWpf.IsEnabled = true;
                    break;

                case Enum.TypeFile.Hack:
                    if (!HMemory.IsProcessActive(FileName[0]))
                    {
                        foreach (var GetFile in FileName)
                        {
                            await WebClient.DownloadFileTaskAsync(new Uri(GetRespone + "/" + GetFile), Path(GetFile));
                        }

                        Process.Start(Path(FileName[0]));
                    }
                    else
                    {
                        MessageBox.Show("Процесс уже запущен!", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }

                    ButtonWpf.Content   = "Запустить";
                    ButtonWpf.IsEnabled = true;
                    break;
                }
            }
        }
Esempio n. 12
0
 public static unsafe extern NTSTATUS RtlUpcaseUnicodeString(
     UNICODE_STRING *DestinationString,
     UNICODE_STRING *SourceString,
     BOOLEAN AllocateDestinationString);
Esempio n. 13
0
 public static extern IntPtr OpenProcess(ProcessAccess dwDesiredAccess, BOOLEAN bInheritHandle, DWORD dwProcessId);