2002-04-30 Dick Porter <dick@ximian.com>
[mono.git] / mono / io-layer / processes.h
1 #ifndef _WAPI_PROCESSES_H_
2 #define _WAPI_PROCESSES_H_
3
4 #include <glib.h>
5
6 #include "mono/io-layer/handles.h"
7
8 typedef struct _WapiStartupInfo WapiStartupInfo;
9
10 struct _WapiStartupInfo 
11 {
12         guint32 cb;
13         guchar *lpReserved;
14         guchar *lpDesktop;
15         guchar *lpTitle;
16         guint32 dwX;
17         guint32 dwY;
18         guint32 dwXSize;
19         guint32 dwYSize;
20         guint32 dwXCountChars;
21         guint32 dwYCountChars;
22         guint32 dwFillAttribute;
23         guint32 dwFlags;
24         guint16 wShowWindow;
25         guint16 cbReserved2;
26         guint8 *lpReserved2;
27         gpointer hStdInput;
28         gpointer hStdOutput;
29         gpointer hStdError;
30 };
31
32 typedef struct _WapiProcessInformation WapiProcessInformation;
33
34 struct _WapiProcessInformation 
35 {
36         gpointer hProcess;
37         gpointer hThread;
38         guint32 dwProcessId;
39         guint32 dwThreadId;
40 };
41
42         
43 #define DEBUG_PROCESS 0x00000001
44 #define DEBUG_ONLY_THIS_PROCESS 0x00000002
45 #define CREATE_SUSPENDED 0x00000004
46 #define DETACHED_PROCESS 0x00000008
47 #define CREATE_NEW_CONSOLE 0x00000010
48 #define NORMAL_PRIORITY_CLASS 0x00000020
49 #define IDLE_PRIORITY_CLASS 0x00000040
50 #define HIGH_PRIORITY_CLASS 0x00000080
51 #define REALTIME_PRIORITY_CLASS 0x00000100
52 #define CREATE_NEW_PROCESS_GROUP 0x00000200
53 #define CREATE_UNICODE_ENVIRONMENT 0x00000400
54 #define CREATE_SEPARATE_WOW_VDM 0x00000800
55 #define CREATE_SHARED_WOW_VDM 0x00001000
56 #define CREATE_FORCEDOS 0x00002000
57 #define BELOW_NORMAL_PRIORITY_CLASS 0x00004000
58 #define ABOVE_NORMAL_PRIORITY_CLASS 0x00008000
59 #define CREATE_BREAKAWAY_FROM_JOB 0x01000000
60 #define CREATE_WITH_USERPROFILE 0x02000000
61 #define CREATE_DEFAULT_ERROR_MODE 0x04000000
62 #define CREATE_NO_WINDOW 0x08000000
63
64 #ifdef NEW_STUFF
65 #define CREATE_PRESERVE_CODE_AUTHZ_LEVEL find out the value for this one...
66 #endif
67
68 extern gboolean CreateProcess (const gunichar2 *appname, gunichar2 *cmdline,
69                                WapiSecurityAttributes *process_attrs,
70                                WapiSecurityAttributes *thread_attrs,
71                                gboolean inherit_handles, guint32 create_flags,
72                                gpointer env, const gunichar2 *cwd,
73                                WapiStartupInfo *startup,
74                                WapiProcessInformation *process_info);
75
76 #endif /* _WAPI_PROCESSES_H_ */