source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/ddk/swenum.h@ 1181

Last change on this file since 1181 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 2.9 KB
RevLine 
[1166]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
8typedef 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_)
25typedef VOID (NTAPI *PFNREFERENCEDEVICEOBJECT)(PVOID Context);
26typedef VOID (NTAPI *PFNDEREFERENCEDEVICEOBJECT)(PVOID Context);
27typedef NTSTATUS (NTAPI *PFNQUERYREFERENCESTRING)(PVOID Context, PWCHAR *String);
28#endif /* _KS_ */
29
30#define BUS_INTERFACE_SWENUM_VERSION 0x100
31
32typedef 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)
40extern "C" {
41#endif
42
43#if defined(_KS_)
44
45KSDDKAPI
46NTSTATUS
47NTAPI
48KsQuerySoftwareBusInterface(
49 IN PDEVICE_OBJECT PnpDeviceObject,
50 OUT PBUS_INTERFACE_SWENUM BusInterface
51);
52
53KSDDKAPI
54NTSTATUS
55NTAPI
56KsReferenceSoftwareBusObject(
57 IN KSDEVICE_HEADER Header
58);
59
60KSDDKAPI
61VOID
62NTAPI
63KsDereferenceSoftwareBusObject(
64 IN KSDEVICE_HEADER Header
65);
66
67KSDDKAPI
68NTSTATUS
69NTAPI
70KsCreateBusEnumObject(
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
79KSDDKAPI
80NTSTATUS
81NTAPI
82KsGetBusEnumIdentifier(
83 IN OUT PIRP Irp
84);
85
86KSDDKAPI
87NTSTATUS
88NTAPI
89KsGetBusEnumPnpDeviceObject(
90 IN PDEVICE_OBJECT DeviceObject,
91 OUT PDEVICE_OBJECT *PnpDeviceObject
92);
93
94KSDDKAPI
95NTSTATUS
96NTAPI
97KsInstallBusEnumInterface(
98 IN PIRP Irp
99);
100
101KSDDKAPI
102NTSTATUS
103NTAPI
104KsIsBusEnumChildDevice(
105 IN PDEVICE_OBJECT DeviceObject,
106 OUT PBOOLEAN ChildDevice
107);
108
109
110KSDDKAPI
111NTSTATUS
112NTAPI
113KsRemoveBusEnumInterface(
114 IN PIRP Irp
115);
116
117KSDDKAPI
118NTSTATUS
119NTAPI
120KsServiceBusEnumPnpRequest(
121 IN PDEVICE_OBJECT DeviceObject,
122 IN OUT PIRP Irp
123);
124
125KSDDKAPI
126NTSTATUS
127NTAPI
128KsServiceBusEnumCreateRequest(
129 IN PDEVICE_OBJECT DeviceObject,
130 IN OUT PIRP Irp
131);
132
133KSDDKAPI
134NTSTATUS
135NTAPI
136KsGetBusEnumParentFDOFromChildPDO(
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
Note: See TracBrowser for help on using the repository browser.