Initial commit

This commit is contained in:
a2x
2023-09-08 17:59:09 +10:00
commit 743cfc3026
64 changed files with 39104 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>;
}