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#ifndef CORECLRLOADER_H
6#define CORECLRLOADER_H
7typedef int (*InitializeCoreCLRFunction)(
8 const char* exePath,
9 const char* appDomainFriendlyName,
10 int propertyCount,
11 const char** propertyKeys,
12 const char** propertyValues,
13 void** hostHandle,
14 unsigned int* domainId);
15
16typedef int (*ShutdownCoreCLRFunction)(
17 void* hostHandle,
18 unsigned int domainId);
19
20class CoreCLRLoader
21{
22private:
23 InitializeCoreCLRFunction initializeCoreCLR;
24 ShutdownCoreCLRFunction shutdownCoreCLR;
25 void *coreclrLib;
26 void* hostHandle;
27 unsigned int domainId;
28public:
29 static CoreCLRLoader* Create(const char *coreClrPath);
30 void* LoadFunction(const char* functionName);
31 int Finish();
32};
33#endif // CORECLRLOADER_H
34
35