2004-09-01 Miguel de Icaza <miguel@ximian.com>
[mono.git] / mono / metadata / process.h
1 /*
2  * process.h: System.Diagnostics.Process support
3  *
4  * Author:
5  *      Dick Porter (dick@ximian.com)
6  *
7  * (C) 2002 Ximian, Inc.
8  */
9
10 #ifndef _MONO_METADATA_PROCESS_H_
11 #define _MONO_METADATA_PROCESS_H_
12
13 #include <config.h>
14 #include <glib.h>
15
16 #include <mono/metadata/object.h>
17 #include <mono/io-layer/io-layer.h>
18
19 typedef struct 
20 {
21         HANDLE process_handle;
22         HANDLE thread_handle;
23         guint32 pid; /* Contains GetLastError () on failure */
24         guint32 tid;
25         MonoArray *env_keys;
26         MonoArray *env_values;
27         MonoBoolean use_shell;
28 } MonoProcInfo;
29
30 G_BEGIN_DECLS
31
32 HANDLE ves_icall_System_Diagnostics_Process_GetProcess_internal (guint32 pid);
33 MonoArray *ves_icall_System_Diagnostics_Process_GetProcesses_internal (void);
34 guint32 ves_icall_System_Diagnostics_Process_GetPid_internal (void);
35 void ves_icall_System_Diagnostics_Process_Process_free_internal (MonoObject *this, HANDLE process);
36 MonoArray *ves_icall_System_Diagnostics_Process_GetModules_internal (MonoObject *this);
37 void ves_icall_System_Diagnostics_FileVersionInfo_GetVersionInfo_internal (MonoObject *this, MonoString *filename);
38 MonoBoolean ves_icall_System_Diagnostics_Process_Start_internal (MonoString *appname, MonoString *cmd, MonoString *dirname, HANDLE stdin_handle, HANDLE stdout_handle, HANDLE stderr_handle, MonoProcInfo *process_handle);
39 MonoBoolean ves_icall_System_Diagnostics_Process_WaitForExit_internal (MonoObject *this, HANDLE process, gint32 ms);
40 gint64 ves_icall_System_Diagnostics_Process_ExitTime_internal (HANDLE process);
41 gint64 ves_icall_System_Diagnostics_Process_StartTime_internal (HANDLE process);
42 gint32 ves_icall_System_Diagnostics_Process_ExitCode_internal (HANDLE process);
43 MonoString *ves_icall_System_Diagnostics_Process_ProcessName_internal (HANDLE process);
44 MonoBoolean ves_icall_System_Diagnostics_Process_GetWorkingSet_internal (HANDLE process, guint32 *min, guint32 *max);
45 MonoBoolean ves_icall_System_Diagnostics_Process_SetWorkingSet_internal (HANDLE process, guint32 min, guint32 max, MonoBoolean use_min);
46 MonoBoolean ves_icall_System_Diagnostics_Process_Kill_internal (HANDLE process, gint32 sig);
47
48 G_END_DECLS
49
50 #endif /* _MONO_METADATA_PROCESS_H_ */
51