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.

91 lines
2.0 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 <strsafe.h>
  20. #define INITGUID
  21. #include <dbgeng.h>
  22. #include <guiddef.h>
  23. #include <lmerr.h>
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. //
  28. // undef the wdbgexts
  29. //
  30. #undef DECLARE_API
  31. #define DECLARE_API(extension) \
  32. CPPMOD HRESULT CALLBACK extension(PDEBUG_CLIENT Client, PCSTR args)
  33. #define INIT_API() \
  34. HRESULT Status; \
  35. if ((Status = ExtQuery(Client)) != S_OK) return Status;
  36. #define EXIT_API ExtRelease
  37. // Safe release and NULL.
  38. #define EXT_RELEASE(Unk) \
  39. ((Unk) != NULL ? ((Unk)->Release(), (Unk) = NULL) : NULL)
  40. // Global variables initialized by query.
  41. extern PDEBUG_ADVANCED g_ExtAdvanced;
  42. extern PDEBUG_CLIENT g_ExtClient;
  43. extern PDEBUG_DATA_SPACES3 g_ExtData;
  44. extern PDEBUG_REGISTERS g_ExtRegisters;
  45. extern PDEBUG_SYMBOLS2 g_ExtSymbols;
  46. extern PDEBUG_SYSTEM_OBJECTS3 g_ExtSystem;
  47. extern PDEBUG_CONTROL3 g_ExtControl;
  48. extern ULONG TargetMachine;
  49. HRESULT
  50. ExtQuery(PDEBUG_CLIENT Client);
  51. void
  52. ExtRelease(void);
  53. // Error output.
  54. void __cdecl ExtErr(PCSTR Format, ...);
  55. //-----------------------------------------------------------------------------------------
  56. //
  57. // api declaration macros & api access macros
  58. //
  59. //-----------------------------------------------------------------------------------------
  60. extern WINDBG_EXTENSION_APIS ExtensionApis;
  61. extern ULONG TargetMachine;
  62. extern ULONG g_TargetClass;
  63. extern ULONG g_TargetBuild;
  64. extern ULONG g_TargetPlatform;
  65. #ifdef __cplusplus
  66. }
  67. #endif