CommonLibSSE (Parapets fork)
SKSE::WinAPI Namespace Reference

Namespaces

 DBT
 

Classes

struct  CRITICAL_SECTION
 
struct  _FILETIME
 
struct  _WIN32_FIND_DATAA
 
struct  SECURITY_ATTRIBUTES
 
struct  HandleCloser
 
struct  _GUID
 
struct  _DEV_BROADCAST_HDR
 
struct  _DEV_BROADCAST_DEVICEINTERFACE_A
 
struct  DEVICE_NOTIFY
 
struct  DeviceNotifyCloser
 

Typedefs

using FILETIME = _FILETIME
 
using HWND = HWND__ *
 
using HINSTANCE = HINSTANCE__ *
 
using WIN32_FIND_DATAA = _WIN32_FIND_DATAA
 
using WNDPROC = std::intptr_t(*)(HWND, std::uint32_t, std::uintptr_t, std::intptr_t)
 
using GWL = GetWindowLongIndex
 
using ScopedHandle = std::unique_ptr< void, HandleCloser >
 
using GUID = _GUID
 
using IID = GUID
 
using REFIID = const IID &
 
using CLSID = GUID
 
using REFCLSID = const IID &
 
using DEV_BROADCAST_HDR = _DEV_BROADCAST_HDR
 
using DEV_BROADCAST_DEVICEINTERFACE_A = _DEV_BROADCAST_DEVICEINTERFACE_A
 
using DEV_BROADCAST_DEVICEINTERFACE = DEV_BROADCAST_DEVICEINTERFACE_A
 
using ScopedDeviceNotify = std::unique_ptr< void, DeviceNotifyCloser >
 

Enumerations

enum class  GetWindowLongIndex {
  EXSTYLE = -20 , HINSTANCE = -6 , HWNDPARENT = -8 , ID = -12 ,
  STYLE = -16 , USERDATA = -21 , WNDPROC = -4
}
 

Functions

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)
 
ScopedHandle CreateEventEx (SECURITY_ATTRIBUTES *a_eventAttributes, char *a_name, std::uint32_t a_flags, std::uint32_t a_desiredAccess)
 
ScopedHandle CreateEventEx (SECURITY_ATTRIBUTES *a_eventAttributes, wchar_t *a_name, std::uint32_t a_flags, std::uint32_t a_desiredAccess)
 
void * GetCurrentModule () noexcept
 
void * GetCurrentProcess () noexcept
 
std::uint32_t GetCurrentThreadID () noexcept
 
std::uint32_t GetEnvironmentVariable (const char *a_name, char *a_buffer, std::uint32_t a_size) noexcept
 
std::uint32_t GetEnvironmentVariable (const wchar_t *a_name, wchar_t *a_buffer, std::uint32_t a_size) noexcept
 
bool GetFileVersionInfo (const char *a_filename, std::uint32_t a_handle, std::uint32_t a_len, void *a_data) noexcept
 
bool GetFileVersionInfo (const wchar_t *a_filename, std::uint32_t a_handle, std::uint32_t a_len, void *a_data) noexcept
 
std::uint32_t GetFileVersionInfoSize (const char *a_filename, std::uint32_t *a_handle) noexcept
 
std::uint32_t GetFileVersionInfoSize (const wchar_t *a_filename, std::uint32_t *a_handle) noexcept
 
std::size_t GetMaxPath () noexcept
 
std::uint32_t GetModuleFileName (void *a_module, char *a_filename, std::uint32_t a_size) noexcept
 
std::uint32_t GetModuleFileName (void *a_module, wchar_t *a_filename, std::uint32_t a_size) noexcept
 
void * GetModuleHandle (const char *a_moduleName) noexcept
 
void * GetModuleHandle (const wchar_t *a_moduleName) noexcept
 
void * GetProcAddress (void *a_module, const char *a_procName) noexcept
 
std::intptr_t GetWindowLongPtr (HWND a_wnd, GetWindowLongIndex a_index) noexcept
 
std::int32_t MessageBox (void *a_wnd, const char *a_text, const char *a_caption, unsigned int a_type) noexcept
 
std::int32_t MessageBox (void *a_wnd, const wchar_t *a_text, const wchar_t *a_caption, unsigned int a_type) noexcept
 
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)
 
void OutputDebugString (const char *a_outputString) noexcept
 
void OutputDebugString (const wchar_t *a_outputString) noexcept
 
ScopedDeviceNotify RegisterDeviceNotification (void *a_recipient, void *a_notificationFilter, std::uint32_t a_flags) noexcept
 
bool SetEvent (ScopedHandle &a_event) noexcept
 
std::intptr_t SetWindowLongPtr (HWND a_wnd, GetWindowLongIndex a_index, std::intptr_t a_newLong) noexcept
 
void * SetWindowLongPtr (HWND a_wnd, GetWindowLongIndex a_index, void *a_newLong) noexcept
 
void TerminateProcess (void *a_process, unsigned int a_exitCode) noexcept
 
void * TlsGetValue (std::uint32_t a_tlsIndex) noexcept
 
bool TlsSetValue (std::uint32_t a_tlsIndex, void *a_tlsValue) noexcept
 
bool VirtualFree (void *a_address, std::size_t a_size, std::uint32_t a_freeType) noexcept
 
bool VerQueryValue (const void *a_block, const char *a_subBlock, void **a_buffer, unsigned int *a_len) noexcept
 
bool VerQueryValue (const void *a_block, const wchar_t *a_subBlock, void **a_buffer, unsigned int *a_len) noexcept
 
bool VirtualProtect (void *a_address, std::size_t a_size, std::uint32_t a_newProtect, std::uint32_t *a_oldProtect) noexcept
 
std::uint32_t WaitForMultipleObjectsEx (std::span< void *const > a_handles, bool a_waitAll, std::uint32_t a_milliseconds, bool a_alertable)
 
std::uint32_t WaitForSingleObjectEx (ScopedHandle &a_handle, std::uint32_t a_milliseconds, bool a_alertable) noexcept
 
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)
 

Variables

constexpr auto CP_UTF8 { static_cast<unsigned int>(65001) }
 
constexpr auto IMAGE_SCN_MEM_EXECUTE { static_cast<std::uint32_t>(0x20000000) }
 
constexpr auto IMAGE_SCN_MEM_WRITE { static_cast<std::uint32_t>(0x80000000) }
 
const auto INVALID_HANDLE_VALUE { reinterpret_cast<void*>(static_cast<std::intptr_t>(-1)) }
 
constexpr auto MAX_PATH { static_cast<std::uint32_t>(260) }
 
constexpr auto MEM_RELEASE { static_cast<std::uint32_t>(0x00008000) }
 
constexpr auto PAGE_EXECUTE_READWRITE { static_cast<std::uint32_t>(0x40) }
 

Typedef Documentation

◆ CLSID

using SKSE::WinAPI::CLSID = typedef GUID

◆ DEV_BROADCAST_DEVICEINTERFACE

◆ DEV_BROADCAST_DEVICEINTERFACE_A

◆ DEV_BROADCAST_HDR

◆ FILETIME

◆ GUID

using SKSE::WinAPI::GUID = typedef _GUID

◆ GWL

◆ HINSTANCE

using SKSE::WinAPI::HINSTANCE = typedef HINSTANCE__*

◆ HWND

using SKSE::WinAPI::HWND = typedef HWND__*

◆ IID

using SKSE::WinAPI::IID = typedef GUID

◆ REFCLSID

using SKSE::WinAPI::REFCLSID = typedef const IID&

◆ REFIID

using SKSE::WinAPI::REFIID = typedef const IID&

◆ ScopedDeviceNotify

using SKSE::WinAPI::ScopedDeviceNotify = typedef std::unique_ptr<void, DeviceNotifyCloser>

◆ ScopedHandle

using SKSE::WinAPI::ScopedHandle = typedef std::unique_ptr<void, HandleCloser>

◆ WIN32_FIND_DATAA

◆ WNDPROC

using SKSE::WinAPI::WNDPROC = typedef std::intptr_t (*)(HWND, std::uint32_t, std::uintptr_t, std::intptr_t)

Enumeration Type Documentation

◆ GetWindowLongIndex

Enumerator
EXSTYLE 
HINSTANCE 
HWNDPARENT 
ID 
STYLE 
USERDATA 
WNDPROC 

Function Documentation

◆ CallWindowProc()

std::intptr_t SKSE::WinAPI::CallWindowProc ( WNDPROC  a_prevWndFunc,
void *  a_wnd,
std::uint32_t  a_msg,
std::uintptr_t  a_wParam,
std::intptr_t  a_lParam 
)

◆ CreateEventEx() [1/2]

ScopedHandle SKSE::WinAPI::CreateEventEx ( SECURITY_ATTRIBUTES a_eventAttributes,
char *  a_name,
std::uint32_t  a_flags,
std::uint32_t  a_desiredAccess 
)

◆ CreateEventEx() [2/2]

ScopedHandle SKSE::WinAPI::CreateEventEx ( SECURITY_ATTRIBUTES a_eventAttributes,
wchar_t *  a_name,
std::uint32_t  a_flags,
std::uint32_t  a_desiredAccess 
)

◆ GetCurrentModule()

void* SKSE::WinAPI::GetCurrentModule ( )
noexcept

◆ GetCurrentProcess()

void* SKSE::WinAPI::GetCurrentProcess ( )
noexcept

◆ GetCurrentThreadID()

std::uint32_t SKSE::WinAPI::GetCurrentThreadID ( )
noexcept

◆ GetEnvironmentVariable() [1/2]

std::uint32_t SKSE::WinAPI::GetEnvironmentVariable ( const char *  a_name,
char *  a_buffer,
std::uint32_t  a_size 
)
noexcept

◆ GetEnvironmentVariable() [2/2]

std::uint32_t SKSE::WinAPI::GetEnvironmentVariable ( const wchar_t *  a_name,
wchar_t *  a_buffer,
std::uint32_t  a_size 
)
noexcept

◆ GetFileVersionInfo() [1/2]

bool SKSE::WinAPI::GetFileVersionInfo ( const char *  a_filename,
std::uint32_t  a_handle,
std::uint32_t  a_len,
void *  a_data 
)
noexcept

◆ GetFileVersionInfo() [2/2]

bool SKSE::WinAPI::GetFileVersionInfo ( const wchar_t *  a_filename,
std::uint32_t  a_handle,
std::uint32_t  a_len,
void *  a_data 
)
noexcept

◆ GetFileVersionInfoSize() [1/2]

std::uint32_t SKSE::WinAPI::GetFileVersionInfoSize ( const char *  a_filename,
std::uint32_t *  a_handle 
)
noexcept

◆ GetFileVersionInfoSize() [2/2]

std::uint32_t SKSE::WinAPI::GetFileVersionInfoSize ( const wchar_t *  a_filename,
std::uint32_t *  a_handle 
)
noexcept

◆ GetMaxPath()

std::size_t SKSE::WinAPI::GetMaxPath ( )
noexcept

◆ GetModuleFileName() [1/2]

std::uint32_t SKSE::WinAPI::GetModuleFileName ( void *  a_module,
char *  a_filename,
std::uint32_t  a_size 
)
noexcept

◆ GetModuleFileName() [2/2]

std::uint32_t SKSE::WinAPI::GetModuleFileName ( void *  a_module,
wchar_t *  a_filename,
std::uint32_t  a_size 
)
noexcept

◆ GetModuleHandle() [1/2]

void* SKSE::WinAPI::GetModuleHandle ( const char *  a_moduleName)
noexcept

◆ GetModuleHandle() [2/2]

void* SKSE::WinAPI::GetModuleHandle ( const wchar_t *  a_moduleName)
noexcept

◆ GetProcAddress()

void* SKSE::WinAPI::GetProcAddress ( void *  a_module,
const char *  a_procName 
)
noexcept

◆ GetWindowLongPtr()

std::intptr_t SKSE::WinAPI::GetWindowLongPtr ( HWND  a_wnd,
GetWindowLongIndex  a_index 
)
noexcept

◆ MessageBox() [1/2]

std::int32_t SKSE::WinAPI::MessageBox ( void *  a_wnd,
const char *  a_text,
const char *  a_caption,
unsigned int  a_type 
)
noexcept

◆ MessageBox() [2/2]

std::int32_t SKSE::WinAPI::MessageBox ( void *  a_wnd,
const wchar_t *  a_text,
const wchar_t *  a_caption,
unsigned int  a_type 
)
noexcept

◆ MultiByteToWideChar()

int SKSE::WinAPI::MultiByteToWideChar ( unsigned int  a_codePage,
std::uint32_t  a_flags,
const char *  a_multiByteStr,
int  a_multiByte,
wchar_t *  a_wideCharStr,
int  a_wideChar 
)

◆ OutputDebugString() [1/2]

void SKSE::WinAPI::OutputDebugString ( const char *  a_outputString)
noexcept

◆ OutputDebugString() [2/2]

void SKSE::WinAPI::OutputDebugString ( const wchar_t *  a_outputString)
noexcept

◆ RegisterDeviceNotification()

ScopedDeviceNotify SKSE::WinAPI::RegisterDeviceNotification ( void *  a_recipient,
void *  a_notificationFilter,
std::uint32_t  a_flags 
)
noexcept

◆ SetEvent()

bool SKSE::WinAPI::SetEvent ( ScopedHandle a_event)
noexcept

◆ SetWindowLongPtr() [1/2]

std::intptr_t SKSE::WinAPI::SetWindowLongPtr ( HWND  a_wnd,
GetWindowLongIndex  a_index,
std::intptr_t  a_newLong 
)
noexcept

◆ SetWindowLongPtr() [2/2]

void* SKSE::WinAPI::SetWindowLongPtr ( HWND  a_wnd,
GetWindowLongIndex  a_index,
void *  a_newLong 
)
noexcept

◆ TerminateProcess()

void SKSE::WinAPI::TerminateProcess ( void *  a_process,
unsigned int  a_exitCode 
)
noexcept

◆ TlsGetValue()

void* SKSE::WinAPI::TlsGetValue ( std::uint32_t  a_tlsIndex)
noexcept

◆ TlsSetValue()

bool SKSE::WinAPI::TlsSetValue ( std::uint32_t  a_tlsIndex,
void *  a_tlsValue 
)
noexcept

◆ VerQueryValue() [1/2]

bool SKSE::WinAPI::VerQueryValue ( const void *  a_block,
const char *  a_subBlock,
void **  a_buffer,
unsigned int *  a_len 
)
noexcept

◆ VerQueryValue() [2/2]

bool SKSE::WinAPI::VerQueryValue ( const void *  a_block,
const wchar_t *  a_subBlock,
void **  a_buffer,
unsigned int *  a_len 
)
noexcept

◆ VirtualFree()

bool SKSE::WinAPI::VirtualFree ( void *  a_address,
std::size_t  a_size,
std::uint32_t  a_freeType 
)
noexcept

◆ VirtualProtect()

bool SKSE::WinAPI::VirtualProtect ( void *  a_address,
std::size_t  a_size,
std::uint32_t  a_newProtect,
std::uint32_t *  a_oldProtect 
)
noexcept

◆ WaitForMultipleObjectsEx()

std::uint32_t SKSE::WinAPI::WaitForMultipleObjectsEx ( std::span< void *const >  a_handles,
bool  a_waitAll,
std::uint32_t  a_milliseconds,
bool  a_alertable 
)

◆ WaitForSingleObjectEx()

std::uint32_t SKSE::WinAPI::WaitForSingleObjectEx ( ScopedHandle a_handle,
std::uint32_t  a_milliseconds,
bool  a_alertable 
)
noexcept

◆ WideCharToMultiByte()

int SKSE::WinAPI::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 
)

Variable Documentation

◆ CP_UTF8

constexpr auto SKSE::WinAPI::CP_UTF8 { static_cast<unsigned int>(65001) }
inlineconstexpr

◆ IMAGE_SCN_MEM_EXECUTE

constexpr auto SKSE::WinAPI::IMAGE_SCN_MEM_EXECUTE { static_cast<std::uint32_t>(0x20000000) }
inlineconstexpr

◆ IMAGE_SCN_MEM_WRITE

constexpr auto SKSE::WinAPI::IMAGE_SCN_MEM_WRITE { static_cast<std::uint32_t>(0x80000000) }
inlineconstexpr

◆ INVALID_HANDLE_VALUE

const auto SKSE::WinAPI::INVALID_HANDLE_VALUE { reinterpret_cast<void*>(static_cast<std::intptr_t>(-1)) }
inline

◆ MAX_PATH

constexpr auto SKSE::WinAPI::MAX_PATH { static_cast<std::uint32_t>(260) }
inlineconstexpr

◆ MEM_RELEASE

constexpr auto SKSE::WinAPI::MEM_RELEASE { static_cast<std::uint32_t>(0x00008000) }
inlineconstexpr

◆ PAGE_EXECUTE_READWRITE

constexpr auto SKSE::WinAPI::PAGE_EXECUTE_READWRITE { static_cast<std::uint32_t>(0x40) }
inlineconstexpr