master
 1/**
 2 * This file has no copyright assigned and is placed in the Public Domain.
 3 * This file is part of the mingw-w64 runtime package.
 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
 5 */
 6#ifndef __delayloadhandler_h__
 7#define __delayloadhandler_h__
 8
 9#ifdef __cplusplus
10extern "C" {
11#endif
12
13#if NTDDI_VERSION >= NTDDI_WIN8
14
15#define DELAYLOAD_GPA_FAILURE 4
16
17typedef struct _DELAYLOAD_PROC_DESCRIPTOR {
18  ULONG ImportDescribedByName;
19  union {
20    LPCSTR Name;
21    ULONG Ordinal;
22  } Description;
23} DELAYLOAD_PROC_DESCRIPTOR, *PDELAYLOAD_PROC_DESCRIPTOR;
24
25typedef struct _DELAYLOAD_INFO {
26  ULONG Size;
27  PCIMAGE_DELAYLOAD_DESCRIPTOR DelayloadDescriptor;
28  PIMAGE_THUNK_DATA ThunkAddress;
29  LPCSTR TargetDllName;
30  DELAYLOAD_PROC_DESCRIPTOR TargetApiDescriptor;
31  PVOID TargetModuleBase;
32  PVOID Unused;
33  ULONG LastError;
34} DELAYLOAD_INFO, *PDELAYLOAD_INFO;
35
36
37typedef PVOID (WINAPI *PDELAYLOAD_FAILURE_DLL_CALLBACK)(ULONG NotificationReason,PDELAYLOAD_INFO DelayloadInfo);
38
39extern PDELAYLOAD_FAILURE_DLL_CALLBACK __pfnDliFailureHook2;
40
41#endif
42
43#ifdef __cplusplus
44}
45#endif
46#endif