Added the GetConsoleScreenBufferInfo function.
This commit is contained in:
parent
e9b915dec5
commit
aa0d04b094
@ -4,7 +4,7 @@ internal static partial class Kernel32
|
|||||||
{
|
{
|
||||||
[LibraryImport("kernel32.dll", SetLastError = true)]
|
[LibraryImport("kernel32.dll", SetLastError = true)]
|
||||||
[return: MarshalAs(UnmanagedType.Bool)]
|
[return: MarshalAs(UnmanagedType.Bool)]
|
||||||
public static partial bool GetConsoleScreenBufferInfo(nint hConsoleOutput);
|
public static partial bool GetConsoleScreenBufferInfo(nint hConsoleOutput, out ConsoleScreenBufferInfo lpConsoleScreenBufferInfo);
|
||||||
|
|
||||||
[LibraryImport("kernel32.dll", SetLastError = true)]
|
[LibraryImport("kernel32.dll", SetLastError = true)]
|
||||||
public static partial uint GetFinalPathNameByHandleA(nint hFile, [MarshalAs(UnmanagedType.LPTStr)] string lpszFilePath,
|
public static partial uint GetFinalPathNameByHandleA(nint hFile, [MarshalAs(UnmanagedType.LPTStr)] string lpszFilePath,
|
||||||
|
|||||||
@ -1,6 +1,15 @@
|
|||||||
namespace SrcMod.Shell.Interop.ObjectModels;
|
namespace SrcMod.Shell.Interop.ObjectModels;
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
internal struct ConsoleScreenBufferInfo
|
internal struct ConsoleScreenBufferInfo
|
||||||
{
|
{
|
||||||
|
[MarshalAs(UnmanagedType.LPStruct)]
|
||||||
|
public Coord dwSize;
|
||||||
|
[MarshalAs(UnmanagedType.LPStruct)]
|
||||||
|
public Coord dwCursorPosition;
|
||||||
|
public int wAttributes;
|
||||||
|
[MarshalAs(UnmanagedType.LPStruct)]
|
||||||
|
public SmallRect srWindow;
|
||||||
|
[MarshalAs(UnmanagedType.LPStruct)]
|
||||||
|
public Coord dwMaximumWindowSize;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
namespace SrcMod.Shell.Interop.ObjectModels;
|
namespace SrcMod.Shell.Interop.ObjectModels;
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
internal struct Coord
|
internal struct Coord
|
||||||
{
|
{
|
||||||
|
public short X;
|
||||||
|
public short Y;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
namespace SrcMod.Shell.Interop.ObjectModels;
|
namespace SrcMod.Shell.Interop.ObjectModels;
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
internal struct SmallRect
|
internal struct SmallRect
|
||||||
{
|
{
|
||||||
|
public short Left;
|
||||||
|
public short Top;
|
||||||
|
public short Right;
|
||||||
|
public short Bottom;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,7 @@ global using SharpCompress.Archives.SevenZip;
|
|||||||
global using SharpCompress.Readers;
|
global using SharpCompress.Readers;
|
||||||
global using SrcMod.Shell.Extensions;
|
global using SrcMod.Shell.Extensions;
|
||||||
global using SrcMod.Shell.Interop;
|
global using SrcMod.Shell.Interop;
|
||||||
|
global using SrcMod.Shell.Interop.ObjectModels;
|
||||||
global using SrcMod.Shell.Modules;
|
global using SrcMod.Shell.Modules;
|
||||||
global using SrcMod.Shell.Modules.ObjectModels;
|
global using SrcMod.Shell.Modules.ObjectModels;
|
||||||
global using SrcMod.Shell.ObjectModels;
|
global using SrcMod.Shell.ObjectModels;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user