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.

107 lines
3.6 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1993.
  5. //
  6. // File: oleexts.h
  7. //
  8. // Contents: macros useful for OLE debugger extensions
  9. //
  10. // Classes: none
  11. //
  12. // Functions: macros for: dprintf
  13. // GetExpression
  14. // GetSymbol
  15. // Disassm
  16. // CheckControlC
  17. // DECLARE_API(...)
  18. //
  19. // History: dd-mmm-yy Author Comment
  20. // 02-Feb-95 t-ScottH author
  21. //
  22. //--------------------------------------------------------------------------
  23. #ifndef _OLEEXTS_H_
  24. #define _OLEEXTS_H_
  25. //
  26. // NTSD_EXTENSION_APIS defined in ntsdexts.h
  27. //
  28. // typedef struct _NTSD_EXTENSION_APIS {
  29. // DWORD nSize;
  30. // PNTSD_OUTPUT_ROUTINE lpOutputRoutine;
  31. // PNTSD_GET_EXPRESSION lpGetExpressionRoutine;
  32. // PNTSD_GET_SYMBOL lpGetSymbolRoutine;
  33. // PNTSD_DISASM lpDisasmRoutine
  34. // PNTSD_CHECK_CONTROL_C lpCheckControlCRoutine;
  35. // }; NTSD_EXTENSION_APIS, *PNTSD_EXTENSION_APIS
  36. //
  37. // the following macros assume global: NTSD_EXTENSION_APIS ExtensionApis
  38. // formatted print like CRT printf
  39. // void dprintf(char *format [, argument] ...);
  40. #define dprintf (ExtensionApis.lpOutputRoutine)
  41. // returns value of expression
  42. // DWORD GetExpression(char *expression);
  43. #define GetExpression (ExtensionApis.lpGetExpressionRoutine)
  44. // locates the nearest symbol
  45. // void GetSymbol(LPVOID address, PUCHAR buffer, LPDWORD lpdwDisplacement);
  46. #define GetSymbol (ExtensionApis.lpGetSymbolRoutine)
  47. // Disassembles an instruction
  48. // DWORD Disassm(LPDWORD lpdwOffset, LPSTR lpBuffer, BOOL fShowEffectiveAddress);
  49. #define Disassm (ExtensionApis.lpGetDisasmRoutine)
  50. // did user press CTRL+C
  51. // BOOL CheckControlC(void);
  52. #define CheckControlC (ExtensionApis.lpCheckControlCRoutine)
  53. //+-------------------------------------------------------------------------
  54. //
  55. // Function Macro: DECLARE_API(...)
  56. //
  57. // Synopsis: definition for an NTSD debugger extension function
  58. //
  59. // Effects:
  60. //
  61. // Arguments: [hCurrentProcess] - Handle to current process
  62. // [hCurrentThread] - Handle to current thread
  63. // [dwCurrentPc] - Copy of the program counter
  64. // [lpExtenisonApis] - pointer to NTSD_EXTENSION_APIS
  65. // (structure function pointers for NTSD)
  66. // [args] - a string of arguments from NTSD cmd line
  67. //
  68. // Requires:
  69. //
  70. // Returns: void
  71. //
  72. // Signals:
  73. //
  74. // Modifies:
  75. //
  76. // Algorithm:
  77. //
  78. // History: dd-mmm-yy Author Comment
  79. // 02-Feb-95 t-ScottH author
  80. //
  81. // Notes:
  82. // we use a function macro for defining our debugger extensions
  83. // functions to allow for easy extensibility
  84. //
  85. // !!!function names MUST be lower case!!!
  86. //
  87. //--------------------------------------------------------------------------
  88. #define DECLARE_API(s) \
  89. VOID \
  90. s( \
  91. HANDLE hCurrentProcess, \
  92. HANDLE hCurrentThread, \
  93. DWORD dwCurrentPc, \
  94. PNTSD_EXTENSION_APIS lpExtensionApis, \
  95. LPSTR args \
  96. )
  97. #endif // _OLEEXTS_H_
  98.