47 ProcessId(
const HANDLE hProcess = ::GetCurrentProcess());
66 PidOf(std::wstring_view
const targetProcessName) -> Result<std::vector<u32>>;
106 std::tuple<u32, u32, u32>
117 Result<std::shared_ptr<T>>
118 Query(SYSTEM_INFORMATION_CLASS SystemInformationClass)
120 auto res = details::QueryInternal(SystemInformationClass,
sizeof(T));
126 const auto p =
reinterpret_cast<T*
>(Value(res));
127 auto deleter = [](T* x)
131 return Ok(std::shared_ptr<T>(p, deleter));
142 Result<std::tuple<u8, u8, u8, u8, u8>>
151 Result<std::vector<RTL_PROCESS_MODULE_INFORMATION>>
160 Result<std::vector<SYSTEM_HANDLE_TABLE_ENTRY_INFO>>
169 Result<std::vector<std::tuple<u32, u32>>>
Result< std::shared_ptr< T > > Query(SYSTEM_INFORMATION_CLASS SystemInformationClass)
Query system information.
Definition: System.hpp:118
Result< std::wstring > ModuleName(HMODULE hModule)
Result< std::wstring > UserName()
Result< std::vector< std::tuple< u32, u32 > > > Threads()
Enumerate all {ProcessId, ThreadId} currently running.
Result< std::vector< RTL_PROCESS_MODULE_INFORMATION > > Modules()
Get the kernel modules.
Result< std::tuple< u8, u8, u8, u8, u8 > > ProcessorCount()
Retrieves the system number of processors and their cache.
Result< std::wstring > FileName()
const std::wstring ComputerName()
std::tuple< u32, u32, u32 > WindowsVersion()
Get the Windows version as a tuple of int, or raise an exception.
auto PageSize() -> u32
Get the page size of the targeted system.
Result< PVOID > QueryInternal(const SYSTEM_INFORMATION_CLASS, const usize)
Should not be called directly.
Result< std::vector< SYSTEM_HANDLE_TABLE_ENTRY_INFO > > Handles()
Enumerate all the system handles.
auto ParentProcessId(const u32 dwProcessId) -> Result< u32 >
u32 ProcessId(const HANDLE hProcess=::GetCurrentProcess())
auto PidOf(std::wstring_view const targetProcessName) -> Result< std::vector< u32 >>