The following infomation is from Dave Cramer(davecramer@gmail.com).
authorHiroshi Inoue <h-inoue@dream.email.ne.jp>
Wed, 20 Jul 2016 10:40:42 +0000 (19:40 +0900)
committerHiroshi Inoue <h-inoue@dream.email.ne.jp>
Wed, 20 Jul 2016 10:49:23 +0000 (19:49 +0900)
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

index a1bf01e4959d83d34fd1b4ef68692ed8984dff6d..3f3a6b8d005fb252de899fa503b2e8a9130371e6 100644 (file)
--- a/loadlib.c
+++ b/loadlib.c
@@ -15,6 +15,8 @@
 #include <errno.h>
 #endif /* WIN32 */
 
+#define    DELAYIMP_INSECURE_WRITABLE_HOOKS
+
 #include "loadlib.h"
 #include "pgenlist.h"