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.
#include <errno.h>
#endif /* WIN32 */
+#define DELAYIMP_INSECURE_WRITABLE_HOOKS
+
#include "loadlib.h"
#include "pgenlist.h"