From 6052c29f12cb7eb1f1f74da9fe3e5aaae195f76a Mon Sep 17 00:00:00 2001 From: Hiroshi Inoue Date: Wed, 20 Jul 2016 19:40:42 +0900 Subject: [PATCH] The following infomation is from Dave Cramer(davecramer@gmail.com). Prior to Visual Studio 2015 Update 3, the hook functions of type PfnDliHook __pfnDliNotifyHook2 and __pfnDliFailureHook2 were non-const. They were made const to improve security (global, writable function pointers are bad). If for backwards compatibility you require the hooks to be writable, define the macro DELAYIMP_INSECURE_WRITABLE_HOOKS prior to including this header and provide your own non-const definition of the hooks. --- loadlib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/loadlib.c b/loadlib.c index a1bf01e..3f3a6b8 100644 --- a/loadlib.c +++ b/loadlib.c @@ -15,6 +15,8 @@ #include #endif /* WIN32 */ +#define DELAYIMP_INSECURE_WRITABLE_HOOKS + #include "loadlib.h" #include "pgenlist.h" -- 2.39.5