anope- supernets anope source code & configuration |
git clone git://git.acid.vegas/anope.git |
Log | Files | Refs | Archive | README |
dl.cpp (646B)
1 /* POSIX emulation layer for Windows. 2 * 3 * (C) 2008-2022 Anope Team 4 * Contact us at team@anope.org 5 * 6 * Please read COPYING and README for further details. 7 */ 8 9 #include "services.h" 10 #include "anope.h" 11 12 void *dlopen(const char *filename, int) 13 { 14 return LoadLibrary(filename); 15 } 16 17 char *dlerror(void) 18 { 19 static Anope::string err; 20 err = Anope::LastError(); 21 SetLastError(0); 22 return err.empty() ? NULL : const_cast<char *>(err.c_str()); 23 } 24 25 void *dlsym(void *handle, const char *symbol) 26 { 27 return GetProcAddress(reinterpret_cast<HMODULE>(handle), symbol); 28 } 29 30 int dlclose(void *handle) 31 { 32 return !FreeLibrary(reinterpret_cast<HMODULE>(handle)); 33 }