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.

115 lines
2.3 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. wow64.h
  5. Abstract:
  6. Public header for wow64log.dll
  7. Author:
  8. 3-Oct-1999 SamerA
  9. Revision History:
  10. --*/
  11. #ifndef _WOW64LOG_INCLUDE
  12. #define _WOW64LOG_INCLUDE
  13. //
  14. // Make wow64log.dll exports __declspec(dllimport) when this header is included
  15. // by non-wow64 components
  16. //
  17. #if !defined(_WOW64LOGAPI_)
  18. #define WOW64LOGAPI DECLSPEC_IMPORT
  19. #else
  20. #define WOW64LOGAPI
  21. #endif
  22. #define WOW64LOGOUTPUT(_x_) Wow64LogMessage _x_
  23. //
  24. // Log flags
  25. //
  26. #define LF_NONE 0x00000000
  27. #define LF_ERROR 0x00000001
  28. #define LF_TRACE 0x00000002
  29. #define LF_NTBASE_NAME 0x00000004
  30. #define LF_NTBASE_FULL 0x00000008
  31. #define LF_WIN32_NAME 0x00000010
  32. #define LF_WIN32_FULL 0x00000020
  33. #define LF_NTCON_NAME 0x00000040
  34. #define LF_NTCON_FULL 0x00000080
  35. #define LF_BASE_NAME 0x00000100
  36. #define LF_BASE_FULL 0x00000200
  37. #define LF_EXCEPTION 0x40000000
  38. #define LF_CONSOLE 0x80000000
  39. #define LF_NTBASE_ENABLED(x) ((x) & (LF_NTBASE_NAME | LF_NTBASE_FULL))
  40. #define LF_WIN32_ENABLED(x) ((x) & (LF_WIN32_NAME | LF_WIN32_FULL))
  41. #define LF_NTCON_ENABLED(x) ((x) & (LF_NTCON_NAME | LF_NTCON_FULL))
  42. #define LF_BASE_ENABLED(x) ((x) & (LF_BASE_NAME | LF_BASE_FULL))
  43. //
  44. // Log a thunked API
  45. //
  46. typedef struct _THUNK_LOG_CONTEXT
  47. {
  48. PULONG Stack32;
  49. UINT_PTR TableNumber;
  50. UINT_PTR ServiceNumber;
  51. BOOLEAN ServiceReturn;
  52. ULONG_PTR ReturnResult;
  53. } THUNK_LOG_CONTEXT, *PTHUNK_LOG_CONTEXT;
  54. WOW64LOGAPI
  55. NTSTATUS
  56. Wow64LogInitialize (
  57. VOID
  58. );
  59. WOW64LOGAPI
  60. NTSTATUS
  61. Wow64LogSystemService(
  62. IN PTHUNK_LOG_CONTEXT LogContext);
  63. WOW64LOGAPI
  64. NTSTATUS
  65. Wow64LogMessage(
  66. IN UINT_PTR Flags,
  67. IN PSZ Format,
  68. IN ...);
  69. WOW64LOGAPI
  70. NTSTATUS
  71. Wow64LogMessageArgList(
  72. IN UINT_PTR Flags,
  73. IN PSZ Format,
  74. IN va_list ArgList);
  75. WOW64LOGAPI
  76. NTSTATUS
  77. Wow64LogTerminate(
  78. VOID);
  79. typedef NTSTATUS (*PFNWOW64LOGINITIALIZE)(VOID);
  80. typedef NTSTATUS (*PFNWOW64LOGSYSTEMSERVICE)(IN PTHUNK_LOG_CONTEXT LogContext);
  81. typedef NTSTATUS (*PFNWOW64LOGMESSAGEARGLIST)(IN UINT_PTR Flags,
  82. IN PSZ Format,
  83. IN va_list ArgList);
  84. typedef NTSTATUS (*PFNWOW64LOGTERMINATE)(VOID);
  85. #endif // _WOW64LOG_INCLUDE