2010-04-07 Rodrigo Kumpera <rkumpera@novell.com>
[mono.git] / mono / metadata / process.h
blobfb184a774b67020636ca112a3f1f1b63854913ad
1 /*
2 * process.h: System.Diagnostics.Process support
4 * Author:
5 * Dick Porter (dick@ximian.com)
7 * (C) 2002 Ximian, Inc.
8 */
10 #ifndef _MONO_METADATA_PROCESS_H_
11 #define _MONO_METADATA_PROCESS_H_
13 #include <config.h>
14 #include <glib.h>
16 #include <mono/metadata/object.h>
17 #include <mono/io-layer/io-layer.h>
18 #include "mono/utils/mono-compiler.h"
20 typedef struct
22 HANDLE process_handle;
23 HANDLE thread_handle;
24 guint32 pid; /* Contains GetLastError () on failure */
25 guint32 tid;
26 MonoArray *env_keys;
27 MonoArray *env_values;
28 MonoString *username;
29 MonoString *domain;
30 gpointer password; /* BSTR from SecureString in 2.0 profile */
31 MonoBoolean load_user_profile;
32 } MonoProcInfo;
34 typedef struct
36 MonoObject object;
37 MonoString *arguments;
38 gpointer error_dialog_parent_handle;
39 MonoString *filename;
40 MonoString *verb;
41 MonoString *working_directory;
42 MonoObject *envVars;
43 MonoBoolean create_no_window;
44 MonoBoolean error_dialog;
45 MonoBoolean redirect_standard_error;
46 MonoBoolean redirect_standard_input;
47 MonoBoolean redirect_standard_output;
48 MonoBoolean use_shell_execute;
49 guint32 window_style;
50 MonoObject *encoding_stderr;
51 MonoObject *encoding_stdout;
52 MonoString *username;
53 MonoString *domain;
54 MonoObject *password; /* SecureString in 2.0 profile, dummy in 1.x */
55 MonoBoolean load_user_profile;
56 } MonoProcessStartInfo;
58 G_BEGIN_DECLS
60 HANDLE ves_icall_System_Diagnostics_Process_GetProcess_internal (guint32 pid) MONO_INTERNAL;
61 MonoArray *ves_icall_System_Diagnostics_Process_GetProcesses_internal (void) MONO_INTERNAL;
62 guint32 ves_icall_System_Diagnostics_Process_GetPid_internal (void) MONO_INTERNAL;
63 void ves_icall_System_Diagnostics_Process_Process_free_internal (MonoObject *this, HANDLE process) MONO_INTERNAL;
64 MonoArray *ves_icall_System_Diagnostics_Process_GetModules_internal (MonoObject *this, HANDLE process) MONO_INTERNAL;
65 void ves_icall_System_Diagnostics_FileVersionInfo_GetVersionInfo_internal (MonoObject *this, MonoString *filename) MONO_INTERNAL;
66 MonoBoolean ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal (MonoProcessStartInfo *proc_start_info, MonoProcInfo *process_handle) MONO_INTERNAL;
67 MonoBoolean ves_icall_System_Diagnostics_Process_CreateProcess_internal (MonoProcessStartInfo *proc_start_info, HANDLE stdin_handle, HANDLE stdout_handle, HANDLE stderr_handle, MonoProcInfo *process_handle) MONO_INTERNAL;
68 MonoBoolean ves_icall_System_Diagnostics_Process_WaitForExit_internal (MonoObject *this, HANDLE process, gint32 ms) MONO_INTERNAL;
69 MonoBoolean ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal (MonoObject *this, HANDLE process, gint32 ms) MONO_INTERNAL;
70 gint64 ves_icall_System_Diagnostics_Process_ExitTime_internal (HANDLE process) MONO_INTERNAL;
71 gint64 ves_icall_System_Diagnostics_Process_StartTime_internal (HANDLE process) MONO_INTERNAL;
72 gint32 ves_icall_System_Diagnostics_Process_ExitCode_internal (HANDLE process) MONO_INTERNAL;
73 MonoString *ves_icall_System_Diagnostics_Process_ProcessName_internal (HANDLE process) MONO_INTERNAL;
74 MonoBoolean ves_icall_System_Diagnostics_Process_GetWorkingSet_internal (HANDLE process, guint32 *min, guint32 *max) MONO_INTERNAL;
75 MonoBoolean ves_icall_System_Diagnostics_Process_SetWorkingSet_internal (HANDLE process, guint32 min, guint32 max, MonoBoolean use_min) MONO_INTERNAL;
76 MonoBoolean ves_icall_System_Diagnostics_Process_Kill_internal (HANDLE process, gint32 sig) MONO_INTERNAL;
77 gint64 ves_icall_System_Diagnostics_Process_Times (HANDLE process, gint32 type) MONO_INTERNAL;
78 gint32 ves_icall_System_Diagnostics_Process_GetPriorityClass (HANDLE process, gint32 *error) MONO_INTERNAL;
79 MonoBoolean ves_icall_System_Diagnostics_Process_SetPriorityClass (HANDLE process, gint32 priority_class, gint32 *error) MONO_INTERNAL;
80 gint64 ves_icall_System_Diagnostics_Process_GetProcessData (int pid, gint32 data_type, gint32 *error) MONO_INTERNAL;
82 HANDLE ves_icall_System_Diagnostics_Process_ProcessHandle_duplicate (HANDLE process);
83 void ves_icall_System_Diagnostics_Process_ProcessHandle_close (HANDLE process);
85 G_END_DECLS
87 #endif /* _MONO_METADATA_PROCESS_H_ */