ReactOS  0.4.15-dev-2972-gda2a567
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 
46 NTAPI
48 {
49  /* FIXME: ReactOS doesn't support MicroChannel yet */
50  return Isa;
51 }
52 
54 NTAPI
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 
97 CODE_SEG("INIT")
99 NTAPI
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 
153 USHORT
154 NTAPI
156 {
158  PKEY_VALUE_FULL_INFORMATION KeyValueInformation;
159  USHORT i;
160  PVOID Buffer;
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 */
185  for (i = 0; i < PiInitGroupOrderTableCount; i++)
186  {
187  /* Try to find a match */
189  }
190 
191  /* We're done */
192  ExFreePool(KeyValueInformation);
193  return i;
194 }
195 
196 USHORT
197 NTAPI
199 {
202  PKEY_VALUE_FULL_INFORMATION KeyValueInformation = NULL;
203  PKEY_VALUE_FULL_INFORMATION KeyValueInformationTag;
204  PKEY_VALUE_FULL_INFORMATION KeyValueInformationGroupOrderList;
205  PVOID Buffer;
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 */
215  Status = IopOpenRegistryKeyEx(&KeyHandle, NULL, &GroupString, KEY_READ);
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 */
255 Quickie:
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 
290 CODE_SEG("INIT")
291 NTSTATUS
292 NTAPI
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 */
415  sizeof(IOPNP_DEVICE_EXTENSION),
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 */
428  Pdo->Flags |= DO_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 IN
Definition: typedefs.h:39
ULONG Flags
Definition: iotypes.h:847
NTSTATUS IopInitPlugPlayEvents(VOID)
PDEVICE_OBJECT PhysicalDeviceObject
Definition: iotypes.h:850
PDEVICE_NODE IopRootDeviceNode
Definition: devnode.c:18
KEVENT PiEnumerationFinished
Definition: devaction.c:50
enum _INTERFACE_TYPE INTERFACE_TYPE
PNP_DEVNODE_STATE PiSetDevNodeState(_In_ PDEVICE_NODE DeviceNode, _In_ PNP_DEVNODE_STATE NewState)
Definition: devnode.c:108
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:2620
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING _Out_ PNDIS_HANDLE KeyHandle
Definition: ndis.h:4711
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
#define REG_BINARY
Definition: nt_native.h:1496
NTSTATUS NTAPI IopMemInitialize(VOID)
Definition: arbs.c:89
#define KEY_READ
Definition: nt_native.h:1023
#define TRUE
Definition: types.h:120
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
INTERFACE_TYPE PnpDefaultInterfaceType
Definition: pnpinit.c:25
_In_opt_ PSID Group
Definition: rtlfuncs.h:1605
LONG NTSTATUS
Definition: precomp.h:26
BOOLEAN PnPBootDriversLoaded
Definition: pnpinit.c:26
USHORT NTAPI PpInitGetGroupOrderIndex(IN HANDLE ServiceHandle)
Definition: pnpinit.c:155
#define DNF_NO_RESOURCE_REQUIRED
Definition: iotypes.h:178
FAST_MUTEX Lock
Definition: io.h:431
#define REGSTR_VAL_ROOT_DEVNODE
Definition: regstr.h:405
uint16_t * PWCHAR
Definition: typedefs.h:56
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Reserved_ ULONG _In_opt_ PUNICODE_STRING _In_ ULONG _Out_opt_ PULONG Disposition
Definition: cmfuncs.h:50
KSPIN_LOCK IopDeviceActionLock
Definition: devaction.c:49
BOOLEAN PnPBootDriversInitialized
Definition: pnpinit.c:27
uint32_t ULONG_PTR
Definition: typedefs.h:65
ARBITER_INSTANCE IopRootIrqArbiter
Definition: pnpinit.c:30
ARBITER_INSTANCE IopRootMemArbiter
Definition: pnpinit.c:32
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)
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
#define FILE_DEVICE_CONTROLLER
Definition: winioctl.h:110
#define FALSE
Definition: types.h:117
PDEVICE_NODE PipAllocateDeviceNode(IN PDEVICE_OBJECT PhysicalDeviceObject)
NTSTATUS NTAPI IopInitializePlugPlayServices(VOID)
Definition: pnpinit.c:293
#define REGSTR_KEY_ROOTENUM
Definition: regstr.h:10
#define REG_MULTI_SZ
Definition: nt_native.h:1501
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:64
PDRIVER_EXTENSION DriverExtension
Definition: iotypes.h:2282
USHORT PiInitGroupOrderTableCount
Definition: pnpinit.c:24
struct _IOPNP_DEVICE_EXTENSION IOPNP_DEVICE_EXTENSION
FORCEINLINE VOID KeInitializeSpinLock(_Out_ PKSPIN_LOCK SpinLock)
Definition: kefuncs.h:238
LIST_ENTRY IopDeviceActionRequestList
Definition: devaction.c:46
unsigned char BOOLEAN
#define DO_BUS_ENUMERATED_DEVICE
NTSTATUS NTAPI IoCreateDriver(_In_opt_ PUNICODE_STRING DriverName, _In_ PDRIVER_INITIALIZE InitializationFunction)
Definition: driver.c:1535
Definition: bufpool.h:45
#define REG_CREATED_NEW_KEY
Definition: nt_native.h:1084
void * PVOID
Definition: retypes.h:9
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
Definition: wdfdevice.h:2697
NTSTATUS NTAPI PnpRootDriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
Definition: pnproot.c:1470
Status
Definition: gdiplustypes.h:24
#define REG_OPTION_NON_VOLATILE
Definition: nt_native.h:1057
int Count
Definition: noreturn.cpp:7
#define ASSERT(a)
Definition: mode.c:44
ULONG CompatibleIdListSize
Definition: pnpinit.c:20
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
FORCEINLINE VOID ExInitializeFastMutex(_Out_ PFAST_MUTEX FastMutex)
Definition: exfuncs.h:274
#define for
Definition: utility.h:88
NTSTATUS NTAPI IopPortInitialize(VOID)
Definition: arbs.c:108
NTSTATUS NTAPI IopIrqInitialize(VOID)
Definition: arbs.c:51
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
Definition: obhandle.c:3398
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
PDRIVER_OBJECT IopRootDriverObject
Definition: pnpmgr.c:26
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSTATUS NTAPI IopInitializeArbiters(VOID)
Definition: pnpinit.c:55
static const WCHAR L[]
Definition: oid.c:1250
#define ExAllocatePool(type, size)
Definition: fbtusb.h:44
NTSTATUS NTAPI PnpRegMultiSzToUnicodeStrings(IN PKEY_VALUE_FULL_INFORMATION KeyValueInformation, OUT PUNICODE_STRING *UnicodeStringList, OUT PULONG UnicodeStringCount)
Definition: pnputil.c:47
ARBITER_INSTANCE IopRootPortArbiter
Definition: pnpinit.c:33
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4061
#define REGSTR_KEY_ENUM
Definition: regstr.h:9
UNICODE_STRING InstancePath
Definition: iotypes.h:853
NTSTATUS NTAPI IopBusNumberInitialize(VOID)
Definition: arbs.c:32
KSPIN_LOCK IopDeviceTreeLock
Definition: devnode.c:19
PDRIVER_ADD_DEVICE AddDevice
Definition: iotypes.h:2220
NTSTATUS NTAPI IopGetRegistryValue(IN HANDLE Handle, IN PWSTR ValueName, OUT PKEY_VALUE_FULL_INFORMATION *Information)
Definition: pnpmgr.c:1606
NTSTATUS NTAPI IopUpdateRootKey(VOID)
Definition: pnpmgr.c:1397
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
NTSTATUS NTAPI IopOpenRegistryKeyEx(PHANDLE KeyHandle, HANDLE ParentKey, PUNICODE_STRING Name, ACCESS_MASK DesiredAccess)
Definition: pnpmgr.c:1455
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
unsigned short USHORT
Definition: pedump.c:61
#define KEY_ALL_ACCESS
Definition: nt_native.h:1041
PIO_BUS_TYPE_GUID_LIST PnpBusTypeGuidList
Definition: pnpmgr.c:27
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
INTERFACE_TYPE NTAPI IopDetermineDefaultInterfaceType(VOID)
Definition: pnpinit.c:47
unsigned int * PULONG
Definition: retypes.h:1
#define NULL
Definition: types.h:112
ARBITER_INSTANCE IopRootBusNumberArbiter
Definition: pnpinit.c:29
BOOLEAN NTAPI PnpRegSzToString(IN PWCHAR RegSzData, IN ULONG RegSzLength, OUT PUSHORT StringLength OPTIONAL)
Definition: pnputil.c:171
#define DPRINT1
Definition: precomp.h:8
#define DNF_IDS_QUERIED
Definition: iotypes.h:175
unsigned int ULONG
Definition: retypes.h:1
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
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define DNF_ENUMERATED
Definition: iotypes.h:174
PUNICODE_STRING PiInitGroupOrderTable
Definition: pnpinit.c:23
#define DNF_MADEUP
Definition: iotypes.h:170
#define STATUS_SUCCESS
Definition: shellext.h:65
USHORT NTAPI PipGetDriverTagPriority(IN HANDLE ServiceHandle)
Definition: pnpinit.c:198
#define REG_DWORD
Definition: sdbapi.c:596
static CODE_SEG("PAGE")
Definition: isapnp.c:1482
NTSYSAPI BOOLEAN NTAPI RtlEqualUnicodeString(PUNICODE_STRING String1, PUNICODE_STRING String2, BOOLEAN CaseInSensitive)
NTSTATUS NTAPI IopDmaInitialize(VOID)
Definition: arbs.c:70
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
ARBITER_INSTANCE IopRootDmaArbiter
Definition: pnpinit.c:31
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
struct _IOPNP_DEVICE_EXTENSION * PIOPNP_DEVICE_EXTENSION
#define DRIVER_ROOT_NAME
Definition: ldr.h:5
NTSTATUS NTAPI PiInitCacheGroupInformation(VOID)
Definition: pnpinit.c:100
#define PAGED_CODE()
#define RTL_CONSTANT_STRING(s)
Definition: tunneltest.c:14
#define REG_SZ
Definition: layer.c:22