Merge pull request #3738 from lateralusX/jlorenss/win-api-family-support-libmonoruntime
[mono.git] / mono / metadata / process-internals.h
1 /*
2  * Copyright 2016 Microsoft
3  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
4  */
5 #ifndef __MONO_METADATA_PROCESS_INTERNALS_H__
6 #define __MONO_METADATA_PROCESS_INTERNALS_H__
7
8 #include <config.h>
9 #include <glib.h>
10
11 // On Windows platform implementation of bellow methods are hosted in separate source file
12 // process-windows.c or process-windows-*.c. On other platforms the implementation is still keept
13 // in process.c still declared as static and in some places even inlined.
14 #ifdef HOST_WIN32
15 gchar*
16 mono_process_quote_path (const gchar *path);
17
18 gchar*
19 mono_process_unquote_application_name (gchar *path);
20
21 gboolean
22 mono_process_get_shell_arguments (MonoProcessStartInfo *proc_start_info, gunichar2 **shell_path,
23                                   MonoString **cmd);
24 #endif  /* HOST_WIN32 */
25
26 // On platforms not using classic WIN API support the  implementation of bellow methods are hosted in separate source file
27 // process-windows-*.c. On platforms using classic WIN API the implementation is still keept in process.c and still declared
28 // static and in some places even inlined.
29 #if !G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
30 void
31 process_get_fileversion (MonoObject *filever, gunichar2 *filename, MonoError *error);
32
33 void
34 mono_process_init_startup_info (HANDLE stdin_handle, HANDLE stdout_handle,
35                                 HANDLE stderr_handle,STARTUPINFO *startinfo);
36
37 gboolean
38 mono_process_create_process (MonoProcInfo *mono_process_info, gunichar2 *shell_path, MonoString *cmd,
39                              guint32 creation_flags, gchar *env_vars, gunichar2 *dir, STARTUPINFO *start_info,
40                              PROCESS_INFORMATION *process_info);
41 #endif  /* !G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
42
43 // Shared between all platforms and implemented in process.c.
44 gboolean
45 mono_process_complete_path (const gunichar2 *appname, gchar **completed);
46
47 #endif /* __MONO_METADATA_PROCESS_INTERNALS_H__ */