#include <precomp.h>
#include <stdlib.h>
#include <string.h>
#include <process.h>
Go to the source code of this file.
◆ _wsystem()
Definition at line 119 of file _system.c.
120{
121 FIXME(
"_wsystem stub\n");
122 return -1;
123}
◆ system()
Definition at line 20 of file _system.c.
21{
22 char *szCmdLine =
NULL;
23 char *szComSpec =
NULL;
24
29
30 int nStatus;
31
32 szComSpec =
getenv(
"COMSPEC");
33
34
35
37 if (szComSpec ==
NULL)
38 return 0;
39 else
40 return 1;
41 }
42
43 if (szComSpec ==
NULL)
44 return -1;
45
46
47
48
49 if (szComSpec ==
NULL)
50 {
51 szComSpec = "cmd.exe";
52 }
53
54
58 else
60
62 if (szCmdLine ==
NULL)
63 {
65 return -1;
66 }
67
74
75
76
77 memset (&StartupInfo, 0,
sizeof(StartupInfo));
78 StartupInfo.
cb =
sizeof(StartupInfo);
84
85
86
87
88
89
90
91
93 szCmdLine,
100 &StartupInfo,
101 &ProcessInformation);
103
105 {
107 return -1;
108 }
109
111
112
115
116 return nStatus;
117}
char * strcat(char *DstString, const char *SrcString)
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
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_ char *__cdecl getenv(_In_z_ const char *_VarName)
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)
_Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
DWORD WINAPI GetLastError(void)
#define STARTF_USESHOWWINDOW
#define CREATE_NEW_PROCESS_GROUP