5 inline constexpr
auto CP_UTF8{
static_cast<unsigned int>(65001) };
9 inline constexpr
auto MAX_PATH{
static_cast<std::uint32_t
>(260) };
10 inline constexpr
auto MEM_RELEASE{
static_cast<std::uint32_t
>(0x00008000) };
60 using WNDPROC = std::intptr_t (*)(
HWND, std::uint32_t, std::uintptr_t, std::intptr_t);
99 static_assert(
sizeof(
_GUID) == 0x10);
174 std::uintptr_t a_wParam,
175 std::intptr_t a_lParam);
180 std::uint32_t a_flags,
181 std::uint32_t a_desiredAccess);
186 std::uint32_t a_flags,
187 std::uint32_t a_desiredAccess);
198 std::uint32_t a_size) noexcept;
201 const
wchar_t* a_name,
203 std::uint32_t a_size) noexcept;
206 const
char* a_filename,
207 std::uint32_t a_handle,
209 void* a_data) noexcept;
212 const
wchar_t* a_filename,
213 std::uint32_t a_handle,
215 void* a_data) noexcept;
218 const
char* a_filename,
219 std::uint32_t* a_handle) noexcept;
222 const
wchar_t* a_filename,
223 std::uint32_t* a_handle) noexcept;
230 std::uint32_t a_size) noexcept;
235 std::uint32_t a_size) noexcept;
243 const
char* a_procName) noexcept;
252 const
char* a_caption,
253 unsigned int a_type) noexcept;
257 const
wchar_t* a_text,
258 const
wchar_t* a_caption,
259 unsigned int a_type) noexcept;
262 unsigned int a_codePage,
263 std::uint32_t a_flags,
264 const
char* a_multiByteStr,
266 wchar_t* a_wideCharStr,
270 const
char* a_outputString) noexcept;
273 const
wchar_t* a_outputString) noexcept;
277 void* a_notificationFilter,
278 std::uint32_t a_flags) noexcept;
285 std::intptr_t a_newLong) noexcept;
290 void* a_newLong) noexcept;
294 unsigned int a_exitCode) noexcept;
299 std::uint32_t a_tlsIndex,
300 void* a_tlsValue) noexcept;
305 std::uint32_t a_freeType) noexcept;
309 const
char* a_subBlock,
311 unsigned int* a_len) noexcept;
315 const
wchar_t* a_subBlock,
317 unsigned int* a_len) noexcept;
322 std::uint32_t a_newProtect,
323 std::uint32_t* a_oldProtect) noexcept;
326 std::span<
void* const> a_handles,
328 std::uint32_t a_milliseconds,
333 std::uint32_t a_milliseconds,
334 bool a_alertable) noexcept;
337 unsigned int a_codePage,
338 std::uint32_t a_flags,
339 const
wchar_t* a_wideCharStr,
341 char* a_multiByteStr,
343 const
char* a_defaultChar,
344 int* a_usedDefaultChar);
347 namespace
RE::DirectX
Definition: AbsorbEffect.h:6
DeviceChangeMessage
Definition: WinAPI.h:109
@ DEVICEREMOVEPENDING
Definition: WinAPI.h:113
@ DEVICEQUERYREMOVE
Definition: WinAPI.h:111
@ DEVICETYPESPECIFIC
Definition: WinAPI.h:115
@ DEVICEQUERYREMOVEFAILED
Definition: WinAPI.h:112
@ DEVICEREMOVECOMPLETE
Definition: WinAPI.h:114
@ DEVICEARRIVAL
Definition: WinAPI.h:110
DeviceType
Definition: WinAPI.h:119
std::uint32_t GetFileVersionInfoSize(const char *a_filename, std::uint32_t *a_handle) noexcept
std::uint32_t GetEnvironmentVariable(const char *a_name, char *a_buffer, std::uint32_t a_size) noexcept
void * TlsGetValue(std::uint32_t a_tlsIndex) noexcept
bool VirtualProtect(void *a_address, std::size_t a_size, std::uint32_t a_newProtect, std::uint32_t *a_oldProtect) noexcept
GetWindowLongIndex
Definition: WinAPI.h:63
_GUID GUID
Definition: WinAPI.h:100
std::size_t GetMaxPath() noexcept
void OutputDebugString(const char *a_outputString) noexcept
void * GetCurrentModule() noexcept
constexpr auto IMAGE_SCN_MEM_WRITE
Definition: WinAPI.h:7
std::uint32_t GetModuleFileName(void *a_module, char *a_filename, std::uint32_t a_size) noexcept
std::uint32_t GetCurrentThreadID() noexcept
std::uint32_t WaitForSingleObjectEx(ScopedHandle &a_handle, std::uint32_t a_milliseconds, bool a_alertable) noexcept
constexpr auto MEM_RELEASE
Definition: WinAPI.h:10
constexpr auto PAGE_EXECUTE_READWRITE
Definition: WinAPI.h:11
std::intptr_t GetWindowLongPtr(HWND a_wnd, GetWindowLongIndex a_index) noexcept
HWND__ * HWND
Definition: WinAPI.h:37
void * GetModuleHandle(const char *a_moduleName) noexcept
bool TlsSetValue(std::uint32_t a_tlsIndex, void *a_tlsValue) noexcept
std::unique_ptr< void, DeviceNotifyCloser > ScopedDeviceNotify
Definition: WinAPI.h:168
bool GetFileVersionInfo(const char *a_filename, std::uint32_t a_handle, std::uint32_t a_len, void *a_data) noexcept
constexpr auto IMAGE_SCN_MEM_EXECUTE
Definition: WinAPI.h:6
int MultiByteToWideChar(unsigned int a_codePage, std::uint32_t a_flags, const char *a_multiByteStr, int a_multiByte, wchar_t *a_wideCharStr, int a_wideChar)
ScopedDeviceNotify RegisterDeviceNotification(void *a_recipient, void *a_notificationFilter, std::uint32_t a_flags) noexcept
bool VerQueryValue(const void *a_block, const char *a_subBlock, void **a_buffer, unsigned int *a_len) noexcept
std::intptr_t CallWindowProc(WNDPROC a_prevWndFunc, void *a_wnd, std::uint32_t a_msg, std::uintptr_t a_wParam, std::intptr_t a_lParam)
void * GetProcAddress(void *a_module, const char *a_procName) noexcept
bool SetEvent(ScopedHandle &a_event) noexcept
std::int32_t MessageBox(void *a_wnd, const char *a_text, const char *a_caption, unsigned int a_type) noexcept
constexpr auto CP_UTF8
Definition: WinAPI.h:5
const auto INVALID_HANDLE_VALUE
Definition: WinAPI.h:8
HINSTANCE__ * HINSTANCE
Definition: WinAPI.h:40
ScopedHandle CreateEventEx(SECURITY_ATTRIBUTES *a_eventAttributes, char *a_name, std::uint32_t a_flags, std::uint32_t a_desiredAccess)
int WideCharToMultiByte(unsigned int a_codePage, std::uint32_t a_flags, const wchar_t *a_wideCharStr, int a_wideChar, char *a_multiByteStr, int a_multiByte, const char *a_defaultChar, int *a_usedDefaultChar)
_DEV_BROADCAST_DEVICEINTERFACE_A DEV_BROADCAST_DEVICEINTERFACE_A
Definition: WinAPI.h:149
std::unique_ptr< void, HandleCloser > ScopedHandle
Definition: WinAPI.h:87
void * GetCurrentProcess() noexcept
void TerminateProcess(void *a_process, unsigned int a_exitCode) noexcept
std::intptr_t(*)(HWND, std::uint32_t, std::uintptr_t, std::intptr_t) WNDPROC
Definition: WinAPI.h:60
bool VirtualFree(void *a_address, std::size_t a_size, std::uint32_t a_freeType) noexcept
std::uint32_t WaitForMultipleObjectsEx(std::span< void *const > a_handles, bool a_waitAll, std::uint32_t a_milliseconds, bool a_alertable)
constexpr auto MAX_PATH
Definition: WinAPI.h:9
std::intptr_t SetWindowLongPtr(HWND a_wnd, GetWindowLongIndex a_index, std::intptr_t a_newLong) noexcept
Definition: NiBinaryStream.h:94
void * DebugInfo
Definition: WinAPI.h:17
void * LockSemaphore
Definition: WinAPI.h:21
std::uint64_t * SpinCount
Definition: WinAPI.h:22
std::int32_t LockCount
Definition: WinAPI.h:18
std::int32_t RecursionCount
Definition: WinAPI.h:19
void * OwningThread
Definition: WinAPI.h:20
Flags
Definition: WinAPI.h:155
@ ALL_INTERFACE_CLASSES
Definition: WinAPI.h:159
@ WINDOW_HANDLE
Definition: WinAPI.h:156
@ SERVICE_HANDLE
Definition: WinAPI.h:157
void operator()(void *handle) const noexcept
void operator()(void *a_handle) const noexcept
std::int32_t InheritHandle
Definition: WinAPI.h:78
void * SecurityDescriptor
Definition: WinAPI.h:77
std::uint32_t Length
Definition: WinAPI.h:76
char dbcc_name[1]
Definition: WinAPI.h:146
GUID dbcc_classguid
Definition: WinAPI.h:145
std::uint32_t dbcc_reserved
Definition: WinAPI.h:144
DBT::DeviceType dbcc_devicetype
Definition: WinAPI.h:143
std::uint32_t dbcc_size
Definition: WinAPI.h:142
DBT::DeviceType dbch_devicetype
Definition: WinAPI.h:134
std::uint32_t dbch_reserved
Definition: WinAPI.h:135
std::uint32_t dbch_size
Definition: WinAPI.h:133
std::uint32_t dwLowDateTime
Definition: WinAPI.h:30
std::uint32_t dwHighDateTime
Definition: WinAPI.h:31
constexpr auto operator<=>(const _GUID &) const noexcept=default
std::uint16_t Data2
Definition: WinAPI.h:95
std::uint16_t Data3
Definition: WinAPI.h:96
std::uint32_t Data1
Definition: WinAPI.h:94
std::uint8_t Data4[8]
Definition: WinAPI.h:97
std::uint32_t nFileSizeLow
Definition: WinAPI.h:51
char cFileName[MAX_PATH]
Definition: WinAPI.h:54
std::uint32_t dwReserved1
Definition: WinAPI.h:53
std::uint32_t dwFileAttributes
Definition: WinAPI.h:46
std::uint32_t nFileSizeHigh
Definition: WinAPI.h:50
FILETIME ftCreationTime
Definition: WinAPI.h:47
char cAlternateFileName[14]
Definition: WinAPI.h:55
std::uint32_t dwReserved0
Definition: WinAPI.h:52
FILETIME ftLastAccessTime
Definition: WinAPI.h:48
FILETIME ftLastWriteTime
Definition: WinAPI.h:49