mirror-ac/test/cli/driver.h

38 lines
557 B
C
Raw Normal View History

2023-11-01 10:48:14 +01:00
#pragma once
#include <string>
#include <iostream>
#include <Windows.h>
class DriverInterface
{
HANDLE driver_handle;
bool validate_process_name()
{
}
public:
DriverInterface(std::string& process_name)
{
this->driver_handle = CreateFileW(
L"donna-ac-test",
GENERIC_WRITE | GENERIC_READ | GENERIC_EXECUTE,
0,
0,
OPEN_EXISTING,
FILE_ATTRIBUTE_SYSTEM | FILE_FLAG_OVERLAPPED,
0
);
if (this->driver_handle == INVALID_HANDLE_VALUE)
{
std::cerr << "Failed to open handle to driver" << std::endl;
return;
}
}
};