mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
add unload_dso
This commit is contained in:
parent
a45633710c
commit
d476975e6c
@ -28,11 +28,16 @@ load_dso(const Filename &)
|
|||||||
return (void *) NULL;
|
return (void *) NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
unload_dso(void *dso_handle) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
string
|
string
|
||||||
load_dso_error()
|
load_dso_error()
|
||||||
{
|
{
|
||||||
ostringstream ps2errmsg;
|
ostringstream ps2errmsg;
|
||||||
ps2errmsg << "load_dso_error() unsupported on PS2. (CSN)";
|
ps2errmsg << "load_dso_error() unsupported on PS2";
|
||||||
|
|
||||||
return ps2errmsg.str();
|
return ps2errmsg.str();
|
||||||
}
|
}
|
||||||
@ -53,6 +58,14 @@ load_dso(const Filename &filename) {
|
|||||||
return LoadLibrary(os_specific.c_str());
|
return LoadLibrary(os_specific.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
unload_dso(void *dso_handle) {
|
||||||
|
HMODULE dll_handle = (HMODULE) dso_handle;
|
||||||
|
|
||||||
|
// true indicates success
|
||||||
|
return FreeLibrary(dll_handle);
|
||||||
|
}
|
||||||
|
|
||||||
string
|
string
|
||||||
load_dso_error() {
|
load_dso_error() {
|
||||||
DWORD last_error = GetLastError();
|
DWORD last_error = GetLastError();
|
||||||
@ -136,6 +149,11 @@ load_dso(const Filename &filename) {
|
|||||||
return dlopen(os_specific.c_str(), RTLD_NOW);
|
return dlopen(os_specific.c_str(), RTLD_NOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
unload_dso(void *dso_handle) {
|
||||||
|
return dlclose(dso_handle)==0;
|
||||||
|
}
|
||||||
|
|
||||||
string
|
string
|
||||||
load_dso_error() {
|
load_dso_error() {
|
||||||
return dlerror();
|
return dlerror();
|
||||||
|
@ -29,6 +29,10 @@
|
|||||||
EXPCL_DTOOL void *
|
EXPCL_DTOOL void *
|
||||||
load_dso(const Filename &filename);
|
load_dso(const Filename &filename);
|
||||||
|
|
||||||
|
// true indicates success
|
||||||
|
EXPCL_DTOOL bool
|
||||||
|
unload_dso(void *dso_handle);
|
||||||
|
|
||||||
// Returns the error message from the last failed load_dso() call.
|
// Returns the error message from the last failed load_dso() call.
|
||||||
|
|
||||||
EXPCL_DTOOL string
|
EXPCL_DTOOL string
|
||||||
|
Loading…
x
Reference in New Issue
Block a user