aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-09-08 14:40:11 +0000
committerlloyd <[email protected]>2010-09-08 14:40:11 +0000
commitce6f645b897b471e664c7ebb3259920a742767f8 (patch)
tree2dbf4e78dc6517bc7d9d6ea249d83f9eefd209c9 /src/utils
parent469bad701949a839672f2df469b50f14f34e3875 (diff)
Under certain compilation modules, HMODULE isn't a void* but rather a
pointer to a nonce struct; presumably for slightly better typechecking. In case we're compiling under such a mode, case the first argument to FreeLibrary and GetProcAddress to a HMODULE.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/dyn_load/dyn_load.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/dyn_load/dyn_load.cpp b/src/utils/dyn_load/dyn_load.cpp
index 5f3814778..4a8cb16fa 100644
--- a/src/utils/dyn_load/dyn_load.cpp
+++ b/src/utils/dyn_load/dyn_load.cpp
@@ -54,7 +54,7 @@ Dynamically_Loaded_Library::~Dynamically_Loaded_Library()
#if defined(BOTAN_TARGET_OS_HAS_DLOPEN)
::dlclose(lib);
#elif defined(BOTAN_TARGET_OS_HAS_LOADLIBRARY)
- ::FreeLibrary(lib);
+ ::FreeLibrary((HMODULE)lib);
#endif
}
@@ -65,7 +65,7 @@ void* Dynamically_Loaded_Library::resolve_symbol(const std::string& symbol)
#if defined(BOTAN_TARGET_OS_HAS_DLOPEN)
addr = ::dlsym(lib, symbol.c_str());
#elif defined(BOTAN_TARGET_OS_HAS_LOADLIBRARY)
- addr = ::GetProcAddress(lib, symbol.c_str());
+ addr = ::GetProcAddress((HMODULE)lib, symbol.c_str());
#endif
if(!addr)