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.

203 lines
4.0 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. swenum.h
  5. Abstract:
  6. Public header file and bus interface definition for the
  7. software device enumerator.
  8. --*/
  9. #if !defined( _SWENUM_ )
  10. #define _SWENUM_
  11. // Io controls
  12. #define IOCTL_SWENUM_INSTALL_INTERFACE CTL_CODE(FILE_DEVICE_BUS_EXTENDER, 0x000, METHOD_BUFFERED, FILE_ANY_ACCESS)
  13. #define IOCTL_SWENUM_REMOVE_INTERFACE CTL_CODE(FILE_DEVICE_BUS_EXTENDER, 0x001, METHOD_BUFFERED, FILE_ANY_ACCESS)
  14. #define IOCTL_SWENUM_GET_BUS_ID CTL_CODE(FILE_DEVICE_BUS_EXTENDER, 0x002, METHOD_NEITHER, FILE_READ_ACCESS)
  15. //
  16. // Io control related structures
  17. //
  18. typedef struct _SWENUM_INSTALL_INTERFACE {
  19. GUID DeviceId;
  20. GUID InterfaceId;
  21. WCHAR ReferenceString[1];
  22. } SWENUM_INSTALL_INTERFACE, *PSWENUM_INSTALL_INTERFACE;
  23. #if defined( _KS_ )
  24. #define STATIC_BUSID_SoftwareDeviceEnumerator STATIC_KSMEDIUMSETID_Standard
  25. #define BUSID_SoftwareDeviceEnumerator KSMEDIUMSETID_Standard
  26. #else // !_KS_
  27. #define STATIC_BUSID_SoftwareDeviceEnumerator \
  28. 0x4747B320L, 0x62CE, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
  29. #if defined(__cplusplus) && _MSC_VER >= 1100
  30. struct __declspec(uuid("4747B320-62CE-11CF-A5D6-28DB04C10000")) BUSID_SoftwareDeviceEnumerator;
  31. #define BUSID_SoftwareDeviceEnumerator __uuidof(struct BUSID_SoftwareDeviceEnumerator)
  32. #else
  33. DEFINE_GUIDEX(BUSID_SoftwareDeviceEnumerator);
  34. #endif // !(defined(__cplusplus) && _MSC_VER >= 1100)
  35. #endif // !_KS_
  36. #if defined( _NTDDK_ )
  37. typedef
  38. VOID
  39. (*PFNREFERENCEDEVICEOBJECT)(
  40. IN PVOID Context
  41. );
  42. typedef
  43. VOID
  44. (*PFNDEREFERENCEDEVICEOBJECT)(
  45. IN PVOID Context
  46. );
  47. typedef
  48. NTSTATUS
  49. (*PFNQUERYREFERENCESTRING)(
  50. IN PVOID Context,
  51. IN OUT PWCHAR *String
  52. );
  53. #define BUS_INTERFACE_SWENUM_VERSION 0x100
  54. typedef struct _BUS_INTERFACE_SWENUM {
  55. //
  56. // Standard interface header
  57. //
  58. INTERFACE Interface;
  59. //
  60. // SWENUM bus interfaces
  61. //
  62. PFNREFERENCEDEVICEOBJECT ReferenceDeviceObject;
  63. PFNDEREFERENCEDEVICEOBJECT DereferenceDeviceObject;
  64. PFNQUERYREFERENCESTRING QueryReferenceString;
  65. } BUS_INTERFACE_SWENUM, *PBUS_INTERFACE_SWENUM;
  66. #if defined(__cplusplus)
  67. extern "C" {
  68. #endif // defined(__cplusplus)
  69. #if defined( _KS_ )
  70. KSDDKAPI
  71. NTSTATUS
  72. NTAPI
  73. KsQuerySoftwareBusInterface(
  74. IN PDEVICE_OBJECT PnpDeviceObject,
  75. OUT PBUS_INTERFACE_SWENUM BusInterface
  76. );
  77. KSDDKAPI
  78. NTSTATUS
  79. NTAPI
  80. KsReferenceSoftwareBusObject(
  81. IN KSDEVICE_HEADER Header
  82. );
  83. KSDDKAPI
  84. VOID
  85. NTAPI
  86. KsDereferenceSoftwareBusObject(
  87. IN KSDEVICE_HEADER Header
  88. );
  89. KSDDKAPI
  90. NTSTATUS
  91. NTAPI
  92. KsCreateBusEnumObject(
  93. IN PWCHAR BusIdentifier,
  94. IN PDEVICE_OBJECT BusDeviceObject,
  95. IN PDEVICE_OBJECT PhysicalDeviceObject,
  96. IN PDEVICE_OBJECT PnpDeviceObject OPTIONAL,
  97. IN REFGUID InterfaceGuid OPTIONAL,
  98. IN PWCHAR ServiceRelativePath OPTIONAL
  99. );
  100. KSDDKAPI
  101. NTSTATUS
  102. NTAPI
  103. KsGetBusEnumIdentifier(
  104. IN PIRP Irp
  105. );
  106. KSDDKAPI
  107. NTSTATUS
  108. NTAPI
  109. KsGetBusEnumPnpDeviceObject(
  110. IN PDEVICE_OBJECT DeviceObject,
  111. IN PDEVICE_OBJECT *PnpDeviceObject
  112. );
  113. KSDDKAPI
  114. NTSTATUS
  115. NTAPI
  116. KsInstallBusEnumInterface(
  117. PIRP Irp
  118. );
  119. KSDDKAPI
  120. NTSTATUS
  121. NTAPI
  122. KsIsBusEnumChildDevice(
  123. IN PDEVICE_OBJECT DeviceObject,
  124. OUT PBOOLEAN ChildDevice
  125. );
  126. KSDDKAPI
  127. NTSTATUS
  128. NTAPI
  129. KsRemoveBusEnumInterface(
  130. IN PIRP Irp
  131. );
  132. KSDDKAPI
  133. NTSTATUS
  134. NTAPI
  135. KsServiceBusEnumPnpRequest(
  136. IN PDEVICE_OBJECT DeviceObject,
  137. IN PIRP Irp
  138. );
  139. KSDDKAPI
  140. NTSTATUS
  141. NTAPI
  142. KsServiceBusEnumCreateRequest(
  143. IN PDEVICE_OBJECT DeviceObject,
  144. IN OUT PIRP Irp
  145. );
  146. KSDDKAPI
  147. NTSTATUS
  148. NTAPI
  149. KsGetBusEnumParentFDOFromChildPDO(
  150. IN PDEVICE_OBJECT DeviceObject,
  151. OUT PDEVICE_OBJECT *FunctionalDeviceObject
  152. );
  153. #endif // _KS_
  154. #if defined(__cplusplus)
  155. }
  156. #endif // defined(__cplusplus)
  157. #endif // _NTDDK_
  158. #endif // !_SWENUM_