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.

95 lines
2.9 KiB

  1. /*++
  2. Copyright (c) 1990 - 2000 Microsoft Corporation
  3. All rights reserved.
  4. Module Name:
  5. wmidata.h
  6. Abstract:
  7. Header file for the WMI trace event datatypes.
  8. Note -- link with spoolss.lib or perflib.lib to find these routines
  9. Author:
  10. Bryan Kilian (BryanKil) May 2000
  11. Revision History:
  12. --*/
  13. #ifndef __WMIDEF
  14. #define __WMIDEF
  15. //
  16. // WMI Structures
  17. //
  18. // NOTE: Placing the spooler WMI types in a public header accessible to the
  19. // sdktools depot would help a lot. These structures are duplicated in the pdh
  20. // source, so to change you need to change this header, the mofdata.guid file,
  21. // and pdh\tracectr.
  22. // JOB TRANSACTIONS
  23. // The first four events correspond to the start and end event values found in
  24. // evntrace.h. Spooljob is the start and deletejob is the end. Printjob is
  25. // when the job is taken off the queue and printing has started. Trackthread is
  26. // used to track secondary threads spun off to help process a job, like RPC calls.
  27. #define EVENT_TRACE_TYPE_SPL_SPOOLJOB EVENT_TRACE_TYPE_START
  28. #define EVENT_TRACE_TYPE_SPL_PRINTJOB EVENT_TRACE_TYPE_DEQUEUE
  29. #define EVENT_TRACE_TYPE_SPL_DELETEJOB EVENT_TRACE_TYPE_END
  30. #define EVENT_TRACE_TYPE_SPL_TRACKTHREAD EVENT_TRACE_TYPE_CHECKPOINT
  31. // Non-reserved event types start at 0x0A. These match values in reducer code
  32. // so they cannot be changed.
  33. #define EVENT_TRACE_TYPE_SPL_ENDTRACKTHREAD 0x0A
  34. #define EVENT_TRACE_TYPE_SPL_JOBRENDERED 0x0B
  35. #define EVENT_TRACE_TYPE_SPL_PAUSE 0x0C
  36. #define EVENT_TRACE_TYPE_SPL_RESUME 0x0D
  37. typedef enum {
  38. eDataTypeRAW = 1,
  39. eDataTypeEMF = 2,
  40. eDataTypeTEXT = 3
  41. } SPLDATATYPE;
  42. // The fields in this struct correspond to the records in \nt\sdktools\trace\tracedmp\mofdata.guid
  43. typedef union _WMI_SPOOL_DATA {
  44. // A zero indicates that the field was not filled in (i.e. WMI will ignore
  45. // the field).
  46. struct _WMI_JOBDATA {
  47. ULONG ulSize; // Size of spooled job (post-rendered).
  48. SPLDATATYPE eDataType;
  49. ULONG ulPages;
  50. ULONG ulPagesPerSide;
  51. // 0-3 indicates whether the spool writer, spool reader, and/or shadow
  52. // file were opened. If not opened then the handles must of come from
  53. // the file pool cache.
  54. SHORT sFilesOpened;
  55. } uJobData;
  56. // See wingdi.h for definitions of the different possible values.
  57. struct _WMI_EMFDATA {
  58. ULONG ulSize; // Size of spooled job (pre-rendered).
  59. ULONG ulICMMethod;
  60. SHORT sColor;
  61. SHORT sXRes;
  62. SHORT sYRes;
  63. SHORT sQuality;
  64. SHORT sCopies;
  65. SHORT sTTOption;
  66. } uEmfData;
  67. } WMI_SPOOL_DATA, * PWMI_SPOOL_DATA;
  68. ULONG
  69. LogWmiTraceEvent(
  70. DWORD JobId,
  71. UCHAR EventTraceType,
  72. WMI_SPOOL_DATA *data // Could be NULL
  73. );
  74. #endif