21template <
typename Character>
26 static Character
const comspec_name[] = {
'C',
'O',
'M',
'S',
'P',
'E',
'C',
'\0' };
27 static Character
const cmd_exe[] = {
'c',
'm',
'd',
'.',
'e',
'x',
'e',
'\0' };
28 static Character
const slash_c[] = {
'/',
'c',
'\0' };
30 __crt_unique_heap_ptr<Character> comspec_value;
31 _ERRCHECK_EINVAL(traits::tdupenv_s_crt(comspec_value.get_address_of(),
nullptr, comspec_name));
40 return traits::taccess_s(comspec_value.get(), 0) == 0;
45 Character
const* arguments[4] =
58 int const result =
static_cast<int>(traits::tspawnve(
_P_WAIT, arguments[0], arguments,
nullptr));
74 arguments[0] = cmd_exe;
75 return static_cast<int>(traits::tspawnvpe(
_P_WAIT, arguments[0], arguments,
nullptr));
#define _ERRCHECK_EINVAL(e)
static int __cdecl common_system(Character const *const command)
int __cdecl _wsystem(wchar_t const *const command)
int __cdecl system(char const *const command)