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.

229 lines
7.8 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. picontrol.h
  5. Abstract:
  6. This header contains private prototypes for communication between
  7. kernel-mode and user-mode. This file should be included only by control.c.
  8. Author:
  9. Adrian J. Oney (AdriaO) 07/19/2000
  10. Revision History:
  11. --*/
  12. typedef NTSTATUS (*PLUGPLAY_CONTROL_HANDLER)(
  13. IN PLUGPLAY_CONTROL_CLASS PnPControlClass,
  14. IN OUT PVOID PnPControlData,
  15. IN ULONG PnPControlDataLength,
  16. IN KPROCESSOR_MODE CallerMode
  17. );
  18. typedef struct {
  19. PLUGPLAY_CONTROL_CLASS ControlCode;
  20. ULONG ControlDataSize;
  21. PLUGPLAY_CONTROL_HANDLER ControlFunction;
  22. } PLUGPLAY_CONTROL_HANDLER_DATA, *PPLUGPLAY_CONTROL_HANDLER_DATA;
  23. NTSTATUS
  24. PiControlMakeUserModeCallersCopy(
  25. PVOID *Destination,
  26. PVOID Src,
  27. ULONG Length,
  28. ULONG Alignment,
  29. KPROCESSOR_MODE CallerMode,
  30. BOOLEAN AllocateDestination
  31. );
  32. VOID
  33. PiControlGetUserFlagsFromDeviceNode(
  34. IN PDEVICE_NODE DeviceNode,
  35. OUT ULONG *StatusFlags
  36. );
  37. NTSTATUS
  38. PiControlStartDevice(
  39. IN PLUGPLAY_CONTROL_CLASS PnPControlClass,
  40. IN OUT PPLUGPLAY_CONTROL_DEVICE_CONTROL_DATA DeviceControlData,
  41. IN ULONG PnPControlDataLength,
  42. IN KPROCESSOR_MODE CallerMode
  43. );
  44. NTSTATUS
  45. PiControlResetDevice(
  46. IN PLUGPLAY_CONTROL_CLASS PnPControlClass,
  47. IN OUT PPLUGPLAY_CONTROL_DEVICE_CONTROL_DATA DeviceControlData,
  48. IN ULONG PnPControlDataLength,
  49. IN KPROCESSOR_MODE CallerMode
  50. );
  51. NTSTATUS
  52. PiControlInitializeDevice(
  53. IN PLUGPLAY_CONTROL_CLASS PnPControlClass,
  54. IN OUT PPLUGPLAY_CONTROL_DEVICE_CONTROL_DATA DeviceControlData,
  55. IN ULONG PnPControlDataLength,
  56. IN KPROCESSOR_MODE CallerMode
  57. );
  58. NTSTATUS
  59. PiControlDeregisterDevice(
  60. IN PLUGPLAY_CONTROL_CLASS PnPControlClass,
  61. IN OUT PPLUGPLAY_CONTROL_DEVICE_CONTROL_DATA DeviceControlData,
  62. IN ULONG PnPControlDataLength,
  63. IN KPROCESSOR_MODE CallerMode
  64. );
  65. NTSTATUS
  66. PiControlRegisterNewDevice(
  67. IN PLUGPLAY_CONTROL_CLASS PnPControlClass,
  68. IN OUT PPLUGPLAY_CONTROL_DEVICE_CONTROL_DATA DeviceControlData,
  69. IN ULONG PnPControlDataLength,
  70. IN KPROCESSOR_MODE CallerMode
  71. );
  72. NTSTATUS
  73. PiControlEnumerateDevice(
  74. IN PLUGPLAY_CONTROL_CLASS PnPControlClass,
  75. IN OUT PPLUGPLAY_CONTROL_DEVICE_CONTROL_DATA DeviceControlData,
  76. IN ULONG PnPControlDataLength,
  77. IN KPROCESSOR_MODE CallerMode
  78. );
  79. NTSTATUS
  80. PiControlQueryAndRemoveDevice(
  81. IN PLUGPLAY_CONTROL_CLASS PnPControlClass,
  82. IN OUT PPLUGPLAY_CONTROL_QUERY_AND_REMOVE_DATA QueryAndRemoveData,
  83. IN ULONG PnPControlDataLength,
  84. IN KPROCESSOR_MODE CallerMode
  85. );
  86. NTSTATUS
  87. PiControlUserResponse(
  88. IN PLUGPLAY_CONTROL_CLASS PnPControlClass,
  89. IN OUT PPLUGPLAY_CONTROL_USER_RESPONSE_DATA UserResponseData,
  90. IN ULONG PnPControlDataLength,
  91. IN KPROCESSOR_MODE CallerMode
  92. );
  93. NTSTATUS
  94. PiControlGenerateLegacyDevice(
  95. IN PLUGPLAY_CONTROL_CLASS PnPControlClass,
  96. IN OUT PPLUGPLAY_CONTROL_LEGACY_DEVGEN_DATA LegacyDevGenData,
  97. IN ULONG PnPControlDataLength,
  98. IN KPROCESSOR_MODE CallerMode
  99. );
  100. NTSTATUS
  101. PiControlGetInterfaceDeviceList(
  102. IN PLUGPLAY_CONTROL_CLASS PnPControlClass,
  103. IN OUT PPLUGPLAY_CONTROL_INTERFACE_LIST_DATA InterfaceData,
  104. IN ULONG PnPControlDataLength,
  105. IN KPROCESSOR_MODE CallerMode
  106. );
  107. NTSTATUS
  108. PiControlGetPropertyData(
  109. IN PLUGPLAY_CONTROL_CLASS PnPControlClass,
  110. IN OUT PPLUGPLAY_CONTROL_PROPERTY_DATA PropertyData,
  111. IN ULONG PnPControlDataLength,
  112. IN KPROCESSOR_MODE CallerMode
  113. );
  114. NTSTATUS
  115. PiControlDeviceClassAssociation(
  116. IN PLUGPLAY_CONTROL_CLASS PnPControlClass,
  117. IN OUT PPLUGPLAY_CONTROL_CLASS_ASSOCIATION_DATA AssociationData,
  118. IN ULONG PnPControlDataLength,
  119. IN KPROCESSOR_MODE CallerMode
  120. );
  121. NTSTATUS
  122. PiControlGetRelatedDevice(
  123. IN PLUGPLAY_CONTROL_CLASS PnPControlClass,
  124. IN OUT PPLUGPLAY_CONTROL_RELATED_DEVICE_DATA RelatedData,
  125. IN ULONG PnPControlDataLength,
  126. IN KPROCESSOR_MODE CallerMode
  127. );
  128. NTSTATUS
  129. PiControlGetInterfaceDeviceAlias(
  130. IN PLUGPLAY_CONTROL_CLASS PnPControlClass,
  131. IN OUT PPLUGPLAY_CONTROL_INTERFACE_ALIAS_DATA InterfaceAliasData,
  132. IN ULONG PnPControlDataLength,
  133. IN KPROCESSOR_MODE CallerMode
  134. );
  135. NTSTATUS
  136. PiControlGetSetDeviceStatus(
  137. IN PLUGPLAY_CONTROL_CLASS PnPControlClass,
  138. IN OUT PPLUGPLAY_CONTROL_STATUS_DATA StatusData,
  139. IN ULONG PnPControlDataLength,
  140. IN KPROCESSOR_MODE CallerMode
  141. );
  142. NTSTATUS
  143. PiControlGetDeviceDepth(
  144. IN PLUGPLAY_CONTROL_CLASS PnPControlClass,
  145. IN OUT PPLUGPLAY_CONTROL_DEPTH_DATA DepthData,
  146. IN ULONG PnPControlDataLength,
  147. IN KPROCESSOR_MODE CallerMode
  148. );
  149. NTSTATUS
  150. PiControlQueryDeviceRelations(
  151. IN PLUGPLAY_CONTROL_CLASS PnPControlClass,
  152. IN OUT PPLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA RelationsData,
  153. IN ULONG PnPControlDataLength,
  154. IN KPROCESSOR_MODE CallerMode
  155. );
  156. NTSTATUS
  157. PiControlQueryTargetDeviceRelation(
  158. IN PLUGPLAY_CONTROL_CLASS PnPControlClass,
  159. IN OUT PPLUGPLAY_CONTROL_TARGET_RELATION_DATA TargetData,
  160. IN ULONG PnPControlDataLength,
  161. IN KPROCESSOR_MODE CallerMode
  162. );
  163. NTSTATUS
  164. PiControlQueryConflictList(
  165. IN PLUGPLAY_CONTROL_CLASS PnPControlClass,
  166. IN OUT PPLUGPLAY_CONTROL_CONFLICT_DATA ConflictData,
  167. IN ULONG PnPControlDataLength,
  168. IN KPROCESSOR_MODE CallerMode
  169. );
  170. NTSTATUS
  171. PiControlRetrieveDockData(
  172. IN PLUGPLAY_CONTROL_CLASS PnPControlClass,
  173. IN OUT PPLUGPLAY_CONTROL_RETRIEVE_DOCK_DATA DockData,
  174. IN ULONG DockDataLength,
  175. IN KPROCESSOR_MODE CallerMode
  176. );
  177. NTSTATUS
  178. PiControlGetDevicePowerData(
  179. IN PDEVICE_NODE DeviceNode,
  180. IN KPROCESSOR_MODE CallerMode,
  181. IN ULONG OutputBufferLength,
  182. IN PVOID PowerDataBuffer OPTIONAL,
  183. OUT ULONG *BytesWritten
  184. );
  185. NTSTATUS
  186. PiControlHaltDevice(
  187. IN PLUGPLAY_CONTROL_CLASS PnPControlClass,
  188. IN OUT PPLUGPLAY_CONTROL_DEVICE_CONTROL_DATA DeviceControlData,
  189. IN ULONG PnPControlDataLength,
  190. IN KPROCESSOR_MODE CallerMode
  191. );