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.

181 lines
2.3 KiB

  1. /*++
  2. Copyright (c) 1999-2001 Microsoft Corporation
  3. Module Name:
  4. apool.c
  5. Abstract:
  6. Dumps Application Pool structures.
  7. Author:
  8. Michael Courage (mcourage) 21-Oct-1999
  9. Environment:
  10. User Mode.
  11. Revision History:
  12. --*/
  13. #include "precomp.h"
  14. //
  15. // Private prototypes.
  16. //
  17. //
  18. // Public functions.
  19. //
  20. DECLARE_API( apool )
  21. /*++
  22. Routine Description:
  23. Dumps a UL_APP_POOL_OBJECT structure.
  24. Arguments:
  25. Address of structure
  26. Return Value:
  27. None.
  28. --*/
  29. {
  30. ULONG_PTR address = 0;
  31. CHAR star = 0;
  32. ULONG result;
  33. UL_APP_POOL_OBJECT apoolobj;
  34. SNAPSHOT_EXTENSION_DATA();
  35. //
  36. // Snag the address from the command line.
  37. //
  38. address = GetExpression( args );
  39. if (address == 0)
  40. {
  41. sscanf( args, "%c", &star );
  42. if (star == '*') {
  43. DumpAllApoolObjs();
  44. } else {
  45. PrintUsage( "apool" );
  46. }
  47. return;
  48. }
  49. //
  50. // Read the request header.
  51. //
  52. if (!ReadMemory(
  53. address,
  54. &apoolobj,
  55. sizeof(apoolobj),
  56. &result
  57. ))
  58. {
  59. dprintf(
  60. "apool: cannot read UL_APP_POOL_OBJECT @ %p\n",
  61. address
  62. );
  63. return;
  64. }
  65. //
  66. // Dump it.
  67. //
  68. DumpApoolObj(
  69. "",
  70. "apool: ",
  71. address,
  72. &apoolobj
  73. );
  74. } // apool
  75. DECLARE_API( proc )
  76. /*++
  77. Routine Description:
  78. Dumps a UL_APP_POOL_PROCESS structure.
  79. Arguments:
  80. Address of structure
  81. Return Value:
  82. None.
  83. --*/
  84. {
  85. ULONG_PTR address = 0;
  86. ULONG result;
  87. UL_APP_POOL_PROCESS apoolproc;
  88. SNAPSHOT_EXTENSION_DATA();
  89. //
  90. // Snag the address from the command line.
  91. //
  92. address = GetExpression( args );
  93. if (address == 0)
  94. {
  95. PrintUsage( "proc" );
  96. return;
  97. }
  98. //
  99. // Read the request header.
  100. //
  101. if (!ReadMemory(
  102. address,
  103. &apoolproc,
  104. sizeof(apoolproc),
  105. &result
  106. ))
  107. {
  108. dprintf(
  109. "proc: cannot read UL_APP_POOL_PROCESS @ %p\n",
  110. address
  111. );
  112. return;
  113. }
  114. //
  115. // Dump it.
  116. //
  117. DumpApoolProc(
  118. "",
  119. "proc: ",
  120. address,
  121. &apoolproc
  122. );
  123. } // uri