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.

86 lines
1.8 KiB

  1. /*******************************************************************
  2. *
  3. * File : common.h
  4. * Author : Eyal Schwartz
  5. * Copyrights : Microsoft Corp (C) 1996
  6. * Date : 9/17/1996
  7. * Description : common declarations
  8. *
  9. * Revisions : <date> <name> <description>
  10. *******************************************************************/
  11. #ifndef COMMON_H
  12. #define COMMON_H
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. // include //
  17. #include <nt.h>
  18. #include <ntrtl.h>
  19. #include <nturtl.h>
  20. #ifdef __cplusplus
  21. }
  22. #endif
  23. #include <tchar.h>
  24. #include <windows.h>
  25. #include <assert.h>
  26. #include <stdio.h>
  27. #include <ntsdexts.h>
  28. // #include <crtdbg.h>
  29. // defines //
  30. // defaults
  31. #define MAXSTR 1024
  32. #define MAXLIST 256
  33. #define MAX_TINY_LIST 32
  34. // ntsd extensions
  35. // Macros to easily access extensions helper routines for printing, etc.
  36. // In particular, Printf() takes the same arguments as the CRT printf().
  37. //
  38. #define ASSIGN_NTSDEXTS_GLOBAL(api, str, proc) \
  39. { \
  40. glpExtensionApis = api; \
  41. glpArgumentString = str; \
  42. ghCurrentProcess = proc; \
  43. }
  44. extern PNTSD_EXTENSION_APIS glpExtensionApis;
  45. extern LPSTR glpArgumentString;
  46. extern LPVOID ghCurrentProcess;
  47. #define Printf (glpExtensionApis->lpOutputRoutine)
  48. #define GetSymbol (glpExtensionApis->lpGetSymbolRoutine)
  49. #define GetExpr (glpExtensionApis->lpGetExpressionRoutine)
  50. #define CheckC (glpExtensionApis->lpCheckControlCRoutine)
  51. #ifdef DEBUG
  52. #define DEBUG0(str) Printf(str)
  53. #define DEBUG1(format, arg1) Printf(format, arg1)
  54. #define DEBUG2(format, arg1, arg2) Printf(format, arg1, arg2)
  55. #else
  56. #define DEBUG0(str)
  57. #define DEBUG1(format, arg1)
  58. #define DEBUG2(format, arg1, arg2)
  59. #endif
  60. #endif
  61. /******************* EOF *********************/
  62.