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.

85 lines
1.8 KiB

  1. /*++
  2. Copyright (c) 1985 - 1999, Microsoft Corporation
  3. Module Name:
  4. kdexts.c
  5. Abstract:
  6. This file contains the generic routines and initialization code
  7. for the kernel debugger extensions dll.
  8. Author:
  9. Wesley Witt (wesw) 26-Aug-1993
  10. Environment:
  11. User Mode
  12. --*/
  13. #include "precomp.h"
  14. #pragma hdrstop
  15. #include <imagehlp.h>
  16. #include <wdbgexts.h>
  17. #include <ntsdexts.h>
  18. #include <ntverp.h>
  19. //
  20. // globals
  21. //
  22. EXT_API_VERSION ApiVersion = { VER_PRODUCTVERSION_W >> 8,
  23. VER_PRODUCTVERSION_W & 0xff,
  24. EXT_API_VERSION_NUMBER64, 0 };
  25. WINDBG_EXTENSION_APIS ExtensionApis;
  26. USHORT SavedMajorVersion;
  27. USHORT SavedMinorVersion;
  28. BOOL bDebuggingChecked;
  29. VOID
  30. WinDbgExtensionDllInit(
  31. WINDBG_EXTENSION_APIS *lpExtensionApis,
  32. USHORT MajorVersion,
  33. USHORT MinorVersion)
  34. {
  35. ExtensionApis = *lpExtensionApis;
  36. SavedMajorVersion = MajorVersion;
  37. SavedMinorVersion = MinorVersion;
  38. bDebuggingChecked = (SavedMajorVersion == 0x0c);
  39. }
  40. DECLARE_API( version )
  41. {
  42. #if DBG
  43. PCHAR DebuggerType = "Checked";
  44. #else
  45. PCHAR DebuggerType = "Free";
  46. #endif // DBG
  47. UNREFERENCED_PARAMETER(args);
  48. UNREFERENCED_PARAMETER(dwProcessor);
  49. UNREFERENCED_PARAMETER(dwCurrentPc);
  50. UNREFERENCED_PARAMETER(hCurrentThread);
  51. UNREFERENCED_PARAMETER(hCurrentProcess);
  52. dprintf( "%s Extension dll for Build %d debugging %s kernel for Build %d\n",
  53. DebuggerType,
  54. VER_PRODUCTBUILD,
  55. SavedMajorVersion == 0x0c ? "Checked" : "Free",
  56. SavedMinorVersion
  57. );
  58. }
  59. LPEXT_API_VERSION
  60. ExtensionApiVersion(
  61. VOID)
  62. {
  63. return &ApiVersion;
  64. }