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.

176 lines
3.6 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. ksi.h
  5. Abstract:
  6. Windows Driver Model/Connection and Streaming Architecture (WDM-CSA)
  7. core internal definitions.
  8. --*/
  9. #if !defined(_KSI_)
  10. #define _KSI_
  11. #if defined(__cplusplus)
  12. extern "C" {
  13. #endif // defined(__cplusplus)
  14. #if defined(_NTDDK_)
  15. typedef struct {
  16. LONGLONG Frequency;
  17. LONGLONG LastDueTime;
  18. LONGLONG RunningTimeDelta;
  19. LONGLONG LastRunningTime;
  20. KSPIN_LOCK TimeAccessLock;
  21. LIST_ENTRY EventQueue;
  22. KSPIN_LOCK EventQueueLock;
  23. KTIMER QueueTimer;
  24. KDPC QueueDpc;
  25. LONG ReferenceCount;
  26. KSSTATE State;
  27. LONGLONG SuspendDelta;
  28. LONGLONG SuspendTime;
  29. PFNKSSETTIMER SetTimer;
  30. PFNKSCANCELTIMER CancelTimer;
  31. PFNKSCLOCK_CORRELATEDTIME CorrelatedTime;
  32. PVOID Context;
  33. KSRESOLUTION Resolution;
  34. KEVENT FreeEvent;
  35. LONG ExternalTimeReferenceCount;
  36. BOOLEAN ExternalTimeValid;
  37. LONGLONG LastStreamTime;
  38. } KSIDEFAULTCLOCK, *PKSIDEFAULTCLOCK;
  39. typedef struct {
  40. KSOBJECT_HEADER Header;
  41. PKSIDEFAULTCLOCK DefaultClock;
  42. ULONG Reserved;
  43. } KSCLOCKINSTANCE, *PKSCLOCKINSTANCE;
  44. KSDDKAPI
  45. NTSTATUS
  46. NTAPI
  47. KsiPropertyDefaultClockGetTime(
  48. IN PIRP Irp,
  49. IN PKSPROPERTY Property,
  50. OUT PLONGLONG Time
  51. );
  52. KSDDKAPI
  53. NTSTATUS
  54. NTAPI
  55. KsiPropertyDefaultClockGetPhysicalTime(
  56. IN PIRP Irp,
  57. IN PKSPROPERTY Property,
  58. OUT PLONGLONG Time
  59. );
  60. KSDDKAPI
  61. NTSTATUS
  62. NTAPI
  63. KsiPropertyDefaultClockGetCorrelatedTime(
  64. IN PIRP Irp,
  65. IN PKSPROPERTY Property,
  66. OUT PKSCORRELATED_TIME Time
  67. );
  68. KSDDKAPI
  69. NTSTATUS
  70. NTAPI
  71. KsiPropertyDefaultClockGetCorrelatedPhysicalTime(
  72. IN PIRP Irp,
  73. IN PKSPROPERTY Property,
  74. OUT PKSCORRELATED_TIME Time
  75. );
  76. KSDDKAPI
  77. NTSTATUS
  78. NTAPI
  79. KsiPropertyDefaultClockGetResolution(
  80. IN PIRP Irp,
  81. IN PKSPROPERTY Property,
  82. OUT PKSRESOLUTION Resolution
  83. );
  84. KSDDKAPI
  85. NTSTATUS
  86. NTAPI
  87. KsiPropertyDefaultClockGetState(
  88. IN PIRP Irp,
  89. IN PKSPROPERTY Property,
  90. OUT PKSSTATE State
  91. );
  92. KSDDKAPI
  93. NTSTATUS
  94. NTAPI
  95. KsiPropertyDefaultClockGetFunctionTable(
  96. IN PIRP Irp,
  97. IN PKSPROPERTY Property,
  98. OUT PKSCLOCK_FUNCTIONTABLE FunctionTable
  99. );
  100. KSDDKAPI
  101. NTSTATUS
  102. NTAPI
  103. KsiDefaultClockAddMarkEvent(
  104. IN PIRP Irp,
  105. IN PKSEVENT_TIME_INTERVAL EventTime,
  106. IN PKSEVENT_ENTRY EventEntry
  107. );
  108. KSDDKAPI
  109. BOOLEAN
  110. NTAPI
  111. KsiQueryObjectCreateItemsPresent(
  112. IN KSDEVICE_HEADER Header
  113. );
  114. #endif // !defined(_NTDDK_)
  115. #define STATIC_KSNAME_Server\
  116. 0x3C0D501AL, 0x140B, 0x11D1, 0xB4, 0x0F, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
  117. DEFINE_GUIDSTRUCT("3C0D501A-140B-11D1-B40F-00A0C9223196", KSNAME_Server);
  118. #define KSNAME_Server DEFINE_GUIDNAMED(KSNAME_Server)
  119. #define KSSTRING_Server L"{3C0D501A-140B-11D1-B40F-00A0C9223196}"
  120. #define STATIC_KSPROPSETID_Service \
  121. 0x3C0D501BL, 0x140B, 0x11D1, 0xB4, 0x0F, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
  122. DEFINE_GUIDSTRUCT("3C0D501B-140B-11D1-B40F-00A0C9223196", KSPROPSETID_Service);
  123. #define KSPROPSETID_Service DEFINE_GUIDNAMED(KSPROPSETID_Service)
  124. typedef enum {
  125. KSPROPERTY_SERVICE_BUILDCACHE,
  126. KSPROPERTY_SERVICE_MERIT
  127. } KSPROPERTY_SERVICE;
  128. #define DEFINE_KSPROPERTY_ITEM_SERVICE_BUILDCACHE(SetHandler)\
  129. DEFINE_KSPROPERTY_ITEM(\
  130. KSPROPERTY_SERVICE_BUILDCACHE,\
  131. NULL,\
  132. sizeof(KSPROPERTY),\
  133. sizeof(L"\\\\?\\"),\
  134. (SetHandler),\
  135. NULL, 0, NULL, NULL, 0)
  136. #define DEFINE_KSPROPERTY_ITEM_SERVICE_MERIT(SetHandler)\
  137. DEFINE_KSPROPERTY_ITEM(\
  138. KSPROPERTY_SERVICE_MERIT,\
  139. NULL,\
  140. sizeof(KSPROPERTY),\
  141. sizeof(ULONG) + sizeof(L"\\\\?\\"),\
  142. (SetHandler),\
  143. NULL, 0, NULL, NULL, 0)
  144. #if defined(__cplusplus)
  145. }
  146. #endif // defined(__cplusplus)
  147. #endif // !_KSI_