49 HANDLE CriticalDeviceKey, InstanceKey;
58 PWCHAR IdBuffer, OriginalIdBuffer;
65 Status = ZwQueryValueKey(InstanceKey,
77 Status = ZwQueryValueKey(InstanceKey,
100 if (HidLength > CidLength)
113 Status = ZwQueryValueKey(InstanceKey,
128 HidLength = PartialInfo->
DataLength - ((CidLength != 0) ?
sizeof(
WCHAR) : 0);
133 Status = ZwQueryValueKey(InstanceKey,
160 Status = ZwOpenKey(&CriticalDeviceKey,
184 Status = ZwEnumerateKey(CriticalDeviceKey,
206 Status = ZwEnumerateKey(CriticalDeviceKey,
219 ChildIdNameU.
Buffer = IdBuffer;
234 Status = ZwOpenKey(&ChildKeyHandle,
244 Status = ZwQueryValueKey(InstanceKey,
256 Status = ZwQueryValueKey(ChildKeyHandle,
280 Status = ZwQueryValueKey(ChildKeyHandle,
293 Status = ZwSetValueKey(InstanceKey,
307 Status = ZwQueryValueKey(ChildKeyHandle,
328 Status = ZwQueryValueKey(ChildKeyHandle,
343 Status = ZwSetValueKey(InstanceKey,
357 DPRINT(
"Installed service '%S' for critical device '%wZ'\n", PartialInfo->
Data, &ChildIdNameU);
361 DPRINT1(
"Installed NULL service for critical device '%wZ'\n", &ChildIdNameU);
385 IdBuffer += StringLength;
414 USHORT i = 0, FoundIndex = 0xFFFF;
422 while (i < PnpBusTypeGuidList->GuidCount)
496 sizeof(
Stack->Parameters));
542 DPRINT1(
"ZwOpenKey('%wZ') failed with status 0x%08lx\n", &EnumU,
Status);
550 while (Current <= Last)
552 if (Current != Last && *Current !=
L'\\')
612 HANDLE LogConfKey, ControlKey, DeviceParamsKey;
617 DPRINT(
"IopSetDeviceInstanceData() called\n");
626 Status = ZwCreateKey(&LogConfKey,
644 Status = ZwSetValueKey(LogConfKey,
655 DeviceNode->ResourceRequirements->ListSize != 0)
658 Status = ZwSetValueKey(LogConfKey,
671 Status = ZwQueryValueKey(InstanceKey,
680 ULONG DefaultConfigFlags = 0;
681 Status = ZwSetValueKey(InstanceKey,
686 sizeof(DefaultConfigFlags));
696 Status = ZwCreateKey(&ControlKey,
715 Status = ZwCreateKey(&DeviceParamsKey,
724 ULONG FirmwareIdentified = 1;
726 Status = ZwSetValueKey(DeviceParamsKey,
731 sizeof(FirmwareIdentified));
737 DPRINT(
"IopSetDeviceInstanceData() done\n");
765 ULONG KeyNameBufferLength;
777 if (
DeviceNode->Parent->InstancePath.Length == 0)
779 DPRINT1(
"Parent of %wZ has NULL Instance path, please report!\n",
789 if (!ParentIdPrefixInformation)
819 ParentIdPrefixInformation,
821 &KeyNameBufferLength);
824 if (ParentIdPrefixInformation->
Type !=
REG_SZ)
893 IN ULONG ParentBootResourcesLength)
903 HANDLE hLevel1Key, hLevel2Key =
NULL, hLogConf;
906 ULONG IndexDevice = 0;
915 ULONG BootResourcesLength;
920 static ULONG DeviceIndexSerial = 0;
923 static ULONG DeviceIndexKeyboard = 0;
929 #if defined(SARCH_PC98) 934 static ULONG DeviceIndexMouse = 0;
937 static ULONG DeviceIndexParallel = 0;
940 static ULONG DeviceIndexFloppy = 0;
943 ULONG DeviceIndex = 0;
952 DPRINT(
"ZwOpenKey() failed with status 0x%08lx\n",
Status);
957 hDevicesKey = hBaseKey;
960 if (!pDeviceInformation)
962 DPRINT(
"ExAllocatePool() failed\n");
968 if (!pValueInformation)
970 DPRINT(
"ExAllocatePool() failed\n");
985 if (!pDeviceInformation)
987 DPRINT(
"ExAllocatePool() failed\n");
995 DPRINT(
"ZwEnumerateKey() failed with status 0x%08lx\n",
Status);
1008 DPRINT(
"ZwOpenKey() failed with status 0x%08lx\n",
Status);
1019 if (!pValueInformation)
1021 DPRINT(
"ExAllocatePool() failed\n");
1022 ZwDeleteKey(hLevel2Key);
1030 BootResources = ParentBootResources;
1031 BootResourcesLength = ParentBootResourcesLength;
1035 DPRINT(
"ZwQueryValueKey() failed with status 0x%08lx\n",
Status);
1048 if (ParentBootResourcesLength == 0)
1049 BootResourcesLength = pValueInformation->
DataLength;
1051 BootResourcesLength = ParentBootResourcesLength
1057 DPRINT(
"ExAllocatePool() failed\n");
1064 else if (ParentBootResources->PartialResourceList.PartialDescriptors[ParentBootResources->PartialResourceList.Count - 1].Type ==
CmResourceTypeDeviceSpecific)
1070 ParentBootResourcesLength -
Header);
1079 ParentBootResourcesLength -
Header);
1088 if (EnumerateSubKeys)
1101 if (!pDeviceInformation)
1103 DPRINT(
"ExAllocatePool() failed\n");
1111 DPRINT(
"ZwEnumerateKey() failed with status 0x%08lx\n",
Status);
1124 BootResourcesLength);
1137 if (!pValueInformation)
1139 DPRINT(
"ExAllocatePool() failed\n");
1149 DPRINT(
"ZwQueryValueKey() failed with status 0x%08lx\n",
Status);
1156 DPRINT(
"Wrong registry type: got 0x%lx, expected 0x%lx\n", pValueInformation->
Type,
REG_SZ);
1170 pHardwareId = &HardwareIdSerial;
1171 DeviceIndex = DeviceIndexSerial++;
1175 pHardwareId = &HardwareIdKeyboard;
1176 DeviceIndex = DeviceIndexKeyboard++;
1180 pHardwareId = &HardwareIdMouse;
1181 DeviceIndex = DeviceIndexMouse++;
1185 pHardwareId = &HardwareIdParallel;
1186 DeviceIndex = DeviceIndexParallel++;
1190 pHardwareId = &HardwareIdFloppy;
1191 DeviceIndex = DeviceIndexFloppy++;
1196 DPRINT(
"Unknown key path '%wZ'\n", RelativePath);
1201 HardwareIdKey = *pHardwareId;
1216 DPRINT(
"ZwCreateKey() failed with status 0x%08lx\n",
Status);
1219 swprintf(Level2Name,
L"%04lu", DeviceIndex);
1233 DPRINT(
"ZwCreateKey() failed with status 0x%08lx\n",
Status);
1236 DPRINT(
"Found %wZ #%lu (%wZ)\n", &
ValueName, DeviceIndex, &HardwareIdKey);
1240 DPRINT(
"ZwSetValueKey() failed with status 0x%08lx\n",
Status);
1241 ZwDeleteKey(hLevel2Key);
1256 DPRINT(
"ZwCreateKey() failed with status 0x%08lx\n",
Status);
1257 ZwDeleteKey(hLevel2Key);
1263 if (!CmResourceList)
1266 ZwDeleteKey(hLevel2Key);
1279 BootResourcesLength);
1285 DPRINT(
"ZwSetValueKey() failed with status 0x%08lx\n",
Status);
1287 ZwDeleteKey(hLevel2Key);
1294 if (BootResources && BootResources != ParentBootResources)
1297 BootResources =
NULL;
1314 if (hDevicesKey && hDevicesKey != hBaseKey)
1318 if (pDeviceInformation)
1320 if (pValueInformation)
1343 Status = ZwQueryValueKey(hPnpKey,
1356 Status = ZwQueryValueKey(hPnpKey,
1364 KeyValue = (
ULONG)(*KeyInformation->
Data);
1368 DPRINT1(
"ZwQueryValueKey(%wZ%wZ) failed\n", &KeyPathU, &KeyNameU);
1375 DPRINT1(
"Failed to allocate memory for registry query\n");
1380 DPRINT1(
"ZwQueryValueKey(%wZ%wZ) failed with status 0x%08lx\n", &KeyPathU, &KeyNameU,
Status);
1387 DPRINT1(
"ZwOpenKey(%wZ) failed with status 0x%08lx\n", &KeyPathU,
Status);
1390 DPRINT(
"Firmware mapper is %s\n", KeyValue != 0 ?
"disabled" :
"enabled");
1411 DPRINT1(
"ZwCreateKey() failed with status 0x%08lx\n",
Status);
1420 DPRINT1(
"ZwOpenKey() failed with status 0x%08lx\n",
Status);
1430 DPRINT(
"ZwOpenKey() failed with status 0x%08lx\n",
Status);
1489 ULONG KeyDisposition, RootHandleIndex = 0,
i = 1, NestedCloseLevel = 0;
1508 Status = ZwCreateKey(&HandleArray[
i],
1520 HandleArray[0] =
NULL;
1521 HandleArray[1] = RootHandle;
1527 if (NestedCloseLevel > 1)
ZwClose(HandleArray[RootHandleIndex]);
1530 RootHandleIndex =
i;
1534 HandleArray[
i] =
NULL;
1551 HandleArray[RootHandleIndex],
1553 Status = ZwCreateKey(&HandleArray[
i],
1582 if ((
p == pp) || (p1 == pp))
1590 if (NestedCloseLevel > 1)
ZwClose(HandleArray[RootHandleIndex]);
1850 FinalSize += PartialSize;
1853 FullDescriptor = (
PVOID)((
ULONG_PTR)FullDescriptor + PartialSize);
1944 #define PIP_RETURN_DATA(x, y) {ReturnLength = x; Data = y; Status = STATUS_SUCCESS; break;} 1945 #define PIP_REGISTRY_DATA(x, y) {ValueName = x; ValueType = y; break;} 1946 #define PIP_UNIMPLEMENTED() {UNIMPLEMENTED_DBGBREAK(); break;} 2002 if ((
DeviceNode->ChildBusNumber & 0x80000000) == 0x80000000)
2011 DeviceInstanceName =
DeviceNode->InstancePath.Buffer;
2019 ASSERT(EnumeratorNameEnd);
2022 NullTerminate =
TRUE;
2026 DeviceInstanceName);
2075 NullTerminate =
TRUE;
2079 ObjectNameInfo->Name.Buffer);
2171 if (ObjectNameInfo)
ExFreePool(ObjectNameInfo);
2197 static WCHAR RootKeyName[] =
2198 L"\\Registry\\Machine\\System\\CurrentControlSet\\";
2199 static WCHAR ProfileKeyName[] =
2200 L"Hardware Profiles\\Current\\System\\CurrentControlSet\\";
2201 static WCHAR ClassKeyName[] =
L"Control\\Class\\";
2202 static WCHAR EnumKeyName[] =
L"Enum\\";
2203 static WCHAR DeviceParametersKeyName[] =
L"Device Parameters";
2205 PWSTR KeyNameBuffer;
2207 ULONG DriverKeyLength;
2212 DPRINT(
"IoOpenDeviceRegistryKey() called\n");
2216 DPRINT1(
"IoOpenDeviceRegistryKey(): got wrong params, exiting... \n");
2237 0,
NULL, &DriverKeyLength);
2253 if (KeyNameBuffer ==
NULL)
2258 KeyName.Buffer = KeyNameBuffer;
2274 DriverKeyLength, KeyNameBuffer +
2279 DPRINT1(
"Call to IoGetDeviceProperty() failed with Status 0x%08lx\n",
Status);
2302 DPRINT1(
"IoOpenDeviceRegistryKey(%wZ): Base key doesn't exist, exiting... (Status 0x%08lx)\n", &
KeyName,
Status);
BOOLEAN PnPBootDriversLoaded
NTSTATUS NTAPI IoSynchronousInvalidateDeviceRelations(IN PDEVICE_OBJECT DeviceObject, IN DEVICE_RELATION_TYPE Type)
KGUARDED_MUTEX PpDeviceReferenceTableLock
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
IN CINT OUT PVOID IN ULONG OUT PULONG ReturnLength
#define CmResourceTypeDeviceSpecific
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
return STATUS_NOT_SUPPORTED
RTL_AVL_COMPARE_ROUTINE * PRTL_AVL_COMPARE_ROUTINE
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
#define REGSTR_VAL_DRIVER
PDEVICE_OBJECT PhysicalDeviceObject
_In_ ULONG _In_ PHYSICAL_ADDRESS BusAddress
VOID NTAPI PiFreeGenericTableEntry(IN PRTL_AVL_TABLE Table, IN PVOID Buffer)
#define STATUS_INSUFFICIENT_RESOURCES
_In_ ULONG _In_ ULONG _In_ ULONG Length
enum _INTERFACE_TYPE INTERFACE_TYPE
#define STATUS_INFO_LENGTH_MISMATCH
#define STATUS_NO_MORE_ENTRIES
PIO_BUS_TYPE_GUID_LIST PnpBusTypeGuidList
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.
#define OBJ_CASE_INSENSITIVE
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING _Out_ PNDIS_HANDLE KeyHandle
#define PLUGPLAY_REGKEY_DEVICE
#define STATUS_INVALID_PARAMETER
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
NTSTATUS NTAPI IopOpenRegistryKeyEx(PHANDLE KeyHandle, HANDLE ParentKey, PUNICODE_STRING Name, ACCESS_MASK DesiredAccess)
_In_ ULONG DevInstKeyType
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG AddressSpace
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY DeviceProperty
NTSTATUS NTAPI IopCreateDeviceKeyPath(IN PCUNICODE_STRING RegistryPath, IN ULONG CreateOptions, OUT PHANDLE Handle)
VOID NTAPI IopInstallCriticalDevice(PDEVICE_NODE DeviceNode)
NTSTATUS NTAPI PnpBusTypeGuidGet(IN USHORT Index, IN LPGUID BusTypeGuid)
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
struct _KEY_BASIC_INFORMATION KEY_BASIC_INFORMATION
_Check_return_ _CRTIMP int __cdecl _wcsnicmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
NTSTATUS ExInitializeResourceLite(PULONG res)
#define STATUS_INVALID_DEVICE_REQUEST
IN PVOID IN PVOID IN USHORT IN USHORT Size
NTSTATUS NTAPI ObQueryNameString(IN PVOID Object, OUT POBJECT_NAME_INFORMATION ObjectNameInfo, IN ULONG Length, OUT PULONG ReturnLength)
#define REGSTR_VAL_CONFIGFLAGS
PVOID NTAPI PiAllocateGenericTableEntry(IN PRTL_AVL_TABLE Table, IN CLONG ByteSize)
#define REGSTR_VAL_UI_NUMBER
#define REGSTR_VAL_FRIENDLYNAME
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG _Out_ PPHYSICAL_ADDRESS TranslatedAddress
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG _Out_opt_ PULONG _Out_opt_ PULONG ValueType
NTSTATUS NTAPI IopGetRegistryValue(IN HANDLE Handle, IN PWSTR ValueName, OUT PKEY_VALUE_FULL_INFORMATION *Information)
#define OBJ_KERNEL_HANDLE
_In_ WDFREQUEST _In_ NTSTATUS _In_ ULONG_PTR Information
_Must_inspect_result_ _In_ WDFIORESREQLIST _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFIORESLIST * ResourceList
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR CM_PARTIAL_RESOURCE_DESCRIPTOR
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
#define REG_RESOURCE_REQUIREMENTS_LIST
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Reserved_ ULONG _In_opt_ PUNICODE_STRING _In_ ULONG _Out_opt_ PULONG Disposition
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
#define STATUS_BUFFER_TOO_SMALL
NTSTATUS IopGetSystemPowerDeviceObject(PDEVICE_OBJECT *DeviceObject)
NTSTATUS NTAPI PiGetDeviceRegistryProperty(IN PDEVICE_OBJECT DeviceObject, IN ULONG ValueType, IN PWSTR ValueName, IN PWSTR KeyName, OUT PVOID Buffer, IN PULONG BufferLength)
#define REGSTR_VAL_COMPATIBLEIDS
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
CM_PARTIAL_RESOURCE_LIST PartialResourceList
_In_ PDEVICE_OBJECT DeviceObject
return STATUS_NOT_IMPLEMENTED
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
DECLSPEC_NORETURN VOID NTAPI KeBugCheck(ULONG BugCheckCode)
union _CM_PARTIAL_RESOURCE_DESCRIPTOR::@375 u
#define OBJ_NAME_PATH_SEPARATOR
BOOLEAN NTAPI PiInitPhase0(VOID)
_In_ UCHAR _In_ UCHAR MinorFunction
struct _OBJECT_NAME_INFORMATION OBJECT_NAME_INFORMATION
ERESOURCE PpRegistryDeviceResource
RTL_AVL_TABLE PpDeviceReferenceTable
#define STATUS_INVALID_PARAMETER_2
NTSTATUS NTAPI IoGetDeviceProperty(IN PDEVICE_OBJECT DeviceObject, IN DEVICE_REGISTRY_PROPERTY DeviceProperty, IN ULONG BufferLength, OUT PVOID PropertyBuffer, OUT PULONG ResultLength)
#define REG_RESOURCE_LIST
#define PIP_UNIMPLEMENTED()
#define REG_FULL_RESOURCE_DESCRIPTOR
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
USHORT NTAPI IopGetBusTypeGuidIndex(LPGUID BusTypeGuid)
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG BusNumber
enum _DEVICE_RELATION_TYPE DEVICE_RELATION_TYPE
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 REG_OPTION_NON_VOLATILE
NTSTATUS RtlAppendUnicodeToString(IN PUNICODE_STRING Str1, IN PWSTR Str2)
#define RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE
NTSTATUS IopSetDeviceInstanceData(HANDLE InstanceKey, PDEVICE_NODE DeviceNode)
NTSTATUS NTAPI PnpDeviceObjectToDeviceInstance(IN PDEVICE_OBJECT DeviceObject, IN PHANDLE DeviceInstanceHandle, IN ACCESS_MASK DesiredAccess)
_CONST_RETURN wchar_t *__cdecl wcschr(_In_z_ const wchar_t *_Str, wchar_t _Ch)
NTSTATUS IopSynchronousCall(IN PDEVICE_OBJECT DeviceObject, IN PIO_STACK_LOCATION IoStackLocation, OUT PVOID *Information)
_IRQL_requires_same_ _In_ PVOID _In_ PVOID SecondStruct
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@375::@384 DeviceSpecificData
#define NT_SUCCESS(StatCode)
NTSYSAPI NTSTATUS WINAPI RtlDuplicateUnicodeString(int, const UNICODE_STRING *, UNICODE_STRING *)
NTSTRSAFEVAPI RtlStringCbPrintfW(_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cbDest, _In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat,...)
_In_ WDFCOLLECTION _In_ ULONG Index
NTSTATUS IopGetParentIdPrefix(PDEVICE_NODE DeviceNode, PUNICODE_STRING ParentIdPrefix)
#define KeAcquireSpinLock(sl, irql)
struct _IO_BUS_TYPE_GUID_LIST IO_BUS_TYPE_GUID_LIST
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define REGSTR_VAL_CLASSGUID
PDEVICE_NODE PopSystemPowerDeviceNode
#define STATUS_UNSUCCESSFUL
#define ExAllocatePoolWithTag(hernya, size, tag)
BOOLEAN NTAPI PpInitSystem(VOID)
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1]
ULONG RtlCompareUnicodeString(PUNICODE_STRING s1, PUNICODE_STRING s2, BOOLEAN UpCase)
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
BOOLEAN NTAPI IoTranslateBusAddress(IN INTERFACE_TYPE InterfaceType, IN ULONG BusNumber, IN PHYSICAL_ADDRESS BusAddress, IN OUT PULONG AddressSpace, OUT PPHYSICAL_ADDRESS TranslatedAddress)
#define ExAllocatePool(type, size)
_Must_inspect_result_ _In_ WDFCMRESLIST List
VOID NTAPI PpInitializeDeviceReferenceTable(VOID)
#define PLUGPLAY_REGKEY_DRIVER
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ ULONG _Out_ PVOID PropertyBuffer
_IRQL_requires_same_ _In_ PVOID FirstStruct
VOID NTAPI RtlInitializeGenericTableAvl(IN OUT PRTL_AVL_TABLE Table, IN PRTL_AVL_COMPARE_ROUTINE CompareRoutine, IN PRTL_AVL_ALLOCATE_ROUTINE AllocateRoutine, IN PRTL_AVL_FREE_ROUTINE FreeRoutine, IN PVOID TableContext)
_Must_inspect_result_ _In_ USHORT NewSize
VOID IopFixupDeviceId(PWCHAR String)
static BOOLEAN IopIsFirmwareMapperDisabled(VOID)
#define PIP_REGISTRY_DATA(x, y)
ULONG NTAPI PnpDetermineResourceListSize(IN PCM_RESOURCE_LIST ResourceList)
NTSTATUS NTAPI IopInitiatePnpIrp(IN PDEVICE_OBJECT DeviceObject, IN OUT PIO_STATUS_BLOCK IoStatusBlock, IN UCHAR MinorFunction, IN PIO_STACK_LOCATION Stack OPTIONAL)
RTL_AVL_FREE_ROUTINE * PRTL_AVL_FREE_ROUTINE
_In_ ULONG _In_ ULONG KeyNameLength
NTSTATUS NTAPI IopCreateRegistryKeyEx(OUT PHANDLE Handle, IN HANDLE RootHandle OPTIONAL, IN PUNICODE_STRING KeyName, IN ACCESS_MASK DesiredAccess, IN ULONG CreateOptions, OUT PULONG Disposition OPTIONAL)
#define REGSTR_VAL_HARDWAREID
_In_ ULONG _In_ ACCESS_MASK _Out_ PHANDLE DevInstRegKey
#define IopIsValidPhysicalDeviceObject(PhysicalDeviceObject)
#define REGSTR_VAL_DEVDESC
NTSTATUS NTAPI IopUpdateRootKey(VOID)
_Must_inspect_result_ _In_opt_ WDFKEY _In_ PCUNICODE_STRING _In_ ACCESS_MASK _In_ ULONG CreateOptions
NTSTATUS PiPerformSyncDeviceAction(_In_ PDEVICE_OBJECT DeviceObject, _In_ DEVICE_ACTION Action)
Perfom a device operation synchronously via PiQueueDeviceAction.
BOOLEAN NTAPI HalTranslateBusAddress(IN INTERFACE_TYPE InterfaceType, IN ULONG BusNumber, IN PHYSICAL_ADDRESS BusAddress, IN OUT PULONG AddressSpace, OUT PPHYSICAL_ADDRESS TranslatedAddress)
KSPIN_LOCK IopDeviceTreeLock
VOID NTAPI IoInvalidateDeviceRelations(IN PDEVICE_OBJECT DeviceObject, IN DEVICE_RELATION_TYPE Type)
VOID FASTCALL KeInitializeGuardedMutex(OUT PKGUARDED_MUTEX GuardedMutex)
_Must_inspect_result_ _In_opt_ WDFKEY ParentKey
#define STATUS_OBJECT_NAME_NOT_FOUND
#define STATUS_BUFFER_OVERFLOW
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
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
struct _KEY_VALUE_PARTIAL_INFORMATION KEY_VALUE_PARTIAL_INFORMATION
NTSYSAPI NTSTATUS NTAPI RtlAppendUnicodeStringToString(PUNICODE_STRING Destination, PUNICODE_STRING Source)
#define FIELD_OFFSET(t, f)
NTSTATUS NTAPI IopQueryDeviceCapabilities(PDEVICE_NODE DeviceNode, PDEVICE_CAPABILITIES DeviceCaps)
enum _DEVICE_REMOVAL_POLICY DEVICE_REMOVAL_POLICY
static OUT PIO_STATUS_BLOCK IoStatusBlock
enum _RTL_GENERIC_COMPARE_RESULTS RTL_GENERIC_COMPARE_RESULTS
#define KeReleaseSpinLock(sl, irql)
NTSTATUS NTAPI IoOpenDeviceRegistryKey(IN PDEVICE_OBJECT DeviceObject, IN ULONG DevInstKeyType, IN ACCESS_MASK DesiredAccess, OUT PHANDLE DevInstRegKey)
#define PIP_RETURN_DATA(x, y)
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
#define crc32(crc, buf, len)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define RtlZeroMemory(Destination, Length)
#define InitializeObjectAttributes(p, n, a, r, s)
char * cleanup(char *str)
#define RtlCopyMemory(Destination, Source, Length)
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
RTL_AVL_ALLOCATE_ROUTINE * PRTL_AVL_ALLOCATE_ROUTINE
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ ULONG _Out_ PVOID _Out_ PULONG RequiredSize
static NTSTATUS IopEnumerateDetectedDevices(IN HANDLE hBaseKey, IN PUNICODE_STRING RelativePath OPTIONAL, IN HANDLE hRootKey, IN BOOLEAN EnumerateSubKeys, IN PCM_FULL_RESOURCE_DESCRIPTOR ParentBootResources, IN ULONG ParentBootResourcesLength)
#define ExFreePoolWithTag(_P, _T)
#define REG_OPTION_VOLATILE
#define REGSTR_VAL_BOOTCONFIG
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
ULONG ExpInitializationPhase
_In_ WDFINTERRUPT _In_ WDF_INTERRUPT_POLICY Policy
PDRIVER_OBJECT IopRootDriverObject
_IRQL_requires_same_ _In_ CLONG ByteSize
#define KEY_CREATE_SUB_KEY
RTL_GENERIC_COMPARE_RESULTS NTAPI PiCompareInstancePath(IN PRTL_AVL_TABLE Table, IN PVOID FirstStruct, IN PVOID SecondStruct)
NTSYSAPI BOOLEAN NTAPI RtlEqualUnicodeString(PUNICODE_STRING String1, PUNICODE_STRING String2, BOOLEAN CaseInSensitive)
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID InterfaceType
VOID NTAPI KeBugCheckEx(_In_ ULONG BugCheckCode, _In_ ULONG_PTR BugCheckParameter1, _In_ ULONG_PTR BugCheckParameter2, _In_ ULONG_PTR BugCheckParameter3, _In_ ULONG_PTR BugCheckParameter4)
#define PLUGPLAY_REGKEY_CURRENT_HWPROFILE
#define REGSTR_VAL_LOCATION_INFORMATION
#define RtlCompareMemory(s1, s2, l)
PDEVICE_NODE FASTCALL IopGetDeviceNode(IN PDEVICE_OBJECT DeviceObject)
#define KEY_ENUMERATE_SUB_KEYS
#define RTL_CONSTANT_STRING(s)
PULONG MinorVersion OPTIONAL