40#define MAX_DEVICE_ID_LEN 200
41#define MAX_SEPARATORS_INSTANCEID 0
42#define MAX_SEPARATORS_DEVICEID 1
129 ULONG SeparatorsCount = 0;
160 for (PtrChar =
Id; PtrChar < StringEnd; PtrChar++)
166 if (!IsMultiSz || (PtrPrevChar && PtrChar == PtrPrevChar + 1))
168 if (MaxSeparators == SeparatorsCount || IsMultiSz)
173 DPRINT1(
"IopValidateID: SeparatorsCount - %lu, MaxSeparators - %lu\n",
174 SeparatorsCount, MaxSeparators);
179 PtrPrevChar = PtrChar;
182 else if (Char <
' ' || Char > 0x7F || Char ==
',')
184 DPRINT1(
"IopValidateID: Invalid character - %04X\n", Char);
187 else if (Char ==
' ')
191 else if (Char ==
'\\')
195 if (SeparatorsCount > MaxSeparators)
197 DPRINT1(
"IopValidateID: SeparatorsCount - %lu, MaxSeparators - %lu\n",
198 SeparatorsCount, MaxSeparators);
204 DPRINT1(
"IopValidateID: Not terminated ID\n");
226 DPRINT(
"Sending IRP_MN_QUERY_ID.BusQueryDeviceID to device stack\n");
235 DPRINT1(
"IopInitiatePnpIrp(BusQueryDeviceID) failed (Status %x)\n",
Status);
249 DPRINT(
"Sending IRP_MN_QUERY_CAPABILITIES to device stack (after enumeration)\n");
256 DPRINT1(
"IopQueryDeviceCapabilities() failed (Status 0x%08lx)\n",
Status);
273 DPRINT(
"Instance ID is not unique\n");
277 DPRINT1(
"IopGetParentIdPrefix() failed (Status 0x%08lx)\n",
Status);
283 DPRINT(
"Sending IRP_MN_QUERY_ID.BusQueryInstanceID to device stack\n");
292 DPRINT(
"IopInitiatePnpIrp(BusQueryInstanceID) failed (Status %lx)\n",
Status);
309 InstancePath->Length = 0;
310 InstancePath->MaximumLength = DeviceId.
Length +
sizeof(
WCHAR) +
316 InstancePath->MaximumLength +=
sizeof(
WCHAR);
320 InstancePath->MaximumLength,
322 if (!InstancePath->Buffer)
390 HANDLE ccsServicesHandle, serviceHandle =
NULL;
408 sizeof(*driverEntry),
443 DPRINT(
"Service \"%wZ\" is disabled (start type %u)\n", &
serviceName, startType);
513 DPRINT1(
"Failed to load driver \"%wZ\" for %wZ (status %x)\n",
553 .Name = Lower ?
L"LowerFilters" :
L"UpperFilters",
563 if (ClassKey ==
NULL)
572 .Name = Lower ?
L"LowerFilters" :
L"UpperFilters",
600 HANDLE EnumRootKey, SubKey;
613 DPRINT1(
"IopOpenRegistryKeyEx() failed for \"%wZ\" (status %x)\n", &EnumRoot,
Status);
622 DPRINT1(
"Failed to open a devnode instance key for \"%wZ\" (status %x)\n",
643 DPRINT1(
"IopOpenRegistryKeyEx() failed for \"%wZ\" (status %x)\n",
644 &ccsControlClass,
Status);
653 DPRINT1(
"Failed to open class key \"%wZ\" (status %x)\n", &classGUID,
Status);
669 DPRINT(
"Properties key failed to open for \"%wZ\" (status %x)\n",
730 sizeof(*driverEntry),
734 DPRINT(
"No service for \"%wZ\" (RawDeviceOK)\n", &
DeviceNode->InstancePath);
742 DPRINT(
"No service for \"%wZ\" (loadDrv: %u)\n", &
DeviceNode->InstancePath, LoadDrivers);
755 listEntry != &drvListHead;
756 listEntry = listEntry->
Flink)
771 else if (driverObject ==
NULL)
799 if (!SystemPowerDeviceNodeCreated)
803 SystemPowerDeviceNodeCreated =
TRUE;
823 DPRINT1(
"DO_DEVICE_INITIALIZING is not cleared on a device 0x%p!\n", attachedDO);
844 if (ClassKey !=
NULL)
866 DeviceCaps->Version = 1;
867 DeviceCaps->Address = -1;
868 DeviceCaps->UINumber = -1;
872 Stack.Parameters.DeviceCapabilities.Capabilities = DeviceCaps;
883 DPRINT1(
"IRP_MN_QUERY_CAPABILITIES failed with status 0x%lx\n",
Status);
890 if (DeviceCaps->LockSupported)
893 if (DeviceCaps->EjectSupported)
896 if (DeviceCaps->Removable)
899 if (DeviceCaps->DockDevice)
902 if (DeviceCaps->UniqueID)
905 if (DeviceCaps->SilentInstall)
908 if (DeviceCaps->RawDeviceOK)
911 if (DeviceCaps->SurpriseRemovalOK)
914 if (DeviceCaps->HardwareDisabled)
917 if (DeviceCaps->NonDynamic)
920 if (DeviceCaps->NoDisplayInUI)
923 DeviceNode->UserFlags &= ~DNUF_DONT_SHOW_IN_UI;
930 Status = ZwSetValueKey(InstanceKey,
938 if (DeviceCaps->UINumber !=
MAXULONG)
941 Status = ZwSetValueKey(InstanceKey,
945 &DeviceCaps->UINumber,
968 DPRINT(
"Sending IRP_MN_QUERY_ID.BusQueryHardwareIDs to device stack\n");
988 DPRINT(
"Hardware IDs:\n");
1001 Status = ZwSetValueKey(InstanceKey,
1014 DPRINT(
"IopInitiatePnpIrp() failed (Status %x)\n",
Status);
1033 DPRINT(
"Sending IRP_MN_QUERY_ID.BusQueryCompatibleIDs to device stack\n");
1053 DPRINT(
"Compatible IDs:\n");
1066 Status = ZwSetValueKey(InstanceKey,
1074 DPRINT1(
"ZwSetValueKey() failed (Status %lx) or no Compatible ID returned\n",
Status);
1079 DPRINT(
"IopInitiatePnpIrp() failed (Status %x)\n",
Status);
1101 DPRINT1(
"ZwQueryDefaultLocale() failed with status %x\n",
status);
1118 status = ZwSetValueKey(InstanceKey,
1134 DPRINT(
"Driver didn't return DeviceDesc (status %x)\n",
status);
1136 status = ZwSetValueKey(InstanceKey,
1140 unknownDeviceDesc.
Buffer,
1160 &deviceLocationInfo);
1162 if (deviceLocationInfo && deviceLocationInfo[0] !=
UNICODE_NULL)
1166 status = ZwSetValueKey(InstanceKey,
1178 if (deviceLocationInfo)
1184 DPRINT(
"Driver didn't return LocationInformation (status %x)\n",
status);
1212 DPRINT1(
"IopCreateDeviceInstancePath() failed with status 0x%lx\n",
Status);
1219 if (OldDeviceObject !=
NULL)
1223 DPRINT1(
"Duplicate device instance '%wZ'\n", &InstancePathU);
1225 DPRINT1(
"Old instance parent: '%wZ'\n", &OldDeviceNode->
Parent->InstancePath);
1244 DPRINT1(
"Failed to create the instance key! (Status %lx)\n",
Status);
1259 DPRINT(
"Sending IRP_MN_QUERY_BUS_INFORMATION to device stack\n");
1276 DPRINT(
"IopInitiatePnpIrp() failed (Status %x) or IoStatusBlock.Information=NULL\n",
Status);
1283 DPRINT(
"Sending IRP_MN_QUERY_RESOURCES to device stack\n");
1296 DPRINT(
"IopInitiatePnpIrp() failed (Status %x) or IoStatusBlock.Information=NULL\n",
Status);
1300 DPRINT(
"Sending IRP_MN_QUERY_RESOURCE_REQUIREMENTS to device stack\n");
1312 DPRINT(
"IopInitiatePnpIrp() failed (Status %08lx)\n",
Status);
1316 if (InstanceKey !=
NULL)
1356 WCHAR ValueBuffer[6];
1381 ServiceKeyName.
Length = 0;
1385 DPRINT1(
"No ServiceKeyName.Buffer!\n");
1392 DPRINT(
"ServiceKeyName: %wZ\n", &ServiceKeyName);
1422 &KeyValueInformation);
1435 KeyValueInformation =
NULL;
1440 &KeyValueInformation);
1452 KeyValueInformation =
NULL;
1456 swprintf(ValueBuffer,
L"%lu", NextInstance);
1458 Status = ZwSetValueKey(ServiceEnumKey,
1473 Status = ZwSetValueKey(ServiceEnumKey,
1484 Status = ZwSetValueKey(ServiceEnumKey,
1489 sizeof(NextInstance));
1493 if (ServiceEnumKey !=
NULL)
1496 if (ServiceKey !=
NULL)
1531 DeviceNode->UserFlags &= ~DNUF_NOT_DISABLEABLE;
1536 DeviceNode->UserFlags &= ~DNUF_DONT_SHOW_IN_UI;
1557 DeviceNode->Flags &= ~DNF_NO_RESOURCE_REQUIRED;
1583 HANDLE enumRootHandle, instanceHandle;
1589 DPRINT1(
"IopOpenRegistryKeyEx() failed for \"%wZ\" (status %x)\n", &enumRoot,
Status);
1598 DPRINT1(
"Failed to open a devnode instance key for \"%wZ\" (status %x)\n",
1613 DPRINT(
"Sending IRP_MN_QUERY_CAPABILITIES to device stack (after start)\n");
1618 DPRINT(
"IopInitiatePnpIrp() failed (Status 0x%08lx)\n",
Status);
1669 vpbDevObj->Vpb->
Flags &= ~VPB_REMOVE_PENDING;
1680 targetDevice = vpbDevObj->Vpb->DeviceObject;
1693 vpbDevObj = vpbDevObj->AttachedDevice;
1695 }
while (vpbDevObj);
1726 DeviceNode->ResourceListTranslated->Count = 0;
1748 for (
i = 0;
i < DeviceRelations->
Count;
i++)
1765 ChildDeviceNode = ParentDeviceNode->
Child;
1766 while (ChildDeviceNode !=
NULL)
1768 NextDeviceNode = ChildDeviceNode->
Sibling;
1773 ChildDeviceNode = NextDeviceNode;
1809 ChildDeviceNode = ParentDeviceNode->
Child;
1810 while (ChildDeviceNode !=
NULL)
1812 NextDeviceNode = ChildDeviceNode->
Sibling;
1817 ChildDeviceNode = NextDeviceNode;
1832 for (
i = 0;
i < DeviceRelations->
Count;
i++)
1861 DPRINT(
"IopInitiatePnpIrp() failed with status 0x%08lx\n",
Status);
1862 DeviceRelations =
NULL;
1869 if (DeviceRelations)
1904 PDEVICE_NODE ChildDeviceNode, NextDeviceNode, FailedRemoveDevice;
1909 ChildDeviceNode = ParentDeviceNode->
Child;
1910 while (ChildDeviceNode !=
NULL)
1912 NextDeviceNode = ChildDeviceNode->
Sibling;
1919 FailedRemoveDevice = ChildDeviceNode;
1924 ChildDeviceNode = NextDeviceNode;
1932 ChildDeviceNode = ParentDeviceNode->
Child;
1933 while (ChildDeviceNode !=
NULL)
1935 NextDeviceNode = ChildDeviceNode->
Sibling;
1942 if (ChildDeviceNode == FailedRemoveDevice)
1945 ChildDeviceNode = NextDeviceNode;
1964 for (
i = 0;
i < DeviceRelations->
Count;
i++)
1979 for (
i = 0;
i <=
j;
i++)
1985 for (;
i < DeviceRelations->
Count;
i++)
2013 DPRINT1(
"Removal vetoed by failing the query remove request\n");
2028 DPRINT(
"IopInitiatePnpIrp() failed with status 0x%08lx\n",
Status);
2029 DeviceRelations =
NULL;
2036 if (DeviceRelations)
2046 if (DeviceRelations)
2051 if (DeviceRelations)
2075 if (surpriseRemoval)
2084 if (surpriseRemoval)
2107 DPRINT(
"QDR request failed for %wZ, status %x\n",
2116 if (!DeviceRelations)
2126 child->Flags &= ~DNF_ENUMERATED;
2129 DPRINT(
"PiEnumerateDevice: enumerating %u children\n", DeviceRelations->
Count);
2132 for (
i = 0;
i < DeviceRelations->
Count;
i++)
2134 ChildDeviceObject = DeviceRelations->
Objects[
i];
2138 if (!ChildDeviceNode)
2142 if (ChildDeviceNode)
2155 DPRINT1(
"PipAllocateDeviceNode() failed. Skipping PDO %u\n",
i);
2228 DPRINT(
"IopInitiatePnpIrp() failed with status 0x%08lx\n",
Status);
2229 DeviceRelations =
NULL;
2236 if (DeviceRelations)
2246 if (DeviceRelations)
2253 if (DeviceRelations)
2259 if (DeviceRelations)
2300 DeviceNode->ResourceRequirements = resourceRequirements;
2307 DeviceNode->Flags &= ~DNF_RESOURCE_REQUIREMENTS_CHANGED;
2322 doProcessAgain =
FALSE;
2336 switch (currentNode->
State)
2362 doProcessAgain =
TRUE;
2369 doProcessAgain =
TRUE;
2391 doProcessAgain =
TRUE;
2397 currentNode->
Flags &= ~DNF_REENUMERATE;
2402 doProcessAgain =
TRUE;
2409 currentNode->
Flags &= ~DNF_NON_STOPPED_REBALANCE;
2417 doProcessAgain =
TRUE;
2433 doProcessAgain =
TRUE;
2440 doProcessAgain =
TRUE;
2449 doProcessAgain =
TRUE;
2472 if (!doProcessAgain)
2479 ASSERT(currentNode->
Child->Parent == currentNode);
2480 currentNode = currentNode->
Child;
2490 currentNode = currentNode->
Sibling;
2497 currentNode = currentNode->
Parent;
2505 }
while (doProcessAgain || currentNode !=
RootNode);
2517 return "PiActionEnumDeviceTree";
2519 return "PiActionEnumRootDevices";
2521 return "PiActionResetDevice";
2523 return "PiActionAddBootDevices";
2525 return "PiActionStartDevice";
2527 return "PiActionQueryState";
2529 return "(request unknown)";
2560 DPRINT(
"Processing PnP request %p: DeviceObject - %p, Action - %s\n",
2600 DPRINT1(
"NOTE: attempt to start an already started/uninitialized device %wZ\n",
2629 if (
Request->CompletionStatus)
2670 DPRINT(
"PiQueueDeviceAction: DeviceObject - %p, Request - %p, Action - %s\n",
2677 Request->CompletionEvent = CompletionEvent;
2678 Request->CompletionStatus = CompletionStatus;
static WCHAR ServiceName[]
PDEVICE_OBJECT PhysicalDeviceObject
_Inout_ PVCB _In_ BOOLEAN Force
#define CM_PROB_FAILED_ADD
#define CM_PROB_HELD_FOR_EJECT
#define CM_PROB_HARDWARE_DISABLED
#define CM_PROB_NEED_RESTART
#define CM_PROB_DEVICE_NOT_THERE
#define CM_PROB_DRIVER_SERVICE_KEY_INVALID
#define CM_PROB_FAILED_START
#define CM_PROB_DRIVER_FAILED_LOAD
#define CM_PROB_OUT_OF_MEMORY
#define CM_PROB_FAILED_POST_START
#define CM_PROB_FAILED_DRIVER_ENTRY
#define CM_PROB_DISABLED_SERVICE
static NTSTATUS IopQueryCompatibleIds(PDEVICE_NODE DeviceNode, HANDLE InstanceKey)
LIST_ENTRY IopDeviceActionRequestList
KSPIN_LOCK IopDeviceActionLock
#define MAX_DEVICE_ID_LEN
PDEVICE_OBJECT IopGetDeviceObjectFromDeviceInstance(PUNICODE_STRING DeviceInstance)
static VOID NTAPI IopSendSurpriseRemoval(IN PDEVICE_OBJECT DeviceObject)
static NTSTATUS PiAttachFilterDrivers(PLIST_ENTRY DriversListHead, PDEVICE_NODE DeviceNode, HANDLE EnumSubKey, HANDLE ClassKey, BOOLEAN Lower, BOOLEAN LoadDrivers)
Calls PiAttachFilterDriversCallback for filter drivers (if any)
KEVENT PiEnumerationFinished
NTSTATUS IopSetDeviceInstanceData(HANDLE InstanceKey, PDEVICE_NODE DeviceNode)
static NTSTATUS PiIrpSendRemoveCheckVpb(_In_ PDEVICE_OBJECT DeviceObject, _In_ UCHAR MinorFunction)
Sends one of the remove IRPs to the device stack.
NTSTATUS IopUpdateResourceMapForPnPDevice(IN PDEVICE_NODE DeviceNode)
ERESOURCE IopDriverLoadResource
struct _ATTACH_FILTER_DRIVERS_CONTEXT * PATTACH_FILTER_DRIVERS_CONTEXT
static NTSTATUS IopCreateDeviceInstancePath(_In_ PDEVICE_NODE DeviceNode, _Out_ PUNICODE_STRING InstancePath)
static const WCHAR ServicesKeyName[]
BOOLEAN PnPBootDriversInitialized
NTSTATUS IopGetParentIdPrefix(PDEVICE_NODE DeviceNode, PUNICODE_STRING ParentIdPrefix)
NTSTATUS NTAPI IopQueryDeviceCapabilities(PDEVICE_NODE DeviceNode, PDEVICE_CAPABILITIES DeviceCaps)
static NTSTATUS PiEnumerateDevice(_In_ PDEVICE_NODE DeviceNode)
struct _ADD_DEV_DRIVERS_LIST * PADD_DEV_DRIVERS_LIST
static VOID NTAPI PipDeviceActionWorker(_In_opt_ PVOID Context)
struct _ADD_DEV_DRIVERS_LIST ADD_DEV_DRIVERS_LIST
static VOID IopCancelPrepareDeviceForRemoval(PDEVICE_OBJECT DeviceObject)
static NTSTATUS IopQueryRemoveDeviceRelations(PDEVICE_RELATIONS DeviceRelations, BOOLEAN Force)
USHORT NTAPI IopGetBusTypeGuidIndex(LPGUID BusTypeGuid)
struct _DEVICE_ACTION_REQUEST DEVICE_ACTION_REQUEST
static VOID IopSendRemoveChildDevices(PDEVICE_NODE ParentDeviceNode)
static NTSTATUS IopPrepareDeviceForRemoval(PDEVICE_OBJECT DeviceObject, BOOLEAN Force)
static NTSTATUS IopRemoveDevice(PDEVICE_NODE DeviceNode)
static VOID PiDevNodeStateMachine(_In_ PDEVICE_NODE RootNode)
WORK_QUEUE_ITEM IopDeviceActionWorkItem
VOID PiSetDevNodeText(_In_ PDEVICE_NODE DeviceNode, _In_ HANDLE InstanceKey)
Sets the DeviceNode's DeviceDesc and LocationInformation registry values.
static VOID IopCancelRemoveDeviceRelations(PDEVICE_RELATIONS DeviceRelations)
static NTSTATUS NTAPI IopSendEject(IN PDEVICE_OBJECT DeviceObject)
static VOID NTAPI IopCancelRemoveDevice(IN PDEVICE_OBJECT DeviceObject)
static VOID IopSendRemoveDeviceRelations(PDEVICE_RELATIONS DeviceRelations)
static NTSTATUS IopSetServiceEnumData(_In_ PDEVICE_NODE DeviceNode, _In_ HANDLE InstanceHandle)
#define MAX_SEPARATORS_DEVICEID
static NTSTATUS PiStartDeviceFinal(_In_ PDEVICE_NODE DeviceNode)
static VOID PiFakeResourceRebalance(_In_ PDEVICE_NODE DeviceNode)
static NTSTATUS NTAPI IopQueryRemoveDevice(IN PDEVICE_OBJECT DeviceObject)
static NTSTATUS PiInitializeDevNode(_In_ PDEVICE_NODE DeviceNode)
#define MAX_SEPARATORS_INSTANCEID
struct _DEVICE_ACTION_REQUEST * PDEVICE_ACTION_REQUEST
static BOOLEAN IopValidateID(_In_ PWCHAR Id, _In_ BUS_QUERY_ID_TYPE QueryType)
static NTSTATUS IopQueryHardwareIds(PDEVICE_NODE DeviceNode, HANDLE InstanceKey)
static NTSTATUS NTAPI PiAttachFilterDriversCallback(PWSTR ValueName, ULONG ValueType, PVOID ValueData, ULONG ValueLength, PVOID Ctx, PVOID EntryContext)
Loads and/or returns the driver associated with the registry entry if the driver is enabled....
static VOID IopCancelRemoveChildDevices(PDEVICE_NODE ParentDeviceNode)
BOOLEAN IopDeviceActionInProgress
static NTSTATUS IopQueryRemoveChildDevices(PDEVICE_NODE ParentDeviceNode, BOOLEAN Force)
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.
static NTSTATUS PiUpdateDeviceState(_In_ PDEVICE_NODE DeviceNode)
Processes the IoInvalidateDeviceState request.
VOID NTAPI IoRequestDeviceEject(IN PDEVICE_OBJECT PhysicalDeviceObject)
static VOID NTAPI IopSendRemoveDevice(IN PDEVICE_OBJECT DeviceObject)
PDEVICE_NODE IopRootDeviceNode
NTSTATUS PiPerformSyncDeviceAction(_In_ PDEVICE_OBJECT DeviceObject, _In_ DEVICE_ACTION Action)
Perfom a device operation synchronously via PiQueueDeviceAction.
VOID NTAPI IopInstallCriticalDevice(PDEVICE_NODE DeviceNode)
enum _ADD_DEV_DRIVER_TYPE ADD_DEV_DRIVER_TYPE
BOOLEAN PnPBootDriversLoaded
struct _ATTACH_FILTER_DRIVERS_CONTEXT ATTACH_FILTER_DRIVERS_CONTEXT
static NTSTATUS PiCallDriverAddDevice(_In_ PDEVICE_NODE DeviceNode, _In_ BOOLEAN LoadDrivers)
Loads all drivers for a device node (actual service and filters) and calls their AddDevice routine.
#define NT_SUCCESS(StatCode)
static void cleanup(void)
static const WCHAR DeviceInstance[]
static const WCHAR Cleanup[]
#define InsertTailList(ListHead, Entry)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define IsListEmpty(ListHead)
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define KeInitializeEvent(pEvt, foo, foo2)
#define KeReleaseSpinLock(sl, irql)
NTSTATUS RtlAppendUnicodeToString(IN PUNICODE_STRING Str1, IN PWSTR Str2)
#define KeSetEvent(pEvt, foo, foo2)
#define KeAcquireSpinLock(sl, irql)
#define DO_DEVICE_INITIALIZING
#define RemoveHeadList(ListHead)
#define InitializeListHead(ListHead)
VOID NTAPI KeClearEvent(IN PKEVENT Event)
#define ExAllocatePool(type, size)
_Must_inspect_result_ _In_opt_ PVOID _In_opt_ PVOID InstanceId
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
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
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 GLint GLint j
#define RTL_DUPLICATE_UNICODE_STRING_ALLOCATE_NULL_STRING
VOID FASTCALL KeReleaseQueuedSpinLock(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber, IN KIRQL OldIrql)
KIRQL FASTCALL KeAcquireQueuedSpinLock(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber)
_Must_inspect_result_ typedef _Out_ PHIDP_CAPS Capabilities
_In_ GUID _In_ PVOID ValueData
struct _CM_RESOURCE_LIST * PCM_RESOURCE_LIST
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define OBJ_KERNEL_HANDLE
#define OBJ_CASE_INSENSITIVE
NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID)
NTSYSAPI NTSTATUS WINAPI RtlDuplicateUnicodeString(int, const UNICODE_STRING *, UNICODE_STRING *)
PCONFIGURATION_COMPONENT_DATA RootNode
#define ExFreePoolWithTag(_P, _T)
FORCEINLINE PVOID ExAllocatePoolZero(ULONG PoolType, SIZE_T NumberOfBytes, ULONG Tag)
static OUT PIO_STATUS_BLOCK IoStatusBlock
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Reserved_ ULONG _In_opt_ PUNICODE_STRING _In_ ULONG _Out_opt_ PULONG Disposition
NTSYSAPI NTSTATUS NTAPI ZwQueryDefaultLocale(_In_ BOOLEAN UserProfile, _Out_ PLCID DefaultLocaleId)
#define DNF_LEGACY_DRIVER
@ DeviceNodeRemovePendingCloses
@ DeviceNodeRestartCompletion
@ DeviceNodeAwaitingQueuedRemoval
@ DeviceNodeStartPostWork
@ DeviceNodeStartCompletion
@ DeviceNodeEnumerateCompletion
@ DeviceNodeAwaitingQueuedDeletion
@ DeviceNodeEnumeratePending
@ DeviceNodeResourcesAssigned
@ DeviceNodeUninitialized
@ DeviceNodeDeletePendingCloses
#define DNUF_NOT_DISABLEABLE
#define DNUF_DONT_SHOW_IN_UI
#define DNF_HAS_BOOT_CONFIG
#define DNF_NON_STOPPED_REBALANCE
#define DNF_RESOURCE_REQUIREMENTS_CHANGED
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
_In_ PCWSTR _Inout_ _At_ QueryTable EntryContext
_In_ PCWSTR _Inout_ _At_ QueryTable _Pre_unknown_ PRTL_QUERY_REGISTRY_TABLE QueryTable
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
@ KeyValueBasicInformation
NTSYSAPI NTSTATUS NTAPI RtlAppendUnicodeStringToString(PUNICODE_STRING Destination, PUNICODE_STRING Source)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define KEY_CREATE_SUB_KEY
#define REG_OPTION_NON_VOLATILE
#define RTL_QUERY_REGISTRY_REQUIRED
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
struct _RTL_QUERY_REGISTRY_TABLE RTL_QUERY_REGISTRY_TABLE
#define REG_OPENED_EXISTING_KEY
#define REG_OPTION_VOLATILE
#define RTL_REGISTRY_HANDLE
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define IRP_MN_SURPRISE_REMOVAL
#define VPB_REMOVE_PENDING
NTSTATUS PiIrpQueryResources(_In_ PDEVICE_NODE DeviceNode, _Out_ PCM_RESOURCE_LIST *Resources)
NTSTATUS NTAPI IopOpenRegistryKeyEx(PHANDLE KeyHandle, HANDLE ParentKey, PUNICODE_STRING Name, ACCESS_MASK DesiredAccess)
NTSTATUS PiIrpStartDevice(_In_ PDEVICE_NODE DeviceNode)
PDEVICE_NODE FASTCALL IopGetDeviceNode(IN PDEVICE_OBJECT DeviceObject)
NTSTATUS PiIrpQueryPnPDeviceState(_In_ PDEVICE_NODE DeviceNode, _Out_ PPNP_DEVICE_STATE DeviceState)
NTSTATUS PiIrpCancelStopDevice(_In_ PDEVICE_NODE DeviceNode)
@ PiActionEnumRootDevices
NTSTATUS IopLoadDriver(_In_ HANDLE ServiceHandle, _Out_ PDRIVER_OBJECT *DriverObject)
VOID PiInsertDevNode(_In_ PDEVICE_NODE DeviceNode, _In_ PDEVICE_NODE ParentNode)
NTSTATUS NTAPI IopAssignDeviceResources(IN PDEVICE_NODE DeviceNode)
PDEVICE_NODE PipAllocateDeviceNode(IN PDEVICE_OBJECT PhysicalDeviceObject)
KSPIN_LOCK IopDeviceTreeLock
NTSTATUS NTAPI IopCreateDeviceKeyPath(IN PCUNICODE_STRING RegistryPath, IN ULONG CreateOptions, OUT PHANDLE Handle)
VOID PiNotifyTargetDeviceChange(_In_ LPCGUID Event, _In_ PDEVICE_OBJECT DeviceObject, _In_opt_ PTARGET_DEVICE_CUSTOM_NOTIFICATION CustomNotification)
Delivers the event to all drivers subscribed to EventCategoryTargetDeviceChange PnP event.
#define IopDeviceNodeHasFlag(DeviceNode, Flag)
NTSTATUS IopQueueDeviceInstallEvent(_In_ const GUID *Guid, _In_ PUNICODE_STRING DeviceId)
NTSTATUS NTAPI IopGetRegistryValue(IN HANDLE Handle, IN PWSTR ValueName, OUT PKEY_VALUE_FULL_INFORMATION *Information)
#define IopDeviceNodeSetFlag(DeviceNode, Flag)
NTSTATUS IopSynchronousCall(IN PDEVICE_OBJECT DeviceObject, IN PIO_STACK_LOCATION IoStackLocation, OUT PVOID *Information)
NTSTATUS NTAPI IopInitiatePnpIrp(IN PDEVICE_OBJECT DeviceObject, IN PIO_STATUS_BLOCK IoStatusBlock, IN UCHAR MinorFunction, IN PIO_STACK_LOCATION Stack)
NTSTATUS IopGetDriverNames(_In_ HANDLE ServiceHandle, _Out_ PUNICODE_STRING DriverName, _Out_opt_ PUNICODE_STRING ServiceName)
NTSTATUS PiIrpQueryResourceRequirements(_In_ PDEVICE_NODE DeviceNode, _Out_ PIO_RESOURCE_REQUIREMENTS_LIST *Resources)
VOID PiSetDevNodeProblem(_In_ PDEVICE_NODE DeviceNode, _In_ UINT32 Problem)
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)
enum _DEVICE_ACTION DEVICE_ACTION
NTSTATUS PiIrpQueryStopDevice(_In_ PDEVICE_NODE DeviceNode)
NTSTATUS PiIrpStopDevice(_In_ PDEVICE_NODE DeviceNode)
NTSTATUS IopQueueTargetDeviceEvent(_In_ const GUID *Guid, _In_ PUNICODE_STRING DeviceIds)
NTSTATUS PiIrpQueryDeviceText(_In_ PDEVICE_NODE DeviceNode, _In_ LCID LocaleId, _In_ DEVICE_TEXT_TYPE Type, _Out_ PWSTR *DeviceText)
NTSTATUS PiIrpQueryDeviceRelations(_In_ PDEVICE_NODE DeviceNode, _In_ DEVICE_RELATION_TYPE Type)
PDEVICE_OBJECT NTAPI IoGetAttachedDevice(PDEVICE_OBJECT DeviceObject)
PDEVICE_OBJECT NTAPI IoGetAttachedDeviceReference(PDEVICE_OBJECT DeviceObject)
POBJECT_TYPE IoDriverObjectType
VOID NTAPI IoReleaseVpbSpinLock(IN KIRQL Irql)
VOID NTAPI IoAcquireVpbSpinLock(OUT PKIRQL Irql)
#define STATUS_FAILED_DRIVER_ENTRY
#define STATUS_ILL_FORMED_SERVICE_ENTRY
#define STATUS_PNP_REBOOT_REQUIRED
#define STATUS_NOT_SUPPORTED
#define STATUS_PLUGPLAY_NO_DEVICE
#define STATUS_NOT_IMPLEMENTED
#define STATUS_OBJECT_TYPE_MISMATCH
_Must_inspect_result_ _In_ KTMOBJECT_TYPE QueryType
NTSTATUS NTAPI ObReferenceObjectByName(IN PUNICODE_STRING ObjectPath, IN ULONG Attributes, IN PACCESS_STATE PassedAccessState, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, IN OUT PVOID ParseContext, OUT PVOID *ObjectPtr)
PDEVICE_NODE PopSystemPowerDeviceNode
#define REGSTR_KEY_DEVICE_PROPERTIES
#define REGSTR_VAL_CLASSGUID
VOID NTAPI KeBugCheckEx(_In_ ULONG BugCheckCode, _In_ ULONG_PTR BugCheckParameter1, _In_ ULONG_PTR BugCheckParameter2, _In_ ULONG_PTR BugCheckParameter3, _In_ ULONG_PTR BugCheckParameter4)
PDRIVER_OBJECT DriverObject
ADD_DEV_DRIVER_TYPE DriverType
ADD_DEV_DRIVER_TYPE DriverType
PLIST_ENTRY DriversListHead
LIST_ENTRY RequestListEntry
PDEVICE_OBJECT DeviceObject
NTSTATUS * CompletionStatus
NTSTATUS CompletionStatus
struct _DEVICE_NODE * Sibling
struct _DEVICE_NODE * Child
struct _DEVICE_NODE * Parent
PDEVICE_OBJECT PhysicalDeviceObject
UNICODE_STRING InstancePath
PDEVICE_OBJECT Objects[1]
PDRIVER_ADD_DEVICE AddDevice
PDRIVER_EXTENSION DriverExtension
struct _LIST_ENTRY * Flink
PRTL_QUERY_REGISTRY_ROUTINE QueryRoutine
#define TAG_PNP_DEVACTION
static VOID ErrorExit(LPTSTR lpszMessage)
#define RTL_CONSTANT_STRING(s)
#define RtlZeroMemory(Destination, Length)
#define RtlMoveMemory(Destination, Source, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_UNSUCCESSFUL
#define STATUS_INSUFFICIENT_RESOURCES
#define STATUS_OBJECT_NAME_NOT_FOUND
_In_ PDEVICE_OBJECT DeviceObject
_In_ WDFDEVICE _In_ PPNP_BUS_INFORMATION BusInformation
_In_ UCHAR _In_ UCHAR MinorFunction
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
_In_ WDFIOTARGET _In_ _Strict_type_match_ WDF_IO_TARGET_SENT_IO_ACTION Action
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG _Out_opt_ PULONG _Out_opt_ PULONG ValueType
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG ValueLength
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
#define DeviceCapabilities
VOID NTAPI ExQueueWorkItem(IN PWORK_QUEUE_ITEM WorkItem, IN WORK_QUEUE_TYPE QueueType)
struct _PNP_BUS_INFORMATION * PPNP_BUS_INFORMATION
enum _CM_SERVICE_LOAD_TYPE SERVICE_LOAD_TYPE
#define ExInitializeWorkItem(Item, Routine, Context)
#define PNP_DEVICE_NOT_DISABLEABLE
enum _BUS_QUERY_ID_TYPE BUS_QUERY_ID_TYPE
#define PNP_DEVICE_RESOURCE_REQUIREMENTS_CHANGED
#define DO_BUS_ENUMERATED_DEVICE
#define PNP_DEVICE_FAILED
#define PNP_DEVICE_DONT_DISPLAY_IN_UI
#define IRP_MN_QUERY_RESOURCE_REQUIREMENTS
#define IRP_MN_REMOVE_DEVICE
#define PNP_DEVICE_DISABLED
struct _DEVICE_RELATIONS * PDEVICE_RELATIONS
#define IRP_MN_QUERY_DEVICE_RELATIONS
#define IRP_MN_QUERY_CAPABILITIES
#define IRP_MN_QUERY_RESOURCES
#define IRP_MN_CANCEL_REMOVE_DEVICE
@ DeviceTextLocationInformation
#define PNP_DEVICE_REMOVED
struct _IO_RESOURCE_REQUIREMENTS_LIST * PIO_RESOURCE_REQUIREMENTS_LIST
#define IRP_MN_QUERY_BUS_INFORMATION
#define IRP_MN_QUERY_REMOVE_DEVICE
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
@ NonPagedPoolMustSucceed
@ LockQueueIoDatabaseLock
#define ObDereferenceObject
#define ObReferenceObject