1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
#if 0
# include <windows.h>
#else
#include <stdint.h>
//#define HANDLE void*
//typedef int BOOL;
//typedef unsigned long LPDWORD;
typedef struct _PROCESS_INFORMATION {
void* hProcess;
void* hThread;
uint32_t dwProcessId;
uint32_t dwThreadId;
} PROCESS_INFORMATION, *PPROCESS_INFORMATION, *LPPROCESS_INFORMATION;
typedef struct _SECURITY_ATTRIBUTES {
uint32_t nLength;
void* lpSecurityDescriptor;
int bInheritHandle;
} SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
typedef struct _STARTUPINFOA {
uint32_t cb;
char *lpReserved;
char *lpDesktop;
char *lpTitle;
uint32_t dwX;
uint32_t dwY;
uint32_t dwXSize;
uint32_t dwYSize;
uint32_t dwXCountChars;
uint32_t dwYCountChars;
uint32_t dwFillAttribute;
uint32_t dwFlags;
short wShowWindow;
short cbReserved2;
uint8_t lpReserved2;
void *hStdInput, *hStdOutput, *hStdError;
} STARTUPINFOA, *LPSTARTUPINFOA;
int CreateProcessA( char const*, char*, LPSECURITY_ATTRIBUTES, LPSECURITY_ATTRIBUTES, int, uint32_t,
void*, char const*, LPSTARTUPINFOA, LPPROCESS_INFORMATION );
int GetExitCodeProcess(void*, unsigned long*);
#endif /*manual windoof on/off switch*/
|