1
0
mirror of https://github.com/mastercodeon314/KsDumper-11.git synced 2024-11-28 00:10:52 +01:00
KsDumper-11/DriverInterface/Operations.cs

41 lines
1.1 KiB
C#
Raw Permalink Normal View History

using System;
2023-01-22 02:32:57 +01:00
using KsDumper11.Utility;
2023-01-23 05:06:08 +01:00
using static KsDumper11.Utility.WinApi;
2023-01-22 02:32:57 +01:00
namespace KsDumper11.Driver
{
public static class Operations
{
private static uint CTL_CODE(int deviceType, int function, int method, int access)
{
return (uint)((deviceType << 16) | (access << 14) | (function << 2) | method);
}
public static readonly uint IO_GET_PROCESS_LIST = Operations.CTL_CODE(WinApi.FILE_DEVICE_UNKNOWN, 5924, WinApi.METHOD_BUFFERED, WinApi.FILE_ANY_ACCESS);
public static readonly uint IO_COPY_MEMORY = Operations.CTL_CODE(WinApi.FILE_DEVICE_UNKNOWN, 5925, WinApi.METHOD_BUFFERED, WinApi.FILE_ANY_ACCESS);
2023-01-23 05:06:08 +01:00
public static readonly uint IO_UNLOAD_DRIVER = CTL_CODE(FILE_DEVICE_UNKNOWN, 0x1726, METHOD_BUFFERED, FILE_ANY_ACCESS);
public struct KERNEL_PROCESS_LIST_OPERATION
{
public ulong bufferAddress;
public int bufferSize;
public int processCount;
}
public struct KERNEL_COPY_MEMORY_OPERATION
{
public int targetProcessId;
public ulong targetAddress;
public ulong bufferAddress;
public int bufferSize;
}
}
}