diff options
author | midipix <writeonce@midipix.org> | 2017-01-19 20:51:58 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2017-01-19 15:59:50 -0500 |
commit | e13223465ce70e387991ecb424f3ac34e7f4d974 (patch) | |
tree | 97e72191e57bf46e28aa1bdd7cab2126c3fd7728 /src/ldso | |
parent | 9d2131a4dd7e9ba6e5e11becbfd8081a6fdcd15a (diff) | |
download | pemagine-e13223465ce70e387991ecb424f3ac34e7f4d974.tar.bz2 pemagine-e13223465ce70e387991ecb424f3ac34e7f4d974.tar.xz |
ldso: added pe_get_peb_command_line(), pe_get_peb_environment_block().
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; +} |