Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
1.5 KiB

  1. #ifndef _AMLI_HOOK_
  2. #define _AMLI_HOOK_
  3. extern ULONG g_AmliHookEnabled;
  4. #define AMLIHOOK_ENABLED_VALUE 608
  5. //
  6. // AcpitlTestFlags
  7. //
  8. #define AMLIHOOK_TEST_FLAGS_HOOK_API 1
  9. #define AMLIHOOK_TEST_FLAGS_DBG_ON_ERROR 2
  10. #define AMLIHOOK_TEST_FLAGS_NO_NOTIFY_ON_CALL 4
  11. #define AMLIHOOK_TEST_FLAGS_HOOK_MASK ((ULONG)(AMLIHOOK_TEST_FLAGS_HOOK_API))
  12. //
  13. // AMLIHOOK_DATA call back data struct
  14. //
  15. typedef struct _AMLIHOOK_DATA
  16. {
  17. UCHAR Type;
  18. UCHAR SubType;
  19. ULONG State;
  20. ULONG Id;
  21. ULONG_PTR Arg1;
  22. ULONG_PTR Arg2;
  23. ULONG_PTR Arg3;
  24. ULONG_PTR Arg4;
  25. ULONG_PTR Arg5;
  26. ULONG_PTR Arg6;
  27. ULONG_PTR Arg7;
  28. NTSTATUS Ret;
  29. } AMLIHOOK_DATA , *PAMLIHOOK_DATA;
  30. //
  31. //--- state member
  32. //
  33. #define AMLIHOOK_TEST_DATA_STATE_CALL 1
  34. #define AMLIHOOK_TEST_DATA_STATE_RETURN 2
  35. #define AMLIHOOK_TEST_DATA_STATE_ASYNC_CALL 3
  36. #define AMLIHOOK_TEST_DATA_STATE_QUERY 4
  37. #define AMLIHOOK_TEST_DATA_CALL_STATE_MASK (AMLIHOOK_TEST_DATA_STATE_CALL | AMLIHOOK_TEST_DATA_STATE_ASYNC_CALL)
  38. #define AMLIHOOK_CALLBACK_NAME L"\\Callback\\AMLIHOOK"
  39. #define IsAmliHookEnabled() g_AmliHookEnabled
  40. ULONG
  41. AmliHook_GetDbgFlags(
  42. VOID);
  43. VOID
  44. AmliHook_InitTestData(
  45. PAMLIHOOK_DATA Data);
  46. PAMLIHOOK_DATA
  47. AmliHook_AllocAndInitTestData(
  48. VOID);
  49. NTSTATUS
  50. AmliHook_InitTestHookInterface(
  51. VOID);
  52. VOID
  53. AmliHook_UnInitTestHookInterface(
  54. VOID);
  55. NTSTATUS
  56. AmliHook_TestNotify(
  57. PAMLIHOOK_DATA Data);
  58. NTSTATUS
  59. AmliHook_TestNotifyRet(
  60. PAMLIHOOK_DATA Data,
  61. NTSTATUS Status);
  62. VOID
  63. AmliHook_ProcessInternalError(
  64. VOID);
  65. #endif