Skip to content

filter: fix absolute registry path access error in the Windows 11 26H1 HLK#67

Open
Chenxi Han (5656hcx) wants to merge 2 commits into
mainfrom
filter-patch
Open

filter: fix absolute registry path access error in the Windows 11 26H1 HLK#67
Chenxi Han (5656hcx) wants to merge 2 commits into
mainfrom
filter-patch

Conversation

@5656hcx

Copy link
Copy Markdown
Contributor

Summary

Simplified friendly-name registration in the qcfilter driver by replacing the outdated registry approach with the IoSetDevicePropertyData kernel API. Also removed unreferenced variables, functions, headers from all project files.

Changes

File Change
qcfilter.c Replace QCFilterSetFriendlyName(...) call in QCFilterCreateFriendlyName with IoSetDevicePropertyData(PDO, &DEVPKEY_Device_FriendlyName, ...)
qcfilter.c Delete QCFilterSetFriendlyName function body (~270 lines)
qcfilter.h Remove QCFilterSetFriendlyName prototype

Behavior

  • No functional change: QCFilterCreateFriendlyName still first checks for an existing FriendlyName property; only if absent does it construct and set one.
  • The new API writes the same property that Device Manager reads, so the displayed name is identical.
  • IoSetDevicePropertyData is available on Windows 8 and later (NTDDI_WIN8), which is consistent with the driver's existing use of ExAllocatePoolZero and IoInitializeRemoveLock with 4-parameter signature.

Test

Local installation correctly displayed device name with instance id: Qualcomm USB Composite Device 90DB (0018)
The device hardware key (Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\VID_05C6&PID_90DB\) also contains the correct friendlyName: Qualcomm USB Composite Device 90DB (0018)

Signed-off-by: Chenxi Han <chehan@qti.qualcomm.com>
…vicePropertyData

Signed-off-by: Chenxi Han <chehan@qti.qualcomm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant