diff options
Diffstat (limited to 'src/ext/Bal/dnchost/coreclrhost.h')
-rw-r--r-- | src/ext/Bal/dnchost/coreclrhost.h | 137 |
1 files changed, 0 insertions, 137 deletions
diff --git a/src/ext/Bal/dnchost/coreclrhost.h b/src/ext/Bal/dnchost/coreclrhost.h deleted file mode 100644 index 07f28735..00000000 --- a/src/ext/Bal/dnchost/coreclrhost.h +++ /dev/null | |||
@@ -1,137 +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/coreclr/src/coreclr/hosts/inc/coreclrhost.h | ||
12 | // | ||
13 | // ************************************************************************************** | ||
14 | // **************************** | ||
15 | |||
16 | |||
17 | // | ||
18 | // APIs for hosting CoreCLR | ||
19 | // | ||
20 | |||
21 | #ifndef __CORECLR_HOST_H__ | ||
22 | #define __CORECLR_HOST_H__ | ||
23 | |||
24 | #if defined(_WIN32) && defined(_M_IX86) | ||
25 | #define CORECLR_CALLING_CONVENTION __stdcall | ||
26 | #else | ||
27 | #define CORECLR_CALLING_CONVENTION | ||
28 | #endif | ||
29 | |||
30 | // For each hosting API, we define a function prototype and a function pointer | ||
31 | // The prototype is useful for implicit linking against the dynamic coreclr | ||
32 | // library and the pointer for explicit dynamic loading (dlopen, LoadLibrary) | ||
33 | #define CORECLR_HOSTING_API(function, ...) \ | ||
34 | extern "C" int CORECLR_CALLING_CONVENTION function(__VA_ARGS__); \ | ||
35 | typedef int (CORECLR_CALLING_CONVENTION *function##_ptr)(__VA_ARGS__) | ||
36 | |||
37 | // | ||
38 | // Initialize the CoreCLR. Creates and starts CoreCLR host and creates an app domain | ||
39 | // | ||
40 | // Parameters: | ||
41 | // exePath - Absolute path of the executable that invoked the ExecuteAssembly (the native host application) | ||
42 | // appDomainFriendlyName - Friendly name of the app domain that will be created to execute the assembly | ||
43 | // propertyCount - Number of properties (elements of the following two arguments) | ||
44 | // propertyKeys - Keys of properties of the app domain | ||
45 | // propertyValues - Values of properties of the app domain | ||
46 | // hostHandle - Output parameter, handle of the created host | ||
47 | // domainId - Output parameter, id of the created app domain | ||
48 | // | ||
49 | // Returns: | ||
50 | // HRESULT indicating status of the operation. S_OK if the assembly was successfully executed | ||
51 | // | ||
52 | CORECLR_HOSTING_API(coreclr_initialize, | ||
53 | const char* exePath, | ||
54 | const char* appDomainFriendlyName, | ||
55 | int propertyCount, | ||
56 | const char** propertyKeys, | ||
57 | const char** propertyValues, | ||
58 | void** hostHandle, | ||
59 | unsigned int* domainId); | ||
60 | |||
61 | // | ||
62 | // Shutdown CoreCLR. It unloads the app domain and stops the CoreCLR host. | ||
63 | // | ||
64 | // Parameters: | ||
65 | // hostHandle - Handle of the host | ||
66 | // domainId - Id of the domain | ||
67 | // | ||
68 | // Returns: | ||
69 | // HRESULT indicating status of the operation. S_OK if the assembly was successfully executed | ||
70 | // | ||
71 | CORECLR_HOSTING_API(coreclr_shutdown, | ||
72 | void* hostHandle, | ||
73 | unsigned int domainId); | ||
74 | |||
75 | // | ||
76 | // Shutdown CoreCLR. It unloads the app domain and stops the CoreCLR host. | ||
77 | // | ||
78 | // Parameters: | ||
79 | // hostHandle - Handle of the host | ||
80 | // domainId - Id of the domain | ||
81 | // latchedExitCode - Latched exit code after domain unloaded | ||
82 | // | ||
83 | // Returns: | ||
84 | // HRESULT indicating status of the operation. S_OK if the assembly was successfully executed | ||
85 | // | ||
86 | CORECLR_HOSTING_API(coreclr_shutdown_2, | ||
87 | void* hostHandle, | ||
88 | unsigned int domainId, | ||
89 | int* latchedExitCode); | ||
90 | |||
91 | // | ||
92 | // Create a native callable function pointer for a managed method. | ||
93 | // | ||
94 | // Parameters: | ||
95 | // hostHandle - Handle of the host | ||
96 | // domainId - Id of the domain | ||
97 | // entryPointAssemblyName - Name of the assembly which holds the custom entry point | ||
98 | // entryPointTypeName - Name of the type which holds the custom entry point | ||
99 | // entryPointMethodName - Name of the method which is the custom entry point | ||
100 | // delegate - Output parameter, the function stores a native callable function pointer to the delegate at the specified address | ||
101 | // | ||
102 | // Returns: | ||
103 | // HRESULT indicating status of the operation. S_OK if the assembly was successfully executed | ||
104 | // | ||
105 | CORECLR_HOSTING_API(coreclr_create_delegate, | ||
106 | void* hostHandle, | ||
107 | unsigned int domainId, | ||
108 | const char* entryPointAssemblyName, | ||
109 | const char* entryPointTypeName, | ||
110 | const char* entryPointMethodName, | ||
111 | void** delegate); | ||
112 | |||
113 | // | ||
114 | // Execute a managed assembly with given arguments | ||
115 | // | ||
116 | // Parameters: | ||
117 | // hostHandle - Handle of the host | ||
118 | // domainId - Id of the domain | ||
119 | // argc - Number of arguments passed to the executed assembly | ||
120 | // argv - Array of arguments passed to the executed assembly | ||
121 | // managedAssemblyPath - Path of the managed assembly to execute (or NULL if using a custom entrypoint). | ||
122 | // exitCode - Exit code returned by the executed assembly | ||
123 | // | ||
124 | // Returns: | ||
125 | // HRESULT indicating status of the operation. S_OK if the assembly was successfully executed | ||
126 | // | ||
127 | CORECLR_HOSTING_API(coreclr_execute_assembly, | ||
128 | void* hostHandle, | ||
129 | unsigned int domainId, | ||
130 | int argc, | ||
131 | const char** argv, | ||
132 | const char* managedAssemblyPath, | ||
133 | unsigned int* exitCode); | ||
134 | |||
135 | #undef CORECLR_HOSTING_API | ||
136 | |||
137 | #endif // __CORECLR_HOST_H__ \ No newline at end of file | ||