Initial commit

This commit is contained in:
a2x
2023-09-03 02:05:12 +10:00
commit b0663402c5
40 changed files with 21539 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
#pragma once
#define _AMD64_
#include <memory>
#include <handleapi.h>
namespace base {
namespace detail {
struct HandleDisposer {
using pointer = HANDLE;
void operator()(const HANDLE handle) const noexcept {
if (handle != nullptr && handle != INVALID_HANDLE_VALUE)
CloseHandle(handle);
}
};
}
using SafeHandle = std::unique_ptr<HANDLE, detail::HandleDisposer>;
}