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.

61 lines
1.6 KiB

  1. //----------------------------------------------------------------------------
  2. //
  3. // Debugger engine extension helper library.
  4. //
  5. // Copyright (C) Microsoft Corporation, 1999-2000.
  6. //
  7. //----------------------------------------------------------------------------
  8. #ifndef __ENGEXTS_H__
  9. #define __ENGEXTS_H__
  10. #include <stdlib.h>
  11. #include <stdio.h>
  12. #include <windows.h>
  13. #include <dbgeng.h>
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. // Safe release and NULL.
  18. #define EXT_RELEASE(Unk) \
  19. ((Unk) != NULL ? ((Unk)->Release(), (Unk) = NULL) : NULL)
  20. // Global variables initialized by query.
  21. extern PDEBUG_ADVANCED g_ExtAdvanced;
  22. extern PDEBUG_CLIENT g_ExtClient;
  23. extern PDEBUG_CONTROL g_ExtControl;
  24. extern PDEBUG_DATA_SPACES g_ExtData;
  25. extern PDEBUG_DATA_SPACES2 g_ExtData2;
  26. extern PDEBUG_REGISTERS g_ExtRegisters;
  27. extern PDEBUG_SYMBOLS g_ExtSymbols;
  28. extern PDEBUG_SYSTEM_OBJECTS g_ExtSystem;
  29. // Prototype just to force the extern "C".
  30. // The implementation of these functions are not provided.
  31. HRESULT CALLBACK DebugExtensionInitialize(PULONG Version, PULONG Flags);
  32. void CALLBACK DebugExtensionUninitialize(void);
  33. // Queries for all debugger interfaces.
  34. HRESULT ExtQuery(PDEBUG_CLIENT Client);
  35. // Cleans up all debugger interfaces.
  36. void ExtRelease(void);
  37. // Normal output.
  38. void __cdecl ExtOut(PCSTR Format, ...);
  39. // Error output.
  40. void __cdecl ExtErr(PCSTR Format, ...);
  41. // Warning output.
  42. void __cdecl ExtWarn(PCSTR Format, ...);
  43. // Verbose output.
  44. void __cdecl ExtVerb(PCSTR Format, ...);
  45. #ifdef __cplusplus
  46. }
  47. #endif
  48. #endif // #ifndef __ENGEXTS_H__