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.

93 lines
3.0 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. #define eDataTypeRAW 1
  38. #define eDataTypeEMF 2
  39. #define eDataTypeTEXT 3
  40. // The fields in this struct correspond to the records in \nt\sdktools\trace\tracedmp\mofdata.guid
  41. typedef union _WMI_SPOOL_DATA {
  42. // A zero indicates that the field was not filled in (i.e. WMI will ignore
  43. // the field).
  44. struct _WMI_JOBDATA {
  45. ULONG ulSize; // Size of spooled job (post-rendered).
  46. ULONG eDataType;
  47. ULONG ulPages;
  48. ULONG ulPagesPerSide;
  49. // 0-3 indicates whether the spool writer, spool reader, and/or shadow
  50. // file were opened. If not opened then the handles must of come from
  51. // the file pool cache.
  52. SHORT sFilesOpened;
  53. } uJobData;
  54. // See wingdi.h for definitions of the different possible values.
  55. struct _WMI_EMFDATA {
  56. ULONG ulSize; // Size of spooled job (pre-rendered).
  57. ULONG ulICMMethod;
  58. SHORT sColor;
  59. SHORT sXRes;
  60. SHORT sYRes;
  61. SHORT sQuality;
  62. SHORT sCopies;
  63. SHORT sTTOption;
  64. } uEmfData;
  65. } WMI_SPOOL_DATA, * PWMI_SPOOL_DATA;
  66. ULONG
  67. LogWmiTraceEvent(
  68. DWORD JobId,
  69. UCHAR EventTraceType,
  70. WMI_SPOOL_DATA *data // Could be NULL
  71. );
  72. #endif