ReactOS 0.4.15-dev-7654-g6bc40d3
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
22
28
30
36
37/* FUNCTIONS ******************************************************************/
38
42{
43 /* FIXME: ReactOS doesn't support MicroChannel yet */
44 return Isa;
45}
46
50{
52
54 if (!NT_SUCCESS(Status))
55 {
56 DPRINT1("IopPortInitialize() return %X\n", Status);
57 return Status;
58 }
59
61 if (!NT_SUCCESS(Status))
62 {
63 DPRINT1("IopMemInitialize() return %X\n", Status);
64 return Status;
65 }
66
68 if (!NT_SUCCESS(Status))
69 {
70 DPRINT1("IopDmaInitialize() return %X\n", Status);
71 return Status;
72 }
73
75 if (!NT_SUCCESS(Status))
76 {
77 DPRINT1("IopIrqInitialize() return %X\n", Status);
78 return Status;
79 }
80
82 if (!NT_SUCCESS(Status))
83 {
84 DPRINT1("IopBusNumberInitialize() return %X\n", Status);
85 }
86
87 return Status;
88}
89
90
91CODE_SEG("INIT")
95{
98 PKEY_VALUE_FULL_INFORMATION KeyValueInformation;
99 PUNICODE_STRING GroupTable;
100 ULONG Count;
101 UNICODE_STRING GroupString =
102 RTL_CONSTANT_STRING(L"\\Registry\\Machine\\System\\CurrentControlSet"
103 L"\\Control\\ServiceGroupOrder");
104
105 /* Open the registry key */
107 NULL,
108 &GroupString,
109 KEY_READ);
110 if (NT_SUCCESS(Status))
111 {
112 /* Get the list */
113 Status = IopGetRegistryValue(KeyHandle, L"List", &KeyValueInformation);
115
116 /* Make sure we got it */
117 if (NT_SUCCESS(Status))
118 {
119 /* Make sure it's valid */
120 if ((KeyValueInformation->Type == REG_MULTI_SZ) &&
121 (KeyValueInformation->DataLength))
122 {
123 /* Convert it to unicode strings */
124 Status = PnpRegMultiSzToUnicodeStrings(KeyValueInformation,
125 &GroupTable,
126 &Count);
127
128 /* Cache it for later */
129 PiInitGroupOrderTable = GroupTable;
131 }
132 else
133 {
134 /* Fail */
136 }
137
138 /* Free the information */
139 ExFreePool(KeyValueInformation);
140 }
141 }
142
143 /* Return status */
144 return Status;
145}
146
147USHORT
148NTAPI
150{
152 PKEY_VALUE_FULL_INFORMATION KeyValueInformation;
153 USHORT i;
156 PAGED_CODE();
157
158 /* Make sure we have a cache */
159 if (!PiInitGroupOrderTable) return -1;
160
161 /* If we don't have a handle, the rest is easy -- return the count */
162 if (!ServiceHandle) return PiInitGroupOrderTableCount + 1;
163
164 /* Otherwise, get the group value */
165 Status = IopGetRegistryValue(ServiceHandle, L"Group", &KeyValueInformation);
167
168 /* Make sure we have a valid string */
169 ASSERT(KeyValueInformation->Type == REG_SZ);
170 ASSERT(KeyValueInformation->DataLength);
171
172 /* Convert to unicode string */
173 Buffer = (PVOID)((ULONG_PTR)KeyValueInformation + KeyValueInformation->DataOffset);
174 PnpRegSzToString(Buffer, KeyValueInformation->DataLength, &Group.Length);
175 Group.MaximumLength = (USHORT)KeyValueInformation->DataLength;
176 Group.Buffer = Buffer;
177
178 /* Loop the groups */
180 {
181 /* Try to find a match */
183 }
184
185 /* We're done */
186 ExFreePool(KeyValueInformation);
187 return i;
188}
189
190USHORT
191NTAPI
193{
196 PKEY_VALUE_FULL_INFORMATION KeyValueInformation = NULL;
197 PKEY_VALUE_FULL_INFORMATION KeyValueInformationTag;
198 PKEY_VALUE_FULL_INFORMATION KeyValueInformationGroupOrderList;
201 PULONG GroupOrder;
202 ULONG Count, Tag = 0;
203 USHORT i = -1;
204 UNICODE_STRING GroupString =
205 RTL_CONSTANT_STRING(L"\\Registry\\Machine\\System\\CurrentControlSet"
206 L"\\Control\\ServiceGroupOrder");
207
208 /* Open the key */
210 if (!NT_SUCCESS(Status)) goto Quickie;
211
212 /* Read the group */
213 Status = IopGetRegistryValue(ServiceHandle, L"Group", &KeyValueInformation);
214 if (!NT_SUCCESS(Status)) goto Quickie;
215
216 /* Make sure we have a group */
217 if ((KeyValueInformation->Type == REG_SZ) &&
218 (KeyValueInformation->DataLength))
219 {
220 /* Convert to unicode string */
221 Buffer = (PVOID)((ULONG_PTR)KeyValueInformation + KeyValueInformation->DataOffset);
222 PnpRegSzToString(Buffer, KeyValueInformation->DataLength, &Group.Length);
223 Group.MaximumLength = (USHORT)KeyValueInformation->DataLength;
224 Group.Buffer = Buffer;
225 }
226
227 /* Now read the tag */
228 Status = IopGetRegistryValue(ServiceHandle, L"Tag", &KeyValueInformationTag);
229 if (!NT_SUCCESS(Status)) goto Quickie;
230
231 /* Make sure we have a tag */
232 if ((KeyValueInformationTag->Type == REG_DWORD) &&
233 (KeyValueInformationTag->DataLength))
234 {
235 /* Read it */
236 Tag = *(PULONG)((ULONG_PTR)KeyValueInformationTag +
237 KeyValueInformationTag->DataOffset);
238 }
239
240 /* We can get rid of this now */
241 ExFreePool(KeyValueInformationTag);
242
243 /* Now let's read the group's tag order */
245 Group.Buffer,
246 &KeyValueInformationGroupOrderList);
247
248 /* We can get rid of this now */
249Quickie:
250 if (KeyValueInformation) ExFreePool(KeyValueInformation);
252 if (!NT_SUCCESS(Status)) return -1;
253
254 /* We're on the success path -- validate the tag order*/
255 if ((KeyValueInformationGroupOrderList->Type == REG_BINARY) &&
256 (KeyValueInformationGroupOrderList->DataLength))
257 {
258 /* Get the order array */
259 GroupOrder = (PULONG)((ULONG_PTR)KeyValueInformationGroupOrderList +
260 KeyValueInformationGroupOrderList->DataOffset);
261
262 /* Get the count */
263 Count = *GroupOrder;
264 ASSERT(((Count + 1) * sizeof(ULONG)) <=
265 KeyValueInformationGroupOrderList->DataLength);
266
267 /* Now loop each tag */
268 GroupOrder++;
269 for (i = 1; i <= Count; i++)
270 {
271 /* If we found it, we're out */
272 if (Tag == *GroupOrder) break;
273
274 /* Try the next one */
275 GroupOrder++;
276 }
277 }
278
279 /* Last buffer to free */
280 ExFreePool(KeyValueInformationGroupOrderList);
281 return i;
282}
283
284CODE_SEG("INIT")
286NTAPI
288{
291 HANDLE KeyHandle, EnumHandle, ParentHandle, TreeHandle, ControlHandle;
292 UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\REGISTRY\\MACHINE\\SYSTEM\\CURRENTCONTROLSET");
293 UNICODE_STRING PnpManagerDriverName = RTL_CONSTANT_STRING(DRIVER_ROOT_NAME L"PnpManager");
295
296 /* Initialize locks and such */
301
302 /* Get the default interface */
304
305 /* Initialize arbiters */
307 if (!NT_SUCCESS(Status)) return Status;
308
309 /* Setup the group cache */
311 if (!NT_SUCCESS(Status)) return Status;
312
313 /* Open the current control set */
315 NULL,
316 &KeyName,
318 if (!NT_SUCCESS(Status)) return Status;
319
320 /* Create the control key */
321 RtlInitUnicodeString(&KeyName, L"Control");
322 Status = IopCreateRegistryKeyEx(&ControlHandle,
323 KeyHandle,
324 &KeyName,
327 &Disposition);
328 if (!NT_SUCCESS(Status)) return Status;
329
330 /* Check if it's a new key */
332 {
333 HANDLE DeviceClassesHandle;
334
335 /* Create the device classes key */
336 RtlInitUnicodeString(&KeyName, L"DeviceClasses");
337 Status = IopCreateRegistryKeyEx(&DeviceClassesHandle,
338 ControlHandle,
339 &KeyName,
342 &Disposition);
343 if (!NT_SUCCESS(Status)) return Status;
344
345 ZwClose(DeviceClassesHandle);
346 }
347
348 ZwClose(ControlHandle);
349
350 /* Create the enum key */
352 Status = IopCreateRegistryKeyEx(&EnumHandle,
353 KeyHandle,
354 &KeyName,
357 &Disposition);
358 if (!NT_SUCCESS(Status)) return Status;
359
360 /* Check if it's a new key */
362 {
363 /* FIXME: DACLs */
364 }
365
366 /* Create the root key */
367 ParentHandle = EnumHandle;
369 Status = IopCreateRegistryKeyEx(&EnumHandle,
370 ParentHandle,
371 &KeyName,
374 &Disposition);
375 NtClose(ParentHandle);
376 if (!NT_SUCCESS(Status)) return Status;
377 NtClose(EnumHandle);
378
379 /* Open the root key now */
380 RtlInitUnicodeString(&KeyName, L"\\REGISTRY\\MACHINE\\SYSTEM\\CURRENTCONTROLSET\\ENUM");
381 Status = IopOpenRegistryKeyEx(&EnumHandle,
382 NULL,
383 &KeyName,
385 if (NT_SUCCESS(Status))
386 {
387 /* Create the root dev node */
389 Status = IopCreateRegistryKeyEx(&TreeHandle,
390 EnumHandle,
391 &KeyName,
394 NULL);
395 NtClose(EnumHandle);
396 if (NT_SUCCESS(Status)) NtClose(TreeHandle);
397 }
398
399 /* Create the root driver */
400 Status = IoCreateDriver(&PnpManagerDriverName, PnpRootDriverEntry);
401 if (!NT_SUCCESS(Status))
402 {
403 DPRINT1("IoCreateDriverObject() failed\n");
404 KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0);
405 }
406
407 /* Create the root PDO */
409 0,
410 NULL,
412 0,
413 FALSE,
414 &Pdo);
415 if (!NT_SUCCESS(Status))
416 {
417 DPRINT1("IoCreateDevice() failed\n");
418 KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0);
419 }
420
421 /* This is a bus enumerated device */
423
424 /* Create the root device node */
426
427 /* Set flags */
430
431 /* Create instance path */
433 {
434 DPRINT1("RtlCreateUnicodeString() failed\n");
435 KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0);
436 }
437
439
441
442 /* Initialize PnP-Event notification support */
444 if (!NT_SUCCESS(Status)) return Status;
445
446 /* Initialize the Bus Type GUID List */
450
451 /* Initialize PnP root relations (this is a syncronous operation) */
453
454 /* Launch the firmware mapper */
456 if (!NT_SUCCESS(Status)) return Status;
457
458 /* Close the handle to the control set */
460
461 /* Initialize PnP root relations (this is a syncronous operation) */
463
464 /* We made it */
465 return STATUS_SUCCESS;
466}
467
468/* 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:429
#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:40
VOID PnpRootInitializeDevExtension(VOID)
Definition: pnproot.c:1440
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:1488
NTSTATUS NTAPI IopUpdateRootKey(VOID)
Definition: pnpmap.c:670
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:2659
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:1576
#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:23
NTSTATUS NTAPI IopInitializeArbiters(VOID)
Definition: pnpinit.c:49
ARBITER_INSTANCE IopRootIrqArbiter
Definition: pnpinit.c:24
KEVENT PiEnumerationFinished
Definition: devaction.c:50
PUNICODE_STRING PiInitGroupOrderTable
Definition: pnpinit.c:17
USHORT NTAPI PpInitGetGroupOrderIndex(IN HANDLE ServiceHandle)
Definition: pnpinit.c:149
INTERFACE_TYPE NTAPI IopDetermineDefaultInterfaceType(VOID)
Definition: pnpinit.c:41
BOOLEAN PnPBootDriversInitialized
Definition: pnpinit.c:21
USHORT PiInitGroupOrderTableCount
Definition: pnpinit.c:18
USHORT NTAPI PipGetDriverTagPriority(IN HANDLE ServiceHandle)
Definition: pnpinit.c:192
NTSTATUS NTAPI IopIrqInitialize(VOID)
Definition: arbiters.c:201
NTSTATUS NTAPI IopInitializePlugPlayServices(VOID)
Definition: pnpinit.c:287
ARBITER_INSTANCE IopRootPortArbiter
Definition: pnpinit.c:27
NTSTATUS NTAPI PiInitCacheGroupInformation(VOID)
Definition: pnpinit.c:94
ARBITER_INSTANCE IopRootMemArbiter
Definition: pnpinit.c:26
NTSTATUS NTAPI IopDmaInitialize(VOID)
Definition: arbiters.c:296
INTERFACE_TYPE PnpDefaultInterfaceType
Definition: pnpinit.c:19
NTSTATUS NTAPI IopBusNumberInitialize(VOID)
Definition: arbiters.c:90
NTSTATUS NTAPI IopMemInitialize(VOID)
Definition: arbiters.c:409
BOOLEAN PnPBootDriversLoaded
Definition: pnpinit.c:20
ARBITER_INSTANCE IopRootDmaArbiter
Definition: pnpinit.c:25
#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:889
UNICODE_STRING InstancePath
Definition: iotypes.h:895
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
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