25template <
typename Character>
30 Character**
const environment = traits::get_or_create_environment_nolock();
31 if (environment ==
nullptr ||
name ==
nullptr)
34 size_t const name_length = traits::tcslen(
name);
38 if (traits::tcslen(*
current) <= name_length)
41 if (*(*
current + name_length) !=
'=')
44 if (traits::tcsnicoll(*
current,
name, name_length) != 0)
52 return *
current + name_length + 1;
60template <
typename Character>
106template <
typename Character>
109 size_t*
const required_count,
131 *required_count = traits::tcslen(
value) + 1;
144template <
typename Character>
147 size_t*
const required_count,
170 size_t*
const required_count,
173 char const*
const name
180 size_t*
const required_count,
183 wchar_t const*
const name
206template <
typename Character>
210 Character
const*
const name,
224 *buffer_pointer =
nullptr;
232 if (
value ==
nullptr)
235 size_t const value_count = traits::tcslen(
value) + 1;
237 *buffer_pointer =
static_cast<Character*
>(
_calloc_dbg(
252template <
typename Character>
286 char**
const buffer_pointer,
288 char const*
const name
295 wchar_t**
const buffer_pointer,
297 wchar_t const*
const name
309 char**
const buffer_pointer,
311 char const*
const name,
321 wchar_t**
const buffer_pointer,
323 wchar_t const*
const name,
void __cdecl __acrt_unlock(_In_ __acrt_lock_id lock)
@ __acrt_environment_lock
#define _VALIDATE_RETURN(expr, errorcode, retexpr)
#define _calloc_dbg(c, s, t, f, l)
__acrt_lock(__acrt_heap_lock)
int const char const *const int const line_number
errno_t __cdecl _wgetenv_s(size_t *const required_count, wchar_t *const buffer, size_t const buffer_count, wchar_t const *const name)
errno_t __cdecl getenv_s(size_t *const required_count, char *const buffer, size_t const buffer_count, char const *const name)
_Out_opt_ size_t *const Character const *const int const char const *const file_name
errno_t __cdecl _wdupenv_s(wchar_t **const buffer_pointer, size_t *const buffer_count, wchar_t const *const name)
errno_t __cdecl _dupenv_s(char **const buffer_pointer, size_t *const buffer_count, char const *const name)
_Out_opt_ size_t *const Character const *const int const block_use
static Character *__cdecl common_getenv(Character const *const name)
static Character *__cdecl common_getenv_nolock(Character const *const name)
char *__cdecl getenv(char const *const name)
size_t const buffer_count
static errno_t __cdecl common_dupenv_s_nolock(_Outptr_result_buffer_maybenull_(*buffer_count) _Outptr_result_maybenull_z_ Character **const buffer_pointer, _Out_opt_ size_t *const buffer_count, Character const *const name, int const block_use, char const *const file_name, int const line_number)
size_t const Character const *const name throw()
wchar_t *__cdecl _wgetenv(wchar_t const *const name)
#define _VALIDATE_RETURN_ERRCODE(expr, errorcode)
#define _VALIDATE_RETURN_ERRCODE_NOEXC(expr, errorcode)
struct task_struct * current
#define _Outptr_result_buffer_maybenull_(size)
#define _Out_writes_z_(s)
#define _Outptr_result_maybenull_z_
#define UNREFERENCED_PARAMETER(P)
#define _dupenv_s_dbg(ps1, size, s2, t, f, l)
#define _wdupenv_s_dbg(ps1, size, s2, t, f, l)