delayloadhandler.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. #if NTDDI_VERSION >= NTDDI_WIN8
  12. #define DELAYLOAD_GPA_FAILURE 4
  13. typedef struct _DELAYLOAD_PROC_DESCRIPTOR {
  14. ULONG ImportDescribedByName;
  15. union {
  16. LPCSTR Name;
  17. ULONG Ordinal;
  18. } Description;
  19. } DELAYLOAD_PROC_DESCRIPTOR, *PDELAYLOAD_PROC_DESCRIPTOR;
  20. typedef struct _DELAYLOAD_INFO {
  21. ULONG Size;
  22. PCIMAGE_DELAYLOAD_DESCRIPTOR DelayloadDescriptor;
  23. PIMAGE_THUNK_DATA ThunkAddress;
  24. LPCSTR TargetDllName;
  25. DELAYLOAD_PROC_DESCRIPTOR TargetApiDescriptor;
  26. PVOID TargetModuleBase;
  27. PVOID Unused;
  28. ULONG LastError;
  29. } DELAYLOAD_INFO, *PDELAYLOAD_INFO;
  30. typedef PVOID (WINAPI *PDELAYLOAD_FAILURE_DLL_CALLBACK)(ULONG NotificationReason,PDELAYLOAD_INFO DelayloadInfo);
  31. extern PDELAYLOAD_FAILURE_DLL_CALLBACK __pfnDliFailureHook2;
  32. #endif
  33. #ifdef __cplusplus
  34. }
  35. #endif
  36. #endif