aboutsummaryrefslogtreecommitdiff
path: root/src/dnchost/hostfxr.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/dnchost/hostfxr.h96
1 files changed, 0 insertions, 96 deletions
diff --git a/src/dnchost/hostfxr.h b/src/dnchost/hostfxr.h
deleted file mode 100644
index 85e6e0ab..00000000
--- a/src/dnchost/hostfxr.h
+++ /dev/null
@@ -1,96 +0,0 @@
1// Licensed to the .NET Foundation under one or more agreements.
2// The .NET Foundation licenses this file to you under the MIT license.
3// See the LICENSE file in the project root for more information.
4
5
6
7// ***** ABOUT THIS HEADER *****
8// **************************************************************************************
9//
10// This is the version on 2019-12-22 from
11// https://github.com/dotnet/runtime/blob/master/src/installer/corehost/cli/hostfxr.h
12//
13// **************************************************************************************
14// ****************************
15
16
17#ifndef __HOSTFXR_H__
18#define __HOSTFXR_H__
19
20#include <stddef.h>
21#include <stdint.h>
22
23#if defined(_WIN32)
24 #define HOSTFXR_CALLTYPE __cdecl
25 #ifdef _WCHAR_T_DEFINED
26 typedef wchar_t char_t;
27 #else
28 typedef unsigned short char_t;
29 #endif
30#else
31 #define HOSTFXR_CALLTYPE
32 typedef char char_t;
33#endif
34
35enum hostfxr_delegate_type
36{
37 hdt_com_activation,
38 hdt_load_in_memory_assembly,
39 hdt_winrt_activation,
40 hdt_com_register,
41 hdt_com_unregister,
42 hdt_load_assembly_and_get_function_pointer
43};
44
45typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_main_fn)(const int argc, const char_t **argv);
46typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_main_startupinfo_fn)(
47 const int argc,
48 const char_t **argv,
49 const char_t *host_path,
50 const char_t *dotnet_root,
51 const char_t *app_path);
52
53typedef void(HOSTFXR_CALLTYPE *hostfxr_error_writer_fn)(const char_t *message);
54typedef hostfxr_error_writer_fn(HOSTFXR_CALLTYPE *hostfxr_set_error_writer_fn)(hostfxr_error_writer_fn error_writer);
55
56typedef void* hostfxr_handle;
57struct hostfxr_initialize_parameters
58{
59 size_t size;
60 const char_t *host_path;
61 const char_t *dotnet_root;
62};
63
64typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_initialize_for_dotnet_command_line_fn)(
65 int argc,
66 const char_t **argv,
67 const struct hostfxr_initialize_parameters *parameters,
68 /*out*/ hostfxr_handle *host_context_handle);
69typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_initialize_for_runtime_config_fn)(
70 const char_t *runtime_config_path,
71 const struct hostfxr_initialize_parameters *parameters,
72 /*out*/ hostfxr_handle *host_context_handle);
73
74typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_get_runtime_property_value_fn)(
75 const hostfxr_handle host_context_handle,
76 const char_t *name,
77 /*out*/ const char_t **value);
78typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_set_runtime_property_value_fn)(
79 const hostfxr_handle host_context_handle,
80 const char_t *name,
81 const char_t *value);
82typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_get_runtime_properties_fn)(
83 const hostfxr_handle host_context_handle,
84 /*inout*/ size_t * count,
85 /*out*/ const char_t **keys,
86 /*out*/ const char_t **values);
87
88typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_run_app_fn)(const hostfxr_handle host_context_handle);
89typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_get_runtime_delegate_fn)(
90 const hostfxr_handle host_context_handle,
91 enum hostfxr_delegate_type type,
92 /*out*/ void **delegate);
93
94typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_close_fn)(const hostfxr_handle host_context_handle);
95
96#endif //__HOSTFXR_H__ \ No newline at end of file