diff options
Diffstat (limited to 'src/ldso')
-rw-r--r-- | src/ldso/pe_get_peb_strings.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/ldso/pe_get_peb_strings.c b/src/ldso/pe_get_peb_strings.c new file mode 100644 index 0000000..7817c16 --- /dev/null +++ b/src/ldso/pe_get_peb_strings.c @@ -0,0 +1,28 @@ +/*****************************************************************************/ +/* pemagination: a (virtual) tour into portable bits and executable bytes */ +/* Copyright (C) 2013--2017 Z. Gilboa */ +/* Released under GPLv2 and GPLv3; see COPYING.PEMAGINE. */ +/*****************************************************************************/ + +#include <psxtypes/psxtypes.h> +#include <pemagine/pemagine.h> +#include "pe_os.h" + +wchar16_t * pe_get_peb_command_line(void) +{ + struct os_peb * peb; + + return (peb = (struct os_peb *)pe_get_peb_address()) + ? peb->process_params->command_line.buffer + : 0; +} + + +wchar16_t * pe_get_peb_environment_block(void) +{ + struct os_peb * peb; + + return (peb = (struct os_peb *)pe_get_peb_address()) + ? peb->process_params->environment + : 0; +} |