Fix code for loadlibrary on windows and fix code for certain platforms

This commit is contained in:
2025-01-26 09:22:10 -06:00
parent f2ce9d260c
commit 3f337239e4
4 changed files with 7 additions and 14 deletions

View File

@ -26,7 +26,7 @@ namespace Tesses::CrossLang
T Resolve(std::string name)
{
#if defined(_WIN32)
return (T)GetProcAddress(handle,name.c_str());
return (T)GetProcAddress((HMODULE)handle,name.c_str());
#else
return (T)dlsym(handle,name.c_str());
@ -35,7 +35,7 @@ namespace Tesses::CrossLang
~DL()
{
#if defined(_WIN32)
FreeLibrary(handle);
FreeLibrary((HMODULE)handle);
#else
dlclose(handle);
#endif
@ -425,4 +425,4 @@ namespace Tesses::CrossLang
gc->BarrierEnd();
env->permissions.locked=true;
}
}
}