ReactOS 0.4.15-dev-6068-g8061a6f
pnpinit.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Kernel
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * FILE: ntoskrnl/io/pnpmgr/pnpinit.c
5 * PURPOSE: PnP Initialization Code
6 * PROGRAMMERS: ReactOS Portable Systems Group
7 */
8
9/* INCLUDES *******************************************************************/
10
11#include <ntoskrnl.h>
12#define NDEBUG
13#include <debug.h>
14
15/* GLOBALS ********************************************************************/
16
18{
22
28
34
36
42
43/* FUNCTIONS ******************************************************************/
44
48{
49 /* FIXME: ReactOS doesn't support MicroChannel yet */
50 return Isa;
51}
52
56{
58
60 if (!NT_SUCCESS(Status))
61 {
62 DPRINT1("IopPortInitialize() return %X\n", Status);
63 return Status;
64 }
65
67 if (!NT_SUCCESS(Status))
68 {
69 DPRINT1("IopMemInitialize() return %X\n", Status);
70 return Status;
71 }
72
74 if (!NT_SUCCESS(Status))
75 {
76 DPRINT1("IopDmaInitialize() return %X\n", Status);
77 return Status;
78 }
79
81 if (!NT_SUCCESS(Status))
82 {
83 DPRINT1("IopIrqInitialize() return %X\n", Status);
84 return Status;
85 }
86
88 if (!NT_SUCCESS(Status))
89 {
90 DPRINT1("IopBusNumberInitialize() return %X\n", Status);
91 }
92
93 return Status;
94}
95
96
97CODE_SEG("INIT")
101{
104 PKEY_VALUE_FULL_INFORMATION KeyValueInformation;
105 PUNICODE_STRING GroupTable;
106 ULONG Count;
107 UNICODE_STRING GroupString =
108 RTL_CONSTANT_STRING(L"\\Registry\\Machine\\System\\CurrentControlSet"
109 L"\\Control\\ServiceGroupOrder");
110
111 /* Open the registry key */
113 NULL,
114 &GroupString,
115 KEY_READ);
116 if (NT_SUCCESS(Status))
117 {
118 /* Get the list */
119 Status = IopGetRegistryValue(KeyHandle, L"List", &KeyValueInformation);
121
122 /* Make sure we got it */
123 if (NT_SUCCESS(Status))
124 {
125 /* Make sure it's valid */
126 if ((KeyValueInformation->Type == REG_MULTI_SZ) &&
127 (KeyValueInformation->DataLength))
128 {
129 /* Convert it to unicode strings */
130 Status = PnpRegMultiSzToUnicodeStrings(KeyValueInformation,
131 &GroupTable,
132 &Count);
133
134 /* Cache it for later */
135 PiInitGroupOrderTable = GroupTable;
137 }
138 else
139 {
140 /* Fail */
142 }
143
144 /* Free the information */
145 ExFreePool(KeyValueInformation);
146 }
147 }
148
149 /* Return status */
150 return Status;
151}
152
153USHORT
154NTAPI
156{
158 PKEY_VALUE_FULL_INFORMATION KeyValueInformation;
159 USHORT i;
162 PAGED_CODE();
163
164 /* Make sure we have a cache */
165 if (!PiInitGroupOrderTable) return -1;
166
167 /* If we don't have a handle, the rest is easy -- return the count */
168 if (!ServiceHandle) return PiInitGroupOrderTableCount + 1;
169
170 /* Otherwise, get the group value */
171 Status = IopGetRegistryValue(ServiceHandle, L"Group", &KeyValueInformation);
173
174 /* Make sure we have a valid string */
175 ASSERT(KeyValueInformation->Type == REG_SZ);
176 ASSERT(KeyValueInformation->DataLength);
177
178 /* Convert to unicode string */
179 Buffer = (PVOID)((ULONG_PTR)KeyValueInformation + KeyValueInformation->DataOffset);
180 PnpRegSzToString(Buffer, KeyValueInformation->DataLength, &Group.Length);
181 Group.MaximumLength = (USHORT)KeyValueInformation->DataLength;
182 Group.Buffer = Buffer;
183
184 /* Loop the groups */
186 {
187 /* Try to find a match */
189 }
190
191 /* We're done */
192 ExFreePool(KeyValueInformation);
193 return i;
194}
195
196USHORT
197NTAPI
199{
202 PKEY_VALUE_FULL_INFORMATION KeyValueInformation = NULL;
203 PKEY_VALUE_FULL_INFORMATION KeyValueInformationTag;
204 PKEY_VALUE_FULL_INFORMATION KeyValueInformationGroupOrderList;
207 PULONG GroupOrder;
208 ULONG Count, Tag = 0;
209 USHORT i = -1;
210 UNICODE_STRING GroupString =
211 RTL_CONSTANT_STRING(L"\\Registry\\Machine\\System\\CurrentControlSet"
212 L"\\Control\\ServiceGroupOrder");
213
214 /* Open the key */
216 if (!NT_SUCCESS(Status)) goto Quickie;
217
218 /* Read the group */
219 Status = IopGetRegistryValue(ServiceHandle, L"Group", &KeyValueInformation);
220 if (!NT_SUCCESS(Status)) goto Quickie;
221
222 /* Make sure we have a group */
223 if ((KeyValueInformation->Type == REG_SZ) &&
224 (KeyValueInformation->DataLength))
225 {
226 /* Convert to unicode string */
227 Buffer = (PVOID)((ULONG_PTR)KeyValueInformation + KeyValueInformation->DataOffset);
228 PnpRegSzToString(Buffer, KeyValueInformation->DataLength, &Group.Length);
229 Group.MaximumLength = (USHORT)KeyValueInformation->DataLength;
230 Group.Buffer = Buffer;
231 }
232
233 /* Now read the tag */
234 Status = IopGetRegistryValue(ServiceHandle, L"Tag", &KeyValueInformationTag);
235 if (!NT_SUCCESS(Status)) goto Quickie;
236
237 /* Make sure we have a tag */
238 if ((KeyValueInformationTag->Type == REG_DWORD) &&
239 (KeyValueInformationTag->DataLength))
240 {
241 /* Read it */
242 Tag = *(PULONG)((ULONG_PTR)KeyValueInformationTag +
243 KeyValueInformationTag->DataOffset);
244 }
245
246 /* We can get rid of this now */
247 ExFreePool(KeyValueInformationTag);
248
249 /* Now let's read the group's tag order */
251 Group.Buffer,
252 &KeyValueInformationGroupOrderList);
253
254 /* We can get rid of this now */
255Quickie:
256 if (KeyValueInformation) ExFreePool(KeyValueInformation);
258 if (!NT_SUCCESS(Status)) return -1;
259
260 /* We're on the success path -- validate the tag order*/
261 if ((KeyValueInformationGroupOrderList->Type == REG_BINARY) &&
262 (KeyValueInformationGroupOrderList->DataLength))
263 {
264 /* Get the order array */
265 GroupOrder = (PULONG)((ULONG_PTR)KeyValueInformationGroupOrderList +
266 KeyValueInformationGroupOrderList->DataOffset);
267
268 /* Get the count */
269 Count = *GroupOrder;
270 ASSERT(((Count + 1) * sizeof(ULONG)) <=
271 KeyValueInformationGroupOrderList->DataLength);
272
273 /* Now loop each tag */
274 GroupOrder++;
275 for (i = 1; i <= Count; i++)
276 {
277 /* If we found it, we're out */
278 if (Tag == *GroupOrder) break;
279
280 /* Try the next one */
281 GroupOrder++;
282 }
283 }
284
285 /* Last buffer to free */
286 ExFreePool(KeyValueInformationGroupOrderList);
287 return i;
288}
289
290CODE_SEG("INIT")
292NTAPI
294{
297 HANDLE KeyHandle, EnumHandle, ParentHandle, TreeHandle, ControlHandle;
298 UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\REGISTRY\\MACHINE\\SYSTEM\\CURRENTCONTROLSET");
299 UNICODE_STRING PnpManagerDriverName = RTL_CONSTANT_STRING(DRIVER_ROOT_NAME L"PnpManager");
301
302 /* Initialize locks and such */
307
308 /* Get the default interface */
310
311 /* Initialize arbiters */
313 if (!NT_SUCCESS(Status)) return Status;
314
315 /* Setup the group cache */
317 if (!NT_SUCCESS(Status)) return Status;
318
319 /* Open the current control set */
321 NULL,
322 &KeyName,
324 if (!NT_SUCCESS(Status)) return Status;
325
326 /* Create the control key */
327 RtlInitUnicodeString(&KeyName, L"Control");
328 Status = IopCreateRegistryKeyEx(&ControlHandle,
329 KeyHandle,
330 &KeyName,
333 &Disposition);
334 if (!NT_SUCCESS(Status)) return Status;
335
336 /* Check if it's a new key */
338 {
339 HANDLE DeviceClassesHandle;
340
341 /* Create the device classes key */
342 RtlInitUnicodeString(&KeyName, L"DeviceClasses");
343 Status = IopCreateRegistryKeyEx(&DeviceClassesHandle,
344 ControlHandle,
345 &KeyName,
348 &Disposition);
349 if (!NT_SUCCESS(Status)) return Status;
350
351 ZwClose(DeviceClassesHandle);
352 }
353
354 ZwClose(ControlHandle);
355
356 /* Create the enum key */
358 Status = IopCreateRegistryKeyEx(&EnumHandle,
359 KeyHandle,
360 &KeyName,
363 &Disposition);
364 if (!NT_SUCCESS(Status)) return Status;
365
366 /* Check if it's a new key */
368 {
369 /* FIXME: DACLs */
370 }
371
372 /* Create the root key */
373 ParentHandle = EnumHandle;
375 Status = IopCreateRegistryKeyEx(&EnumHandle,
376 ParentHandle,
377 &KeyName,
380 &Disposition);
381 NtClose(ParentHandle);
382 if (!NT_SUCCESS(Status)) return Status;
383 NtClose(EnumHandle);
384
385 /* Open the root key now */
386 RtlInitUnicodeString(&KeyName, L"\\REGISTRY\\MACHINE\\SYSTEM\\CURRENTCONTROLSET\\ENUM");
387 Status = IopOpenRegistryKeyEx(&EnumHandle,
388 NULL,
389 &KeyName,
391 if (NT_SUCCESS(Status))
392 {
393 /* Create the root dev node */
395 Status = IopCreateRegistryKeyEx(&TreeHandle,
396 EnumHandle,
397 &KeyName,
400 NULL);
401 NtClose(EnumHandle);
402 if (NT_SUCCESS(Status)) NtClose(TreeHandle);
403 }
404
405 /* Create the root driver */
406 Status = IoCreateDriver(&PnpManagerDriverName, PnpRootDriverEntry);
407 if (!NT_SUCCESS(Status))
408 {
409 DPRINT1("IoCreateDriverObject() failed\n");
410 KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0);
411 }
412
413 /* Create the root PDO */
416 NULL,
418 0,
419 FALSE,
420 &Pdo);
421 if (!NT_SUCCESS(Status))
422 {
423 DPRINT1("IoCreateDevice() failed\n");
424 KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0);
425 }
426
427 /* This is a bus enumerated device */
429
430 /* Create the root device node */
432
433 /* Set flags */
436
437 /* Create instance path */
439 {
440 DPRINT1("RtlCreateUnicodeString() failed\n");
441 KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0);
442 }
443
444 /* Call the add device routine */
447
449
450 /* Initialize PnP-Event notification support */
452 if (!NT_SUCCESS(Status)) return Status;
453
454 /* Initialize the Bus Type GUID List */
458
459 /* Initialize PnP root relations (this is a syncronous operation) */
461
462 /* Launch the firmware mapper */
464 if (!NT_SUCCESS(Status)) return Status;
465
466 /* Close the handle to the control set */
468
469 /* Initialize PnP root relations (this is a syncronous operation) */
471
472 /* We made it */
473 return STATUS_SUCCESS;
474}
475
476/* EOF */
#define PAGED_CODE()
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
Definition: bufpool.h:45
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
#define KeInitializeSpinLock(sl)
Definition: env_spec_w32.h:604
#define PagedPool
Definition: env_spec_w32.h:308
#define ExAllocatePool(type, size)
Definition: fbtusb.h:44
Status
Definition: gdiplustypes.h:25
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
@ Isa
Definition: hwresource.cpp:138
enum _INTERFACE_TYPE INTERFACE_TYPE
static CODE_SEG("PAGE")
Definition: isapnp.c:1482
#define REG_SZ
Definition: layer.c:22
#define DRIVER_ROOT_NAME
Definition: ldr.h:5
#define ASSERT(a)
Definition: mode.c:44
#define for
Definition: utility.h:88
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING _Out_ PNDIS_HANDLE KeyHandle
Definition: ndis.h:4715
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Reserved_ ULONG _In_opt_ PUNICODE_STRING _In_ ULONG _Out_opt_ PULONG Disposition
Definition: cmfuncs.h:56
#define DNF_ENUMERATED
Definition: iotypes.h:174
@ DeviceNodeStarted
Definition: iotypes.h:392
#define DNF_NO_RESOURCE_REQUIRED
Definition: iotypes.h:178
#define DNF_IDS_QUERIED
Definition: iotypes.h:175
#define DNF_MADEUP
Definition: iotypes.h:170
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
_In_opt_ PSID Group
Definition: rtlfuncs.h:1646
int Count
Definition: noreturn.cpp:7
#define REG_BINARY
Definition: nt_native.h:1496
#define KEY_ALL_ACCESS
Definition: nt_native.h:1041
#define KEY_READ
Definition: nt_native.h:1023
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI BOOLEAN NTAPI RtlEqualUnicodeString(PUNICODE_STRING String1, PUNICODE_STRING String2, BOOLEAN CaseInSensitive)
#define REG_OPTION_NON_VOLATILE
Definition: nt_native.h:1057
#define REG_CREATED_NEW_KEY
Definition: nt_native.h:1084
#define REG_MULTI_SZ
Definition: nt_native.h:1501
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
Definition: obhandle.c:3402
@ NotificationEvent
NTSTATUS NTAPI IopOpenRegistryKeyEx(PHANDLE KeyHandle, HANDLE ParentKey, PUNICODE_STRING Name, ACCESS_MASK DesiredAccess)
Definition: pnpmgr.c:885
LIST_ENTRY IopDeviceActionRequestList
Definition: devaction.c:46
KSPIN_LOCK IopDeviceActionLock
Definition: devaction.c:49
@ PiActionEnumRootDevices
Definition: io.h:527
NTSTATUS IopInitPlugPlayEvents(VOID)
Definition: plugplay.c:37
PDEVICE_NODE PipAllocateDeviceNode(IN PDEVICE_OBJECT PhysicalDeviceObject)
KSPIN_LOCK IopDeviceTreeLock
Definition: devnode.c:19
BOOLEAN NTAPI PnpRegSzToString(IN PWCHAR RegSzData, IN ULONG RegSzLength, OUT PUSHORT StringLength OPTIONAL)
Definition: pnputil.c:171
NTSTATUS NTAPI IopGetRegistryValue(IN HANDLE Handle, IN PWSTR ValueName, OUT PKEY_VALUE_FULL_INFORMATION *Information)
Definition: pnpmgr.c:1036
NTSTATUS NTAPI PnpRootDriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
Definition: pnproot.c:1589
NTSTATUS NTAPI IopUpdateRootKey(VOID)
Definition: pnpmap.c:601
NTSTATUS NTAPI IopCreateRegistryKeyEx(OUT PHANDLE Handle, IN HANDLE BaseHandle OPTIONAL, IN PUNICODE_STRING KeyName, IN ACCESS_MASK DesiredAccess, IN ULONG CreateOptions, OUT PULONG Disposition OPTIONAL)
PNP_DEVNODE_STATE PiSetDevNodeState(_In_ PDEVICE_NODE DeviceNode, _In_ PNP_DEVNODE_STATE NewState)
Definition: devnode.c:108
PIO_BUS_TYPE_GUID_LIST PnpBusTypeGuidList
Definition: pnpmgr.c:27
PDRIVER_OBJECT IopRootDriverObject
Definition: pnpmgr.c:26
VOID PiQueueDeviceAction(_In_ PDEVICE_OBJECT DeviceObject, _In_ DEVICE_ACTION Action, _In_opt_ PKEVENT CompletionEvent, _Out_opt_ NTSTATUS *CompletionStatus)
Queue a device operation to a worker thread.
Definition: devaction.c:2655
PDEVICE_NODE IopRootDeviceNode
Definition: devnode.c:18
NTSTATUS NTAPI PnpRegMultiSzToUnicodeStrings(IN PKEY_VALUE_FULL_INFORMATION KeyValueInformation, OUT PUNICODE_STRING *UnicodeStringList, OUT PULONG UnicodeStringCount)
Definition: pnputil.c:47
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)
Definition: device.c:1031
NTSTATUS NTAPI IoCreateDriver(_In_opt_ PUNICODE_STRING DriverName, _In_ PDRIVER_INITIALIZE InitializationFunction)
Definition: driver.c:1562
#define L(x)
Definition: ntvdm.h:50
unsigned short USHORT
Definition: pedump.c:61
NTSTATUS NTAPI IopPortInitialize(VOID)
Definition: arbiters.c:490
ARBITER_INSTANCE IopRootBusNumberArbiter
Definition: pnpinit.c:29
NTSTATUS NTAPI IopInitializeArbiters(VOID)
Definition: pnpinit.c:55
ARBITER_INSTANCE IopRootIrqArbiter
Definition: pnpinit.c:30
KEVENT PiEnumerationFinished
Definition: devaction.c:50
PUNICODE_STRING PiInitGroupOrderTable
Definition: pnpinit.c:23
USHORT NTAPI PpInitGetGroupOrderIndex(IN HANDLE ServiceHandle)
Definition: pnpinit.c:155
struct _IOPNP_DEVICE_EXTENSION * PIOPNP_DEVICE_EXTENSION
INTERFACE_TYPE NTAPI IopDetermineDefaultInterfaceType(VOID)
Definition: pnpinit.c:47
BOOLEAN PnPBootDriversInitialized
Definition: pnpinit.c:27
USHORT PiInitGroupOrderTableCount
Definition: pnpinit.c:24
struct _IOPNP_DEVICE_EXTENSION IOPNP_DEVICE_EXTENSION
USHORT NTAPI PipGetDriverTagPriority(IN HANDLE ServiceHandle)
Definition: pnpinit.c:198
NTSTATUS NTAPI IopIrqInitialize(VOID)
Definition: arbiters.c:201
NTSTATUS NTAPI IopInitializePlugPlayServices(VOID)
Definition: pnpinit.c:293
ARBITER_INSTANCE IopRootPortArbiter
Definition: pnpinit.c:33
NTSTATUS NTAPI PiInitCacheGroupInformation(VOID)
Definition: pnpinit.c:100
ARBITER_INSTANCE IopRootMemArbiter
Definition: pnpinit.c:32
NTSTATUS NTAPI IopDmaInitialize(VOID)
Definition: arbiters.c:296
INTERFACE_TYPE PnpDefaultInterfaceType
Definition: pnpinit.c:25
NTSTATUS NTAPI IopBusNumberInitialize(VOID)
Definition: arbiters.c:90
NTSTATUS NTAPI IopMemInitialize(VOID)
Definition: arbiters.c:409
BOOLEAN PnPBootDriversLoaded
Definition: pnpinit.c:26
ARBITER_INSTANCE IopRootDmaArbiter
Definition: pnpinit.c:31
#define FILE_DEVICE_CONTROLLER
Definition: winioctl.h:110
#define REGSTR_VAL_ROOT_DEVNODE
Definition: regstr.h:405
#define REGSTR_KEY_ROOTENUM
Definition: regstr.h:10
#define REGSTR_KEY_ENUM
Definition: regstr.h:9
VOID NTAPI KeBugCheckEx(_In_ ULONG BugCheckCode, _In_ ULONG_PTR BugCheckParameter1, _In_ ULONG_PTR BugCheckParameter2, _In_ ULONG_PTR BugCheckParameter3, _In_ ULONG_PTR BugCheckParameter4)
Definition: rtlcompat.c:108
#define REG_DWORD
Definition: sdbapi.c:596
#define STATUS_SUCCESS
Definition: shellext.h:65
ULONG Flags
Definition: iotypes.h:852
PDEVICE_OBJECT PhysicalDeviceObject
Definition: iotypes.h:855
UNICODE_STRING InstancePath
Definition: iotypes.h:858
PDRIVER_ADD_DEVICE AddDevice
Definition: iotypes.h:2220
PDRIVER_EXTENSION DriverExtension
Definition: iotypes.h:2282
ULONG CompatibleIdListSize
Definition: pnpinit.c:20
FAST_MUTEX Lock
Definition: io.h:419
#define RTL_CONSTANT_STRING(s)
Definition: tunneltest.c:14
uint32_t * PULONG
Definition: typedefs.h:59
#define NTAPI
Definition: typedefs.h:36
void * PVOID
Definition: typedefs.h:50
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
uint16_t * PWCHAR
Definition: typedefs.h:56
uint32_t ULONG
Definition: typedefs.h:59
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4065
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
Definition: wdfdevice.h:2699
WDF_EXTERN_C_START typedef _Must_inspect_result_ _In_ WDFDRIVER _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ PDEVICE_OBJECT _In_opt_ PDEVICE_OBJECT _In_opt_ PDEVICE_OBJECT Pdo
Definition: wdfminiport.h:72
FORCEINLINE VOID ExInitializeFastMutex(_Out_ PFAST_MUTEX FastMutex)
Definition: exfuncs.h:274
#define DO_BUS_ENUMERATED_DEVICE