LIEF: Library to Instrument Executable Formats Version 1.0.0
Loading...
Searching...
No Matches
LIEF::runtime::windows::injection_context_t Struct Reference

Describes how to spawn a new process and inject a library into it. More...

#include <injector.hpp>

Public Member Functions

bool validate () const
 Check whether the context is consistent (required paths filled-in and readable).
 operator bool () const
std::string to_string () const

Public Attributes

std::string target_path
 Absolute path to the target executable to spawn.
std::string args
 Command-line arguments passed to the spawned process.
std::string library
 Absolute path to the library (DLL) that should be injected.
std::unordered_map< std::string, std::string > env
 Environment variables to set in the spawned process. If left empty, the current process environment is inherited.

Detailed Description

Describes how to spawn a new process and inject a library into it.

Member Function Documentation

◆ operator bool()

LIEF::runtime::windows::injection_context_t::operator bool ( ) const
inline

References validate().

◆ to_string()

std::string LIEF::runtime::windows::injection_context_t::to_string ( ) const

Referenced by operator<<.

◆ validate()

bool LIEF::runtime::windows::injection_context_t::validate ( ) const

Check whether the context is consistent (required paths filled-in and readable).

Referenced by operator bool().

Member Data Documentation

◆ args

std::string LIEF::runtime::windows::injection_context_t::args

Command-line arguments passed to the spawned process.

◆ env

std::unordered_map<std::string, std::string> LIEF::runtime::windows::injection_context_t::env

Environment variables to set in the spawned process. If left empty, the current process environment is inherited.

◆ library

std::string LIEF::runtime::windows::injection_context_t::library

Absolute path to the library (DLL) that should be injected.

◆ target_path

std::string LIEF::runtime::windows::injection_context_t::target_path

Absolute path to the target executable to spawn.


The documentation for this struct was generated from the following file: