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.

87 lines
1.8 KiB

  1. /*++
  2. Copyright (c) 1993-1999 Microsoft Corporation
  3. Module Name:
  4. precomp.h
  5. Abstract:
  6. This header file is used to cause the correct machine/platform specific
  7. data structures to be used when compiling for a non-hosted platform.
  8. --*/
  9. // This is a 64 bit aware debugger extension
  10. #define KDEXT_64BIT
  11. #include <nt.h>
  12. #include <ntrtl.h>
  13. #include <nturtl.h>
  14. #include <windows.h>
  15. #include <wdbgexts.h>
  16. #include <stdio.h>
  17. #include <stdlib.h>
  18. #include <string.h>
  19. #include <dbgeng.h>
  20. #include <lmerr.h>
  21. #include "extsfns.h"
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. //
  26. // undef the wdbgexts
  27. //
  28. #undef DECLARE_API
  29. #define DECLARE_API(extension) \
  30. CPPMOD HRESULT CALLBACK extension(PDEBUG_CLIENT Client, PCSTR args)
  31. #define INIT_API() \
  32. HRESULT Status; \
  33. if ((Status = ExtQuery(Client)) != S_OK) return Status;
  34. #define EXIT_API ExtRelease
  35. // Safe release and NULL.
  36. #define EXT_RELEASE(Unk) \
  37. ((Unk) != NULL ? ((Unk)->Release(), (Unk) = NULL) : NULL)
  38. // Global variables initialized by query.
  39. extern PDEBUG_ADVANCED g_ExtAdvanced;
  40. extern PDEBUG_CLIENT g_ExtClient;
  41. extern PDEBUG_CONTROL g_ExtControl;
  42. extern PDEBUG_DATA_SPACES g_ExtData;
  43. extern PDEBUG_REGISTERS g_ExtRegisters;
  44. extern PDEBUG_SYMBOLS g_ExtSymbols;
  45. extern PDEBUG_SYSTEM_OBJECTS g_ExtSystem;
  46. extern PDEBUG_CONTROL2 g_ExtControl2;
  47. extern ULONG TargetMachine;
  48. HRESULT
  49. ExtQuery(PDEBUG_CLIENT Client);
  50. void
  51. ExtRelease(void);
  52. //-----------------------------------------------------------------------------------------
  53. //
  54. // api declaration macros & api access macros
  55. //
  56. //-----------------------------------------------------------------------------------------
  57. extern WINDBG_EXTENSION_APIS ExtensionApis;
  58. extern ULONG TargetMachine;
  59. extern ULONG g_TargetClass;
  60. #ifdef __cplusplus
  61. }
  62. #endif