[Kernel] Some wil/resource.h features require Windows 10
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 3k
- Forks
- 300
- Avg merge
- 19h 12m
- Merged PRs (30d)
- 1
Description
When I compile my driver with wil/resource.h, I get error messages:
...\vcpkg_installed\x64-windows-static\include\wil\resource.h(6490,15): error C2039: 'ExReleasePushLockExclusive': is not a member of '`global namespace'' [F:\Projects\IRM\src\IRM\IRM.vcxproj]
...\vcpkg_installed\x64-windows-static\include\wil\resource.h(6490,41): error C3861: 'ExReleasePushLockExclusive': identifier not found [F:\Projects\IRM\src\IRM\IRM.vcxproj]
...\vcpkg_installed\x64-windows-static\include\wil\resource.h(6497,15): error C2039: 'ExReleasePushLockShared': is not a member of '`global namespace'' [F:\Projects\IRM\src\IRM\IRM.vcxproj]
...\vcpkg_installed\x64-windows-static\include\wil\resource.h(6497,38): error C3861: 'ExReleasePushLockShared': identifier not found [F:\Projects\IRM\src\IRM\IRM.vcxproj]
...\vcpkg_installed\x64-windows-static\include\wil\resource.h(6514,11): error C2039: 'ExAcquirePushLockExclusive': is not a member of '`global namespace'' [F:\Projects\IRM\src\IRM\IRM.vcxproj]
...\vcpkg_installed\x64-windows-static\include\wil\resource.h(6514,37): error C3861: 'ExAcquirePushLockExclusive': identifier not found [F:\Projects\IRM\src\IRM\IRM.vcxproj]
...\IRM\vcpkg_installed\x64-windows-static\include\wil\resource.h(6524,11): error C2039: 'ExAcquirePushLockShared': is not a member of '`global namespace'' [F:\Projects\IRM\src\IRM\IRM.vcxproj]
My driver is compiled with the following (relevant) options: /D _WIN32_WINNT=0x0601 /D WINVER=0x0601 /D WINNT=1 /D NTDDI_VERSION=0x06010000 which means that I target Windows 7 and those APIs (ExReleasePushLockExclusive, ExReleasePushLockShared) are Windows 10 only.
It is my impression that these code portions should have been guarded to prevent these APIs' use when targeting Windows 7.
Thank you for WIL!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect wil/resource.h around lines 6490-6524, focusing on the ExAcquirePushLock* and ExReleasePushLock* calls. Reproduce the build with the Windows 7 target definitions from the report, then verify those APIs are not used for that target and the driver compiles successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100