HydraHook
Direct3D and Core Audio hooking library for Windows
Loading...
Searching...
No Matches
HydraHook::Core::Util Namespace Reference

Functions

std::string expand_environment_variables (const std::string &str)
 Expands environment variables (e.g. TEMP%) in a string.
std::string process_name ()
 Returns the full path of the current process executable.
std::string get_module_directory (HMODULE hMod)
 Returns the directory containing the given module.
std::string get_process_directory ()
 Returns the directory containing the main process executable.

Function Documentation

◆ expand_environment_variables()

std::string HydraHook::Core::Util::expand_environment_variables ( const std::string & str)
inline

Expands environment variables (e.g. TEMP%) in a string.

Parameters
strInput string possibly containing VAR% placeholders.
Returns
Expanded string. The result does not contain a trailing NUL inside size().

Definition at line 49 of file Global.h.

References expand_environment_variables().

Referenced by DumpDirectoryCandidates(), expand_environment_variables(), and HydraHookEngineCreate().

◆ get_module_directory()

std::string HydraHook::Core::Util::get_module_directory ( HMODULE hMod)
inline

Returns the directory containing the given module.

Parameters
hModModule handle, or NULL for the process executable.
Returns
Directory path with a trailing separator, or empty string on failure.

Definition at line 100 of file Global.h.

References get_module_directory().

Referenced by DumpDirectoryCandidates(), get_module_directory(), get_process_directory(), and HydraHookEngineCreate().

◆ get_process_directory()

std::string HydraHook::Core::Util::get_process_directory ( )
inline

Returns the directory containing the main process executable.

Returns
Directory path (for example C:\Program Files\Game\), or empty string on failure.

Definition at line 129 of file Global.h.

References get_module_directory(), and get_process_directory().

Referenced by DumpDirectoryCandidates(), get_process_directory(), and HydraHookEngineCreate().

◆ process_name()

std::string HydraHook::Core::Util::process_name ( )
inline

Returns the full path of the current process executable.

Returns
Process image path (for example \Device\HarddiskVolume1\...\app.exe), or empty on failure.

Definition at line 72 of file Global.h.

References process_name().

Referenced by HydraHookMainThread(), and process_name().