Go to the source code of this file.
|
const GUID | KSMEDIUMSETID_Standard = {0x4747B320L, 0x62CE, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}} |
|
◆ DriverEntry()
Definition at line 409 of file swenum.c.
412{
413
414
416
417
419
420
427
428 DPRINT(
"SWENUM loaded\n");
430}
#define IRP_MJ_DEVICE_CONTROL
NTSTATUS NTAPI SwDispatchDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS NTAPI SwDispatchPnp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS NTAPI SwDispatchSystemControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS NTAPI SwDispatchPower(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS NTAPI SwDispatchCreate(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS NTAPI SwAddDevice(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT PhysicalDeviceObject)
VOID NTAPI SwUnload(IN PDRIVER_OBJECT DriverObject)
NTSTATUS NTAPI SwDispatchClose(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
#define IRP_MJ_SYSTEM_CONTROL
◆ SwAddDevice()
Definition at line 362 of file swenum.c.
365{
368
369 DPRINT(
"SWENUM AddDevice\n");
370
372
374 {
375
377 }
378
379
381
382
384 {
385
388 }
389 else
390 {
391
393 }
394
395
397}
PDEVICE_OBJECT PhysicalDeviceObject
#define NT_SUCCESS(StatCode)
KSDDKAPI NTSTATUS NTAPI KsCreateBusEnumObject(IN PWCHAR BusIdentifier, IN PDEVICE_OBJECT BusDeviceObject, IN PDEVICE_OBJECT PhysicalDeviceObject, IN PDEVICE_OBJECT PnpDeviceObject OPTIONAL, IN REFGUID InterfaceGuid OPTIONAL, IN PWCHAR ServiceRelativePath OPTIONAL)
#define KSMEDIUMSETID_Standard
_Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PDEVICE_OBJECT * FunctionalDeviceObject
NTSTATUS NTAPI IoCreateDevice(IN PDRIVER_OBJECT DriverObject, IN ULONG DeviceExtensionSize, IN PUNICODE_STRING DeviceName, IN DEVICE_TYPE DeviceType, IN ULONG DeviceCharacteristics, IN BOOLEAN Exclusive, OUT PDEVICE_OBJECT *DeviceObject)
VOID NTAPI IoDeleteDevice(IN PDEVICE_OBJECT DeviceObject)
#define FILE_DEVICE_BUS_EXTENDER
Referenced by DriverEntry().
◆ SwDispatchClose()
Definition at line 345 of file swenum.c.
348{
349
351
352
354
355
357
358}
#define IoCompleteRequest
Referenced by DriverEntry().
◆ SwDispatchCreate()
Definition at line 304 of file swenum.c.
307{
310
311
313
315
316
318 {
319 if (ChildDevice)
320 {
321
325 }
326
329 }
330
331
333 {
334
337 }
338
340}
KSDDKAPI NTSTATUS NTAPI KsIsBusEnumChildDevice(IN PDEVICE_OBJECT DeviceObject, OUT PBOOLEAN ChildDevice)
KSDDKAPI NTSTATUS NTAPI KsServiceBusEnumCreateRequest(IN PDEVICE_OBJECT DeviceObject, IN OUT PIRP Irp)
#define STATUS_OBJECT_NAME_NOT_FOUND
_In_ PDEVICE_OBJECT DeviceObject
Referenced by DriverEntry().
◆ SwDispatchDeviceControl()
Definition at line 256 of file swenum.c.
259{
262
263
265
267 {
268
270 DPRINT(
"SwDispatchDeviceControl IOCTL_SWENUM_INSTALL_INTERFACE %x\n",
Status);
271 }
273 {
274
276 DPRINT(
"SwDispatchDeviceControl IOCTL_SWENUM_REMOVE_INTERFACE %x\n",
Status);
277
278 }
280 {
281
283 DPRINT(
"SwDispatchDeviceControl IOCTL_SWENUM_GET_BUS_ID %x\n",
Status);
284 }
285 else
286 {
289 }
290
291
293
294
296
297
299}
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
KSDDKAPI NTSTATUS NTAPI KsInstallBusEnumInterface(PIRP Irp)
KSDDKAPI NTSTATUS NTAPI KsGetBusEnumIdentifier(IN PIRP Irp)
KSDDKAPI NTSTATUS NTAPI KsRemoveBusEnumInterface(IN PIRP Irp)
struct _IO_STACK_LOCATION::@1575::@1576 DeviceIoControl
union _IO_STACK_LOCATION::@1575 Parameters
#define IOCTL_SWENUM_GET_BUS_ID
#define IOCTL_SWENUM_REMOVE_INTERFACE
#define IOCTL_SWENUM_INSTALL_INTERFACE
#define STATUS_INVALID_PARAMETER
Referenced by DriverEntry().
◆ SwDispatchPnp()
Definition at line 83 of file swenum.c.
86{
91
92
94
95
97
98
100 {
101
105 }
106
108
109
111
112
113 if (ChildDevice)
114 {
116 {
117
119 }
120
121
123
124
126 }
127
128 DPRINT(
"SwDispatchPnp KsServiceBusEnumPnpRequest Status %x\n",
Status);
129
131 {
132
136 }
137
138
140
141 DPRINT(
"SwDispatchPnp KsGetBusEnumPnpDeviceObject Status %x\n",
Status);
142
143
145 {
146
150 }
151
152
154
155
157
159 {
160
162 }
163 else
164 {
166 {
167
168 Irp->IoStatus.Information = 0;
170
171
173
174
176 }
177
179 {
180
183
184
186
187
189 }
190
192 {
193
195
196
198 }
199 }
200
201
204
206}
KSDDKAPI NTSTATUS NTAPI KsGetBusEnumPnpDeviceObject(IN PDEVICE_OBJECT DeviceObject, IN PDEVICE_OBJECT *PnpDeviceObject)
KSDDKAPI NTSTATUS NTAPI KsServiceBusEnumPnpRequest(IN PDEVICE_OBJECT DeviceObject, IN OUT PIRP Irp)
#define IoSkipCurrentIrpStackLocation(Irp)
#define STATUS_NOT_SUPPORTED
#define IRP_MN_QUERY_PNP_DEVICE_STATE
#define PNP_DEVICE_NOT_DISABLEABLE
#define IRP_MN_QUERY_RESOURCE_REQUIREMENTS
#define IRP_MN_REMOVE_DEVICE
#define IRP_MN_QUERY_RESOURCES
Referenced by DriverEntry().
◆ SwDispatchPower()
Definition at line 16 of file swenum.c.
19{
24
25
27
28
30
31
33
34
36 {
37
39
40
42
43
45
46
48 }
49
51 {
52
54 }
55
56 if (!ChildDevice)
57 {
58
60
61
63
64
65 return PoCallDriver(PnpDeviceObject,
Irp);
66 }
67
68
70
71
73
74
76
77
79}
VOID NTAPI PoStartNextPowerIrp(IN PIRP Irp)
#define IRP_MN_QUERY_POWER
Referenced by DriverEntry().
◆ SwDispatchSystemControl()
Definition at line 210 of file swenum.c.
213{
217
218
220
221
223 {
224 if (!ChildDevice)
225 {
226
230 }
231
232
234
235
237 {
238
240
242 }
243
244 }
245
246
249
251
252}
Referenced by DriverEntry().
◆ SwUnload()
◆ KSMEDIUMSETID_Standard
const GUID KSMEDIUMSETID_Standard = {0x4747B320L, 0x62CE, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}} |