KernelCommunication/TestDrvice/TestDrvice.h

16 lines
425 B
C++

#pragma once
#include <iostream>
#include <cstdlib>
#include <Windows.h>
#include "../KernelCommunication/ioctl.h"
#include <memory>
#include <thread>
using unique_handle = std::unique_ptr<
std::remove_pointer_t<HANDLE>, // 类型为 void
BOOL(WINAPI*)(HANDLE) // 函数指针类型
>;
unique_handle make_unique_handle(HANDLE h = INVALID_HANDLE_VALUE) {
return unique_handle(h, &CloseHandle);
}