Fix native library resolver not working after hot-reload

This commit is contained in:
2022-12-24 03:13:40 +02:00
parent 48214f925b
commit 759a9bd365
5 changed files with 53 additions and 13 deletions

View File

@@ -121,6 +121,12 @@ void* CoreCLR::GetStaticMethodPointer(const String& methodName)
return fun;
}
void CoreCLR::RegisterNativeLibrary(const char* moduleName, const char* modulePath)
{
static void* RegisterNativeLibraryPtr = CoreCLR::GetStaticMethodPointer(TEXT("RegisterNativeLibrary"));
CoreCLR::CallStaticMethod<void, const char*, const char*>(RegisterNativeLibraryPtr, moduleName, modulePath);
}
void* CoreCLR::Allocate(int size)
{
#if PLATFORM_WINDOWS

View File

@@ -47,6 +47,8 @@ public:
return ((fun)methodPtr)(args...);
}
static void RegisterNativeLibrary(const char* moduleName, const char* modulePath);
static const char* GetClassFullname(void* klass);
static void* Allocate(int size);
static void Free(void* ptr);