Added net6 back.

This commit is contained in:
Razmoth
2023-01-07 20:58:12 +04:00
parent 94d73398ca
commit 37f816f800
19 changed files with 219 additions and 225 deletions

View File

@@ -1,23 +1,24 @@
using System.Runtime.InteropServices;
using System;
using System.Runtime.InteropServices;
namespace AssetStudio
{
public static partial class ConsoleHelper
public static class ConsoleHelper
{
[LibraryImport("kernel32.dll", SetLastError = true)]
[DllImport("kernel32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
public static partial bool AllocConsole();
public static extern bool AllocConsole();
[LibraryImport("kernel32.dll", EntryPoint = "SetConsoleTitleA", SetLastError = true, StringMarshalling = StringMarshalling.Utf8)]
[DllImport("kernel32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
public static partial bool SetConsoleTitle(string lpConsoleTitle);
public static extern bool SetConsoleTitle([MarshalAs(UnmanagedType.LPUTF8Str)] string lpConsoleTitle);
[LibraryImport("kernel32.dll", SetLastError = true)]
public static partial nint GetConsoleWindow();
[DllImport("kernel32.dll", SetLastError = true)]
public static extern IntPtr GetConsoleWindow();
[LibraryImport("user32.dll", SetLastError = true)]
[DllImport("user32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
public static partial bool ShowWindow(nint hWnd, int nCmdShow);
public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
public const int SW_HIDE = 0;
public const int SW_SHOW = 5;