diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-04-04 14:48:14 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-04-04 14:48:14 +0000 |
commit | 7b57637c32ea9c179c4fa694a98afc64e4922e56 (patch) | |
tree | df76223368ddb6b95942e2d67743946047e19553 /src/common/dll.h | |
parent | 177e5a3af1b7b421c027dfc06abc6e6b8ca10e28 (diff) | |
download | hercules-7b57637c32ea9c179c4fa694a98afc64e4922e56.tar.gz hercules-7b57637c32ea9c179c4fa694a98afc64e4922e56.tar.bz2 hercules-7b57637c32ea9c179c4fa694a98afc64e4922e56.tar.xz hercules-7b57637c32ea9c179c4fa694a98afc64e4922e56.zip |
* Added dll.h
* Update base code for the UPNP plugin loading
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1398 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/dll.h')
-rw-r--r-- | src/common/dll.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/common/dll.h b/src/common/dll.h new file mode 100644 index 000000000..ec6f8cbed --- /dev/null +++ b/src/common/dll.h @@ -0,0 +1,25 @@ +
+#ifndef _DLL_H_
+#define _DLL_H_
+
+#ifdef _WIN32
+
+ #include <windows.h>
+ #define DLL_OPEN(x) LoadLibrary(x)
+ #define DLL_SYM(x,y,z) (FARPROC)x=GetProcAddress(y,z)
+ #define DLL_CLOSE(x) FreeLibrary(x)
+ #define DLL HINSTANCE
+
+#else
+
+ #include <dlfcn.h>
+ #define DLL_OPEN(x) dlopen(x,RTLD_NOW)
+ #define DLL_SYM(x,y,z) x=(void *)dlsym(y,z)
+ #define DLL_CLOSE(x) dlclose(x)
+ #define DLL void*
+
+#endif
+
+#endif // _DLL_H_
+
+
|