aboutsummaryrefslogtreecommitdiff
path: root/src/dnchost/dncutil.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dnchost/dncutil.h')
-rw-r--r--src/dnchost/dncutil.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/dnchost/dncutil.h b/src/dnchost/dncutil.h
new file mode 100644
index 00000000..1a7c16e3
--- /dev/null
+++ b/src/dnchost/dncutil.h
@@ -0,0 +1,36 @@
1#pragma once
2// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
3
4typedef IBootstrapperApplicationFactory* (STDMETHODCALLTYPE* PFNCREATEBAFACTORY)(
5 __in LPCWSTR wzBaFactoryAssemblyName,
6 __in LPCWSTR wzBaFactoryAssemblyPath
7 );
8
9struct HOSTFXR_STATE
10{
11 LPWSTR sczHostfxrPath;
12 hostfxr_handle hostContextHandle;
13 hostfxr_initialize_for_dotnet_command_line_fn pfnHostfxrInitializeForApp;
14 hostfxr_get_runtime_properties_fn pfnHostfxrGetRuntimeProperties;
15 hostfxr_set_error_writer_fn pfnHostfxrSetErrorWriter;
16 hostfxr_close_fn pfnHostfxrClose;
17 coreclr_initialize_ptr pfnCoreclrInitialize;
18 coreclr_create_delegate_ptr pfnCoreclrCreateDelegate;
19 void* pClrHandle;
20 UINT dwDomainId;
21};
22
23HRESULT DnchostLoadRuntime(
24 __in HOSTFXR_STATE* pState,
25 __in LPCWSTR wzNativeHostPath,
26 __in LPCWSTR wzManagedHostPath,
27 __in LPCWSTR wzDepsJsonPath,
28 __in LPCWSTR wzRuntimeConfigPath
29 );
30
31HRESULT DnchostCreateFactory(
32 __in HOSTFXR_STATE* pState,
33 __in LPCWSTR wzBaFactoryAssemblyName,
34 __in LPCWSTR wzBaFactoryAssemblyPath,
35 __out IBootstrapperApplicationFactory** ppAppFactory
36 );