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.

63 lines
1.5 KiB

  1. //----------------------------------------------------------------------------
  2. //
  3. // Generic interface-style extension support.
  4. //
  5. // Copyright (C) Microsoft Corporation, 2000.
  6. //
  7. //----------------------------------------------------------------------------
  8. #ifndef __EXT_H__
  9. #define __EXT_H__
  10. #include <dbgeng.h>
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. // Safe release and NULL.
  15. #define EXT_RELEASE(Unk) \
  16. ((Unk) != NULL ? ((Unk)->Release(), (Unk) = NULL) : NULL)
  17. HRESULT ExtQuery(PDEBUG_CLIENT Client);
  18. void ExtRelease(void);
  19. // Global variables initialized by ExtQuery.
  20. extern PDEBUG_ADVANCED g_ExtAdvanced;
  21. extern PDEBUG_CLIENT g_ExtClient;
  22. extern PDEBUG_CONTROL g_ExtControl;
  23. extern PDEBUG_DATA_SPACES g_ExtData;
  24. extern PDEBUG_REGISTERS g_ExtRegisters;
  25. extern PDEBUG_SYMBOLS g_ExtSymbols;
  26. extern PDEBUG_SYSTEM_OBJECTS g_ExtSystem;
  27. // Version 2 interfaces may be NULL.
  28. extern PDEBUG_DATA_SPACES2 g_ExtData2;
  29. extern HANDLE g_hCurrentProcess;
  30. extern HANDLE g_hCurrentThread;
  31. // Windbg-style extension interfaces queried at Initialize time.
  32. extern WINDBG_EXTENSION_APIS ExtensionApis;
  33. extern WINDBG_EXTENSION_APIS32 ExtensionApis32;
  34. extern WINDBG_EXTENSION_APIS64 ExtensionApis64;
  35. typedef BOOL
  36. (CALLBACK *PENUMERATE_UMODE_THREADS_CALLBACK)(
  37. ULONG ThreadUserId,
  38. PVOID UserContext
  39. );
  40. ULONG GetCurrentThreadUserID(void);
  41. BOOL
  42. EnumerateUModeThreads(
  43. PENUMERATE_UMODE_THREADS_CALLBACK Callback,
  44. PVOID UserContext
  45. );
  46. #ifdef __cplusplus
  47. }
  48. #endif
  49. #endif // #ifndef __EXT_H__