22 char *szCmdLine =
NULL;
23 char *szComSpec =
NULL;
30 szComSpec =
getenv(
"COMSPEC");
35 return (szComSpec ==
NULL) ? 0 : 1;
41 strcat(cmd_exe,
"\\cmd.exe");
46 if (szCmdLine ==
NULL)
53 strcat(szCmdLine, szComSpec);
54 strcat(szCmdLine,
"\" /C ");
59 memset(&StartupInfo, 0,
sizeof(StartupInfo));
60 StartupInfo.
cb =
sizeof(StartupInfo);
101 wchar_t *comspec =
NULL;
113 return (comspec ==
NULL) ? 0 : 1;
137 memset(&startup_info, 0,
sizeof(startup_info));
138 startup_info.
cb =
sizeof(startup_info);
int system(const char *command)
int CDECL _wsystem(const wchar_t *cmd)
char * strcat(char *DstString, const char *SrcString)
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
UINT WINAPI GetSystemDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessW(LPCWSTR lpApplicationName, LPWSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCWSTR lpCurrentDirectory, LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(LPCSTR lpApplicationName, LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, LPSTARTUPINFOA lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
_Check_return_ _CRTIMP wchar_t *__cdecl _wgetenv(_In_z_ const wchar_t *_VarName)
_Check_return_ char *__cdecl getenv(_In_z_ const char *_VarName)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
void _dosmaperr(unsigned long oserrcode)
errno_t __cdecl _set_errno(_In_ int _Value)
_CRTIMP intptr_t __cdecl _cwait(_Out_opt_ int *_TermStat, _In_ intptr_t _ProcHandle, _In_ int _Action)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define INVALID_FILE_ATTRIBUTES
DWORD WINAPI GetLastError(void)
#define STARTF_USESHOWWINDOW
#define CREATE_NEW_PROCESS_GROUP