48 HANDLE CriticalDeviceKey, InstanceKey;
57 PWCHAR IdBuffer, OriginalIdBuffer;
64 Status = ZwQueryValueKey(InstanceKey,
76 Status = ZwQueryValueKey(InstanceKey,
99 if (HidLength > CidLength)
112 Status = ZwQueryValueKey(InstanceKey,
127 HidLength = PartialInfo->
DataLength - ((CidLength != 0) ?
sizeof(
WCHAR) : 0);
132 Status = ZwQueryValueKey(InstanceKey,
159 Status = ZwOpenKey(&CriticalDeviceKey,
183 Status = ZwEnumerateKey(CriticalDeviceKey,
205 Status = ZwEnumerateKey(CriticalDeviceKey,
218 ChildIdNameU.
Buffer = IdBuffer;
233 Status = ZwOpenKey(&ChildKeyHandle,
243 Status = ZwQueryValueKey(InstanceKey,
255 Status = ZwQueryValueKey(ChildKeyHandle,
279 Status = ZwQueryValueKey(ChildKeyHandle,
292 Status = ZwSetValueKey(InstanceKey,
306 Status = ZwQueryValueKey(ChildKeyHandle,
327 Status = ZwQueryValueKey(ChildKeyHandle,
342 Status = ZwSetValueKey(InstanceKey,
356 DPRINT(
"Installed service '%S' for critical device '%wZ'\n", PartialInfo->
Data, &ChildIdNameU);
360 DPRINT1(
"Installed NULL service for critical device '%wZ'\n", &ChildIdNameU);
384 IdBuffer += StringLength;
413 USHORT i = 0, FoundIndex = 0xFFFF;
421 while (i < PnpBusTypeGuidList->GuidCount)
495 sizeof(
Stack->Parameters));
541 DPRINT1(
"ZwOpenKey('%wZ') failed with status 0x%08lx\n", &EnumU,
Status);
549 while (Current <= Last)
551 if (Current != Last && *Current !=
L'\\')
611 HANDLE LogConfKey, ControlKey, DeviceParamsKey;
616 DPRINT(
"IopSetDeviceInstanceData() called\n");
625 Status = ZwCreateKey(&LogConfKey,
643 Status = ZwSetValueKey(LogConfKey,
654 DeviceNode->ResourceRequirements->ListSize != 0)
657 Status = ZwSetValueKey(LogConfKey,
670 Status = ZwQueryValueKey(InstanceKey,
679 ULONG DefaultConfigFlags = 0;
680 Status = ZwSetValueKey(InstanceKey,
685 sizeof(DefaultConfigFlags));
695 Status = ZwCreateKey(&ControlKey,
714 Status = ZwCreateKey(&DeviceParamsKey,
723 ULONG FirmwareIdentified = 1;
725 Status = ZwSetValueKey(DeviceParamsKey,
730 sizeof(FirmwareIdentified));
736 DPRINT(
"IopSetDeviceInstanceData() done\n");
764 ULONG KeyNameBufferLength;
776 if (
DeviceNode->Parent->InstancePath.Length == 0)
778 DPRINT1(
"Parent of %wZ has NULL Instance path, please report!\n",
788 if (!ParentIdPrefixInformation)
818 ParentIdPrefixInformation,
820 &KeyNameBufferLength);
823 if (ParentIdPrefixInformation->
Type !=
REG_SZ)
892 IN ULONG ParentBootResourcesLength)
902 HANDLE hLevel1Key, hLevel2Key =
NULL, hLogConf;
905 ULONG IndexDevice = 0;
914 ULONG BootResourcesLength;
919 static ULONG DeviceIndexSerial = 0;
922 static ULONG DeviceIndexKeyboard = 0;
928 #if defined(SARCH_PC98) 933 static ULONG DeviceIndexMouse = 0;
936 static ULONG DeviceIndexParallel = 0;
939 static ULONG DeviceIndexFloppy = 0;
942 ULONG DeviceIndex = 0;
951 DPRINT(
"ZwOpenKey() failed with status 0x%08lx\n",
Status);
956 hDevicesKey = hBaseKey;
959 if (!pDeviceInformation)
961 DPRINT(
"ExAllocatePool() failed\n");
967 if (!pValueInformation)
969 DPRINT(
"ExAllocatePool() failed\n");
984 if (!pDeviceInformation)
986 DPRINT(
"ExAllocatePool() failed\n");
994 DPRINT(
"ZwEnumerateKey() failed with status 0x%08lx\n",
Status);
1007 DPRINT(
"ZwOpenKey() failed with status 0x%08lx\n",
Status);
1018 if (!pValueInformation)
1020 DPRINT(
"ExAllocatePool() failed\n");
1021 ZwDeleteKey(hLevel2Key);
1029 BootResources = ParentBootResources;
1030 BootResourcesLength = ParentBootResourcesLength;
1034 DPRINT(
"ZwQueryValueKey() failed with status 0x%08lx\n",
Status);
1047 if (ParentBootResourcesLength == 0)
1048 BootResourcesLength = pValueInformation->
DataLength;
1050 BootResourcesLength = ParentBootResourcesLength
1056 DPRINT(
"ExAllocatePool() failed\n");
1063 else if (ParentBootResources->PartialResourceList.PartialDescriptors[ParentBootResources->PartialResourceList.Count - 1].Type ==
CmResourceTypeDeviceSpecific)
1069 ParentBootResourcesLength -
Header);
1078 ParentBootResourcesLength -
Header);
1087 if (EnumerateSubKeys)
1100 if (!pDeviceInformation)
1102 DPRINT(
"ExAllocatePool() failed\n");
1110 DPRINT(
"ZwEnumerateKey() failed with status 0x%08lx\n",
Status);
1123 BootResourcesLength);
1136 if (!pValueInformation)
1138 DPRINT(
"ExAllocatePool() failed\n");
1148 DPRINT(
"ZwQueryValueKey() failed with status 0x%08lx\n",
Status);
1155 DPRINT(
"Wrong registry type: got 0x%lx, expected 0x%lx\n", pValueInformation->
Type,
REG_SZ);
1169 pHardwareId = &HardwareIdSerial;
1170 DeviceIndex = DeviceIndexSerial++;
1174 pHardwareId = &HardwareIdKeyboard;
1175 DeviceIndex = DeviceIndexKeyboard++;
1179 pHardwareId = &HardwareIdMouse;
1180 DeviceIndex = DeviceIndexMouse++;
1184 pHardwareId = &HardwareIdParallel;
1185 DeviceIndex = DeviceIndexParallel++;
1189 pHardwareId = &HardwareIdFloppy;
1190 DeviceIndex = DeviceIndexFloppy++;
1195 DPRINT(
"Unknown key path '%wZ'\n", RelativePath);
1200 HardwareIdKey = *pHardwareId;
1215 DPRINT(
"ZwCreateKey() failed with status 0x%08lx\n",
Status);
1218 swprintf(Level2Name,
L"%04lu", DeviceIndex);
1232 DPRINT(
"ZwCreateKey() failed with status 0x%08lx\n",
Status);
1235 DPRINT(
"Found %wZ #%lu (%wZ)\n", &
ValueName, DeviceIndex, &HardwareIdKey);
1239 DPRINT(
"ZwSetValueKey() failed with status 0x%08lx\n",
Status);
1240 ZwDeleteKey(hLevel2Key);
1255 DPRINT(
"ZwCreateKey() failed with status 0x%08lx\n",
Status);
1256 ZwDeleteKey(hLevel2Key);
1262 if (!CmResourceList)
1265 ZwDeleteKey(hLevel2Key);
1278 BootResourcesLength);
1284 DPRINT(
"ZwSetValueKey() failed with status 0x%08lx\n",
Status);
1286 ZwDeleteKey(hLevel2Key);
1293 if (BootResources && BootResources != ParentBootResources)
1296 BootResources =
NULL;
1313 if (hDevicesKey && hDevicesKey != hBaseKey)
1317 if (pDeviceInformation)
1319 if (pValueInformation)
1342 Status = ZwQueryValueKey(hPnpKey,
1355 Status = ZwQueryValueKey(hPnpKey,
1363 KeyValue = (
ULONG)(*KeyInformation->
Data);
1367 DPRINT1(
"ZwQueryValueKey(%wZ%wZ) failed\n", &KeyPathU, &KeyNameU);
1374 DPRINT1(
"Failed to allocate memory for registry query\n");
1379 DPRINT1(
"ZwQueryValueKey(%wZ%wZ) failed with status 0x%08lx\n", &KeyPathU, &KeyNameU,
Status);
1386 DPRINT1(
"ZwOpenKey(%wZ) failed with status 0x%08lx\n", &KeyPathU,
Status);
1389 DPRINT(
"Firmware mapper is %s\n", KeyValue != 0 ?
"disabled" :
"enabled");
1410 DPRINT1(
"ZwCreateKey() failed with status 0x%08lx\n",
Status);
1419 DPRINT1(
"ZwOpenKey() failed with status 0x%08lx\n",
Status);
1429 DPRINT(
"ZwOpenKey() failed with status 0x%08lx\n",
Status);
1488 ULONG KeyDisposition, RootHandleIndex = 0,
i = 1, NestedCloseLevel = 0;
1507 Status = ZwCreateKey(&HandleArray[
i],
1519 HandleArray[0] =
NULL;
1520 HandleArray[1] = RootHandle;
1526 if (NestedCloseLevel > 1)
ZwClose(HandleArray[RootHandleIndex]);
1529 RootHandleIndex =
i;
1533 HandleArray[
i] =
NULL;
1550 HandleArray[RootHandleIndex],
1552 Status = ZwCreateKey(&HandleArray[
i],
1581 if ((
p == pp) || (p1 == pp))
1589 if (NestedCloseLevel > 1)
ZwClose(HandleArray[RootHandleIndex]);
1849 FinalSize += PartialSize;
1852 FullDescriptor = (
PVOID)((
ULONG_PTR)FullDescriptor + PartialSize);
1943 #define PIP_RETURN_DATA(x, y) {ReturnLength = x; Data = y; Status = STATUS_SUCCESS; break;} 1944 #define PIP_REGISTRY_DATA(x, y) {ValueName = x; ValueType = y; break;} 1945 #define PIP_UNIMPLEMENTED() {UNIMPLEMENTED_DBGBREAK(); break;} 2001 if ((
DeviceNode->ChildBusNumber & 0x80000000) == 0x80000000)
2010 DeviceInstanceName =
DeviceNode->InstancePath.Buffer;
2018 ASSERT(EnumeratorNameEnd);
2021 NullTerminate =
TRUE;
2025 DeviceInstanceName);
2074 NullTerminate =
TRUE;
2078 ObjectNameInfo->Name.Buffer);
2170 if (ObjectNameInfo)
ExFreePool(ObjectNameInfo);
2196 static WCHAR RootKeyName[] =
2197 L"\\Registry\\Machine\\System\\CurrentControlSet\\";
2198 static WCHAR ProfileKeyName[] =
2199 L"Hardware Profiles\\Current\\System\\CurrentControlSet\\";
2200 static WCHAR ClassKeyName[] =
L"Control\\Class\\";
2201 static WCHAR EnumKeyName[] =
L"Enum\\";
2202 static WCHAR DeviceParametersKeyName[] =
L"Device Parameters";
2204 PWSTR KeyNameBuffer;
2206 ULONG DriverKeyLength;
2211 DPRINT(
"IoOpenDeviceRegistryKey() called\n");
2215 DPRINT1(
"IoOpenDeviceRegistryKey(): got wrong params, exiting...\n");
2236 0,
NULL, &DriverKeyLength);
2252 if (KeyNameBuffer ==
NULL)
2257 KeyName.Buffer = KeyNameBuffer;
2273 DriverKeyLength, KeyNameBuffer +
2278 DPRINT1(
"Call to IoGetDeviceProperty() failed with Status 0x%08lx\n",
Status);
2301 DPRINT1(
"IoOpenDeviceRegistryKey(%wZ): Base key doesn't exist, exiting... (Status 0x%08lx)\n", &
KeyName,
Status);
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)
VOID NTAPI KeAcquireSpinLock(PKSPIN_LOCK SpinLock, PKIRQL OldIrql)
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
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@381::@390 DeviceSpecificData
_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)
VOID NTAPI IoInvalidateDeviceState(IN PDEVICE_OBJECT DeviceObject)
#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)
#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)
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
#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)
struct _IO_BUS_TYPE_GUID_LIST IO_BUS_TYPE_GUID_LIST
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define REGSTR_VAL_CLASSGUID
#define RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE
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)
int _cdecl swprintf(const WCHAR *,...)
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)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
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 REG_OPTION_VOLATILE
union _CM_PARTIAL_RESOURCE_DESCRIPTOR::@381 u
#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 ExFreePoolWithTag(_P, _T)
#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)
_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