mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-03 08:00:50 +00:00
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@691 b9cfdab3-6d41-4d17-bbe4-086880011989
29 lines
554 B
C
29 lines
554 B
C
/* $Id$ */
|
|
#include <Mw/Milsko.h>
|
|
|
|
#if defined(_WIN32)
|
|
void* MwDynamicOpen(const char* path) {
|
|
return LoadLibrary(path);
|
|
}
|
|
|
|
void* MwDynamicSymbol(void* handle, const char* symbol) {
|
|
return GetProcAddress(handle, symbol);
|
|
}
|
|
|
|
void MwDynamicClose(void* handle) {
|
|
FreeLibrary(handle);
|
|
}
|
|
#elif defined(__unix__)
|
|
void* MwDynamicOpen(const char* path) {
|
|
return dlopen(path, RTLD_LOCAL | RTLD_LAZY);
|
|
}
|
|
|
|
void* MwDynamicSymbol(void* handle, const char* symbol) {
|
|
return dlsym(handle, symbol);
|
|
}
|
|
|
|
void MwDynamicClose(void* handle) {
|
|
dlclose(handle);
|
|
}
|
|
#endif
|