Fix native library resolver not working after hot-reload
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user