summaryrefslogtreecommitdiff
path: root/src/common/HPM.h
diff options
context:
space:
mode:
authorDastgir <dastgirpojee@rocketmail.com>2015-01-15 12:11:08 +0530
committerDastgir <dastgirpojee@rocketmail.com>2015-01-15 12:11:08 +0530
commit06166cac023cefa193926de5a47dd7bc11f298b3 (patch)
tree3e235122b16652e9262736e82d0f0804680aae22 /src/common/HPM.h
parent9fbeb05aa054b5ed9641460d2639f30812edd957 (diff)
parent3c032b6766ded92ef032862ff3b812cad0eacefd (diff)
downloadhercules-06166cac023cefa193926de5a47dd7bc11f298b3.tar.gz
hercules-06166cac023cefa193926de5a47dd7bc11f298b3.tar.bz2
hercules-06166cac023cefa193926de5a47dd7bc11f298b3.tar.xz
hercules-06166cac023cefa193926de5a47dd7bc11f298b3.zip
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'src/common/HPM.h')
-rw-r--r--src/common/HPM.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/HPM.h b/src/common/HPM.h
index 4e1aa5beb..973bc6cca 100644
--- a/src/common/HPM.h
+++ b/src/common/HPM.h
@@ -19,6 +19,7 @@
#define plugin_open(x) LoadLibraryA(x)
#define plugin_import(x,y,z) (z)GetProcAddress((x),(y))
#define plugin_close(x) FreeLibrary(x)
+ #define plugin_geterror(buf) (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0, buf, sizeof(buf), NULL) ? buf : "Unknown error")
#define DLL_EXT ".dll"
#define DLL HINSTANCE
@@ -31,6 +32,7 @@
#endif // RTLD_DEEPBIND
#define plugin_import(x,y,z) (z)dlsym((x),(y))
#define plugin_close(x) dlclose(x)
+ #define plugin_geterror(buf) ((void)buf, dlerror())
#if defined CYGWIN
#define DLL_EXT ".dll"