diff options
Diffstat (limited to 'src/ildasm/unixcoreclrloader/coreclrloader.h')
-rw-r--r-- | src/ildasm/unixcoreclrloader/coreclrloader.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/ildasm/unixcoreclrloader/coreclrloader.h b/src/ildasm/unixcoreclrloader/coreclrloader.h new file mode 100644 index 0000000000..93dc90e96c --- /dev/null +++ b/src/ildasm/unixcoreclrloader/coreclrloader.h @@ -0,0 +1,34 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +#ifndef CORECLRLOADER_H +#define CORECLRLOADER_H +typedef int (*InitializeCoreCLRFunction)( + const char* exePath, + const char* appDomainFriendlyName, + int propertyCount, + const char** propertyKeys, + const char** propertyValues, + void** hostHandle, + unsigned int* domainId); + +typedef int (*ShutdownCoreCLRFunction)( + void* hostHandle, + unsigned int domainId); + +class CoreCLRLoader +{ +private: + InitializeCoreCLRFunction initializeCoreCLR; + ShutdownCoreCLRFunction shutdownCoreCLR; + void *coreclrLib; + void* hostHandle; + unsigned int domainId; +public: + static CoreCLRLoader* Create(const char *coreClrPath); + void* LoadFunction(const char* functionName); + int Finish(); +}; +#endif // CORECLRLOADER_H + |