2 * w32process.h: System.Diagnostics.Process support
5 * Dick Porter (dick@ximian.com)
7 * (C) 2002 Ximian, Inc.
10 #ifndef _MONO_METADATA_W32PROCESS_H_
11 #define _MONO_METADATA_W32PROCESS_H_
17 #include <sys/types.h>
20 #include <mono/metadata/object.h>
25 MONO_W32PROCESS_PRIORITY_CLASS_NORMAL = 0x0020,
26 MONO_W32PROCESS_PRIORITY_CLASS_IDLE = 0x0040,
27 MONO_W32PROCESS_PRIORITY_CLASS_HIGH = 0x0080,
28 MONO_W32PROCESS_PRIORITY_CLASS_REALTIME = 0x0100,
29 MONO_W32PROCESS_PRIORITY_CLASS_BELOW_NORMAL = 0x4000,
30 MONO_W32PROCESS_PRIORITY_CLASS_ABOVE_NORMAL = 0x8000,
31 } MonoW32ProcessPriorityClass;
35 gpointer process_handle;
36 gpointer thread_handle;
37 guint32 pid; /* Contains GetLastError () on failure */
40 MonoArray *env_values;
43 gpointer password; /* BSTR from SecureString in 2.0 profile */
44 MonoBoolean load_user_profile;
51 MonoString *arguments;
52 MonoString *working_directory;
55 MonoBoolean error_dialog;
56 gpointer error_dialog_parent_handle;
57 MonoBoolean use_shell_execute;
60 MonoObject *password; /* SecureString in 2.0 profile, dummy in 1.x */
61 MonoString *password_in_clear_text;
62 MonoBoolean load_user_profile;
63 MonoBoolean redirect_standard_input;
64 MonoBoolean redirect_standard_output;
65 MonoBoolean redirect_standard_error;
66 MonoObject *encoding_stdout;
67 MonoObject *encoding_stderr;
68 MonoBoolean create_no_window;
69 MonoObject *weak_parent_process;
71 } MonoW32ProcessStartInfo;
74 mono_w32process_init (void);
77 mono_w32process_cleanup (void);
82 mono_w32process_set_cli_launcher (gchar *path);
85 mono_w32process_get_path (pid_t pid);
90 ves_icall_System_Diagnostics_Process_GetProcess_internal (guint32 pid);
93 ves_icall_System_Diagnostics_Process_GetProcesses_internal (void);
96 ves_icall_System_Diagnostics_Process_GetModules_internal (MonoObject *this_obj, gpointer process);
99 ves_icall_System_Diagnostics_FileVersionInfo_GetVersionInfo_internal (MonoObject *this_obj, MonoString *filename);
102 ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal (MonoW32ProcessStartInfo *proc_start_info, MonoW32ProcessInfo *process_handle);
105 ves_icall_System_Diagnostics_Process_CreateProcess_internal (MonoW32ProcessStartInfo *proc_start_info, gpointer stdin_handle,
106 gpointer stdout_handle, gpointer stderr_handle, MonoW32ProcessInfo *process_handle);
109 ves_icall_System_Diagnostics_Process_ProcessName_internal (gpointer process);
112 ves_icall_System_Diagnostics_Process_GetProcessData (int pid, gint32 data_type, gint32 *error);
115 ves_icall_Microsoft_Win32_NativeMethods_GetCurrentProcess (void);
118 ves_icall_Microsoft_Win32_NativeMethods_GetExitCodeProcess (gpointer handle, gint32 *exitcode);
121 ves_icall_Microsoft_Win32_NativeMethods_CloseProcess (gpointer handle);
124 ves_icall_Microsoft_Win32_NativeMethods_TerminateProcess (gpointer handle, gint32 exitcode);
127 ves_icall_Microsoft_Win32_NativeMethods_GetProcessWorkingSetSize (gpointer handle, gsize *min, gsize *max);
129 ves_icall_Microsoft_Win32_NativeMethods_SetProcessWorkingSetSize (gpointer handle, gsize min, gsize max);
132 ves_icall_Microsoft_Win32_NativeMethods_GetPriorityClass (gpointer handle);
134 ves_icall_Microsoft_Win32_NativeMethods_SetPriorityClass (gpointer handle, gint32 priorityClass);
137 ves_icall_Microsoft_Win32_NativeMethods_GetProcessTimes (gpointer handle, gint64 *creationtime, gint64 *exittime, gint64 *kerneltime, gint64 *usertime);
141 #endif /* _MONO_METADATA_W32PROCESS_H_ */