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.

210 lines
4.6 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. All rights reserved.
  4. Module Name:
  5. LsplData.cxx
  6. Abstract:
  7. Specifies the indicies of the local spooler counters.
  8. Author:
  9. Albert Ting (AlbertT) 19-Dec-1996
  10. Based on Gopher perf counter dll.
  11. Revision History:
  12. --*/
  13. #include "precomp.hxx"
  14. #pragma hdrstop
  15. #include "lsplctr.h"
  16. #include "lspldata.hxx"
  17. #ifdef OFFSETOF
  18. #undef OFFSETOF
  19. #endif
  20. #define OFFSETOF(type, id) ((DWORD)(ULONG_PTR)(&(((type*)0)->id)))
  21. LSPL_DATA_DEFINITION LsplDataDefinition =
  22. {
  23. {
  24. sizeof( LSPL_DATA_DEFINITION ) + sizeof( LSPL_COUNTER_DATA ),
  25. sizeof( LSPL_DATA_DEFINITION ),
  26. sizeof( PERF_OBJECT_TYPE ),
  27. LSPL_COUNTER_OBJECT,
  28. 0,
  29. LSPL_COUNTER_OBJECT,
  30. 0,
  31. PERF_DETAIL_NOVICE,
  32. NUMBER_OF_LSPL_COUNTERS,
  33. 3, // Default is # jobs in queue.
  34. 0, // Place holder for number of instances.
  35. 0,
  36. { 0, 0 },
  37. { 0, 0 }
  38. },
  39. {
  40. sizeof( PERF_COUNTER_DEFINITION ),
  41. LSPL_TOTAL_JOBS,
  42. 0,
  43. LSPL_TOTAL_JOBS,
  44. 0,
  45. -1,
  46. PERF_DETAIL_NOVICE,
  47. PERF_COUNTER_RAWCOUNT,
  48. sizeof( LARGE_INTEGER ),
  49. OFFSETOF( LSPL_COUNTER_DATA, liTotalJobs ),
  50. },
  51. {
  52. sizeof( PERF_COUNTER_DEFINITION ),
  53. LSPL_TOTAL_BYTES,
  54. 0,
  55. LSPL_TOTAL_BYTES,
  56. 0,
  57. -5,
  58. PERF_DETAIL_ADVANCED,
  59. PERF_COUNTER_BULK_COUNT,
  60. sizeof( LARGE_INTEGER ),
  61. OFFSETOF( LSPL_COUNTER_DATA, liTotalBytes ),
  62. },
  63. {
  64. sizeof( PERF_COUNTER_DEFINITION ),
  65. LSPL_TOTAL_PAGES_PRINTED,
  66. 0,
  67. LSPL_TOTAL_PAGES_PRINTED,
  68. 0,
  69. -1,
  70. PERF_DETAIL_NOVICE,
  71. PERF_COUNTER_RAWCOUNT,
  72. sizeof( LARGE_INTEGER ),
  73. OFFSETOF( LSPL_COUNTER_DATA, liTotalPagesPrinted ),
  74. },
  75. {
  76. sizeof( PERF_COUNTER_DEFINITION ),
  77. LSPL_JOBS,
  78. 0,
  79. LSPL_JOBS,
  80. 0,
  81. 0,
  82. PERF_DETAIL_NOVICE,
  83. PERF_COUNTER_RAWCOUNT,
  84. sizeof( DWORD ),
  85. OFFSETOF( LSPL_COUNTER_DATA, dwJobs ),
  86. },
  87. {
  88. sizeof( PERF_COUNTER_DEFINITION ),
  89. LSPL_REF,
  90. 0,
  91. LSPL_REF,
  92. 0,
  93. 0,
  94. PERF_DETAIL_EXPERT,
  95. PERF_COUNTER_RAWCOUNT,
  96. sizeof( DWORD ),
  97. OFFSETOF( LSPL_COUNTER_DATA, dwRef ),
  98. },
  99. {
  100. sizeof( PERF_COUNTER_DEFINITION ),
  101. LSPL_MAX_REF,
  102. 0,
  103. LSPL_MAX_REF,
  104. 0,
  105. 0,
  106. PERF_DETAIL_EXPERT,
  107. PERF_COUNTER_RAWCOUNT,
  108. sizeof( DWORD ),
  109. OFFSETOF( LSPL_COUNTER_DATA, dwMaxRef ),
  110. },
  111. {
  112. sizeof( PERF_COUNTER_DEFINITION ),
  113. LSPL_SPOOLING,
  114. 0,
  115. LSPL_SPOOLING,
  116. 0,
  117. 0,
  118. PERF_DETAIL_ADVANCED,
  119. PERF_COUNTER_RAWCOUNT,
  120. sizeof( DWORD ),
  121. OFFSETOF( LSPL_COUNTER_DATA, dwSpooling ),
  122. },
  123. {
  124. sizeof( PERF_COUNTER_DEFINITION ),
  125. LSPL_MAX_SPOOLING,
  126. 0,
  127. LSPL_MAX_SPOOLING,
  128. 0,
  129. 0,
  130. PERF_DETAIL_ADVANCED,
  131. PERF_COUNTER_RAWCOUNT,
  132. sizeof( DWORD ),
  133. OFFSETOF( LSPL_COUNTER_DATA, dwMaxSpooling ),
  134. },
  135. {
  136. sizeof( PERF_COUNTER_DEFINITION ),
  137. LSPL_ERROR_OUT_OF_PAPER,
  138. 0,
  139. LSPL_ERROR_OUT_OF_PAPER,
  140. 0,
  141. -1,
  142. PERF_DETAIL_ADVANCED,
  143. PERF_COUNTER_RAWCOUNT,
  144. sizeof( DWORD ),
  145. OFFSETOF( LSPL_COUNTER_DATA, dwErrorOutOfPaper ),
  146. },
  147. {
  148. sizeof( PERF_COUNTER_DEFINITION ),
  149. LSPL_ERROR_NOT_READY,
  150. 0,
  151. LSPL_ERROR_NOT_READY,
  152. 0,
  153. -1,
  154. PERF_DETAIL_ADVANCED,
  155. PERF_COUNTER_RAWCOUNT,
  156. sizeof( DWORD ),
  157. OFFSETOF( LSPL_COUNTER_DATA, dwErrorNotReady ),
  158. },
  159. {
  160. sizeof( PERF_COUNTER_DEFINITION ),
  161. LSPL_JOB_ERROR,
  162. 0,
  163. LSPL_JOB_ERROR,
  164. 0,
  165. -1,
  166. PERF_DETAIL_ADVANCED,
  167. PERF_COUNTER_RAWCOUNT,
  168. sizeof( DWORD ),
  169. OFFSETOF( LSPL_COUNTER_DATA, dwJobError ),
  170. },
  171. {
  172. sizeof( PERF_COUNTER_DEFINITION ),
  173. LSPL_ENUMERATE_NETWORK_PRINTERS,
  174. 0,
  175. LSPL_ENUMERATE_NETWORK_PRINTERS,
  176. 0,
  177. -1,
  178. PERF_DETAIL_WIZARD,
  179. PERF_COUNTER_RAWCOUNT,
  180. sizeof( DWORD ),
  181. OFFSETOF( LSPL_COUNTER_DATA, dwEnumerateNetworkPrinters ),
  182. },
  183. {
  184. sizeof( PERF_COUNTER_DEFINITION ),
  185. LSPL_ADD_NET_PRINTERS,
  186. 0,
  187. LSPL_ADD_NET_PRINTERS,
  188. 0,
  189. -1,
  190. PERF_DETAIL_WIZARD,
  191. PERF_COUNTER_RAWCOUNT,
  192. sizeof( DWORD ),
  193. OFFSETOF( LSPL_COUNTER_DATA, dwAddNetPrinters ),
  194. }
  195. };