Improve failure mode if `DetourCreateProcessWithDllEx` is supplied with a DLL of wrong bitness
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 6.4k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
When using DetourCreateProcessWithDllEx from a 32-bit process to create a new process, while pointing lpDllName at a 64-bit DLL, strange failures occur.
I assumed that, because DetourCreateProcessWithDllEx auto-chooses the correct bitness for injection, I'd be safe to always pass the 64-bit DLL name into it.
However, that's not true (and a close read of the documentation confirms this).
Still, it would be great to either warn in the documentation about this, and/or improve the handling of this in DetourCreateProcessWithDllEx - either also auto-choose the correct bitness if parent-bitness==child-bitness, or return an error.
Detours version
https://github.com/microsoft/Detours/commit/66d6f2d34aba564d373083621cacf66ec51199b2
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
The issue names DetourCreateProcessWithDllEx and its lpDllName input; begin by reading the API documentation and implementation to confirm the bitness-selection behavior. Decide whether the accepted outcome is a documentation warning, automatic selection, or an explicit error, then define completion around that choice and validate the wrong-bitness case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- devtools, operating-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100