ReactOS  0.4.14-dev-358-gbef841c
swenum.h
Go to the documentation of this file.
1 #pragma once
2 
3 #ifndef _SWENUM_
4 #define _SWENUM_
5 
6 #define IOCTL_SWENUM_INSTALL_INTERFACE \
7  CTL_CODE(FILE_DEVICE_BUS_EXTENDER, 0x000, METHOD_BUFFERED, FILE_ANY_ACCESS)
8 
9 #define IOCTL_SWENUM_REMOVE_INTERFACE \
10  CTL_CODE(FILE_DEVICE_BUS_EXTENDER, 0x001, METHOD_BUFFERED, FILE_ANY_ACCESS)
11 
12 #define IOCTL_SWENUM_GET_BUS_ID \
13  CTL_CODE(FILE_DEVICE_BUS_EXTENDER, 0x002, METHOD_NEITHER, FILE_READ_ACCESS)
14 
15 typedef struct _SWENUM_INSTALL_INTERFACE {
20 
21 #ifdef _KS_
22 #define STATIC_BUSID_SoftwareDeviceEnumerator STATIC_KSMEDIUMSETID_Standard
23 #define BUSID_SoftwareDeviceEnumerator KSMEDIUMSETID_Standard
24 #else
25 #define STATIC_BUSID_SoftwareDeviceEnumerator \
26  0x4747B320L, 0x62CE, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}
27 #endif /* _KS_ */
28 
29 #ifdef _NTDDK_
30 
31 #ifndef _KS_
32 
33 typedef VOID
34 (NTAPI *PFNREFERENCEDEVICEOBJECT)(
36 
37 typedef VOID
38 (NTAPI *PFNDEREFERENCEDEVICEOBJECT)(
40 
41 typedef NTSTATUS
42 (NTAPI *PFNQUERYREFERENCESTRING)(
45 
46 #endif /* !_KS_ */
47 
48 #define BUS_INTERFACE_SWENUM_VERSION 0x100
49 
50 typedef struct _BUS_INTERFACE_SWENUM {
52  PFNREFERENCEDEVICEOBJECT ReferenceDeviceObject;
53  PFNDEREFERENCEDEVICEOBJECT DereferenceDeviceObject;
54  PFNQUERYREFERENCESTRING QueryReferenceString;
55 } BUS_INTERFACE_SWENUM, *PBUS_INTERFACE_SWENUM;
56 
57 #if defined(__cplusplus)
58 extern "C" {
59 #endif
60 
61 #ifdef _KS_
62 
65 NTAPI
66 KsQuerySoftwareBusInterface(
67  _In_ PDEVICE_OBJECT PnpDeviceObject,
68  _Out_ PBUS_INTERFACE_SWENUM BusInterface);
69 
72 NTAPI
75 
77 VOID
78 NTAPI
81 
85 NTAPI
87  _In_ PWSTR BusIdentifier,
88  _In_ PDEVICE_OBJECT BusDeviceObject,
90  _In_opt_ PDEVICE_OBJECT PnpDeviceObject,
92  _In_opt_ PWSTR ServiceRelativePath);
93 
96 NTAPI
98  _Inout_ PIRP Irp);
99 
101 KSDDKAPI
102 NTSTATUS
103 NTAPI
106  _Out_ PDEVICE_OBJECT *PnpDeviceObject);
107 
109 KSDDKAPI
110 NTSTATUS
111 NTAPI
113  _In_ PIRP Irp);
114 
116 KSDDKAPI
117 NTSTATUS
118 NTAPI
121  _Out_ PBOOLEAN ChildDevice);
122 
124 KSDDKAPI
125 NTSTATUS
126 NTAPI
128  _In_ PIRP Irp);
129 
131 KSDDKAPI
132 NTSTATUS
133 NTAPI
136  _Inout_ PIRP Irp);
137 
139 KSDDKAPI
140 NTSTATUS
141 NTAPI
144  _Inout_ PIRP Irp);
145 
147 KSDDKAPI
148 NTSTATUS
149 NTAPI
153 
154 #endif /* _KS_ */
155 
156 #if defined(__cplusplus)
157 }
158 #endif
159 
160 #endif /* _NTDDK_ */
161 
162 #endif /* _SWENUM_ */
KSDDKAPI NTSTATUS NTAPI KsRemoveBusEnumInterface(IN PIRP Irp)
Definition: swenum.c:2205
KSDDKAPI NTSTATUS NTAPI KsReferenceSoftwareBusObject(IN KSDEVICE_HEADER Header)
Definition: device.c:805
KSDDKAPI VOID NTAPI KsDereferenceSoftwareBusObject(IN KSDEVICE_HEADER Header)
Definition: device.c:876
Definition: scsiwmi.h:51
_In_ PIRP Irp
Definition: csq.h:116
#define _IRQL_requires_max_(irql)
Definition: no_sal2.h:650
uint16_t * PWSTR
Definition: typedefs.h:54
LONG NTSTATUS
Definition: precomp.h:26
static WCHAR String[]
Definition: stringtable.c:55
uint16_t * PWCHAR
Definition: typedefs.h:54
PDEVICE_OBJECT PhysicalDeviceObject
Definition: btrfs_drv.h:1122
#define KSDDKAPI
Definition: ks.h:40
#define _In_opt_
Definition: no_sal2.h:213
KSDDKAPI NTSTATUS NTAPI KsServiceBusEnumCreateRequest(IN PDEVICE_OBJECT DeviceObject, IN OUT PIRP Irp)
Definition: swenum.c:1891
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
Definition: Header.h:8
struct _SWENUM_INSTALL_INTERFACE * PSWENUM_INSTALL_INTERFACE
#define _Out_
Definition: no_sal2.h:323
KSDDKAPI NTSTATUS NTAPI KsGetBusEnumIdentifier(IN PIRP Irp)
Definition: swenum.c:1397
WCHAR ReferenceString[1]
Definition: swenum.h:18
IN PVOID IN PVOID IN USHORT IN USHORT IN PINTERFACE Interface
Definition: pci.h:359
__wchar_t WCHAR
Definition: xmlstorage.h:180
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)
Definition: swenum.c:1515
#define _Inout_
Definition: no_sal2.h:244
KSDDKAPI NTSTATUS NTAPI KsGetBusEnumParentFDOFromChildPDO(IN PDEVICE_OBJECT DeviceObject, OUT PDEVICE_OBJECT *FunctionalDeviceObject)
Definition: swenum.c:1483
char * PBOOLEAN
Definition: retypes.h:11
static const GUID InterfaceGuid
Definition: wlanapi.c:25
KSDDKAPI NTSTATUS NTAPI KsServiceBusEnumPnpRequest(IN PDEVICE_OBJECT DeviceObject, IN OUT PIRP Irp)
Definition: swenum.c:2020
#define NTSTATUS
Definition: precomp.h:20
#define VOID
Definition: acefi.h:82
KSDDKAPI NTSTATUS NTAPI KsGetBusEnumPnpDeviceObject(IN PDEVICE_OBJECT DeviceObject, IN PDEVICE_OBJECT *PnpDeviceObject)
Definition: swenum.c:1745
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
KSDDKAPI NTSTATUS NTAPI KsInstallBusEnumInterface(PIRP Irp)
Definition: swenum.c:1799
#define _In_
Definition: no_sal2.h:204
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
KSDDKAPI NTSTATUS NTAPI KsIsBusEnumChildDevice(IN PDEVICE_OBJECT DeviceObject, OUT PBOOLEAN ChildDevice)
Definition: swenum.c:1858
_Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PDEVICE_OBJECT * FunctionalDeviceObject
Definition: ndis.h:4640
struct tagContext Context
Definition: acpixf.h:1030
struct _SWENUM_INSTALL_INTERFACE SWENUM_INSTALL_INTERFACE