Blame src/ldso/pe_get_peb_strings.c

e13223
/*****************************************************************************/
e13223
/*  pemagination: a (virtual) tour into portable bits and executable bytes   */
740419
/*  Copyright (C) 2013--2020  Z. Gilboa                                      */
e13223
/*  Released under GPLv2 and GPLv3; see COPYING.PEMAGINE.                    */
e13223
/*****************************************************************************/
e13223
e13223
#include <psxtypes/psxtypes.h>
e13223
#include <pemagine/pemagine.h>
e13223
#include "pe_os.h"
e13223
e13223
wchar16_t * pe_get_peb_command_line(void)
e13223
{
e13223
	struct os_peb * peb;
e13223
e13223
	return (peb = (struct os_peb *)pe_get_peb_address())
e13223
		? peb->process_params->command_line.buffer
e13223
		: 0;
e13223
}
e13223
e13223
e13223
wchar16_t * pe_get_peb_environment_block(void)
e13223
{
e13223
	struct os_peb * peb;
e13223
e13223
	return (peb = (struct os_peb *)pe_get_peb_address())
e13223
		? peb->process_params->environment
e13223
		: 0;
e13223
}