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