Leaked source code of windows server 2003
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.

117 lines
2.5 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_CATLOG 0x20000000
  38. #define LF_EXCEPTION 0x40000000
  39. #define LF_CONSOLE 0x80000000
  40. #define LF_NTBASE_ENABLED(x) ((x) & (LF_NTBASE_NAME | LF_NTBASE_FULL))
  41. #define LF_WIN32_ENABLED(x) ((x) & (LF_WIN32_NAME | LF_WIN32_FULL))
  42. #define LF_NTCON_ENABLED(x) ((x) & (LF_NTCON_NAME | LF_NTCON_FULL))
  43. #define LF_BASE_ENABLED(x) ((x) & (LF_BASE_NAME | LF_BASE_FULL))
  44. #define LF_CATLOG_ENABLED(x) ((x) & (LF_CATLOG))
  45. //
  46. // Log a thunked API
  47. //
  48. typedef struct _THUNK_LOG_CONTEXT
  49. {
  50. PULONG Stack32;
  51. UINT_PTR TableNumber;
  52. UINT_PTR ServiceNumber;
  53. BOOLEAN ServiceReturn;
  54. ULONG_PTR ReturnResult;
  55. } THUNK_LOG_CONTEXT, *PTHUNK_LOG_CONTEXT;
  56. WOW64LOGAPI
  57. NTSTATUS
  58. Wow64LogInitialize (
  59. VOID
  60. );
  61. WOW64LOGAPI
  62. NTSTATUS
  63. Wow64LogSystemService(
  64. IN PTHUNK_LOG_CONTEXT LogContext);
  65. WOW64LOGAPI
  66. NTSTATUS
  67. Wow64LogMessage(
  68. IN UINT_PTR Flags,
  69. IN PSZ Format,
  70. IN ...);
  71. WOW64LOGAPI
  72. NTSTATUS
  73. Wow64LogMessageArgList(
  74. IN UINT_PTR Flags,
  75. IN PSZ Format,
  76. IN va_list ArgList);
  77. WOW64LOGAPI
  78. NTSTATUS
  79. Wow64LogTerminate(
  80. VOID);
  81. typedef NTSTATUS (*PFNWOW64LOGINITIALIZE)(VOID);
  82. typedef NTSTATUS (*PFNWOW64LOGSYSTEMSERVICE)(IN PTHUNK_LOG_CONTEXT LogContext);
  83. typedef NTSTATUS (*PFNWOW64LOGMESSAGEARGLIST)(IN UINT_PTR Flags,
  84. IN PSZ Format,
  85. IN va_list ArgList);
  86. typedef NTSTATUS (*PFNWOW64LOGTERMINATE)(VOID);
  87. #endif // _WOW64LOG_INCLUDE