Highlights
- Restored
/Zlfor static-library builds, fixing unintended CRT default-library directives and restoring compatibility with caller-selected/MTand/MDruntimes (including their Debug variants). - Improved x86/x64 instruction decoding, including REX prefix precedence, 16-bit addressing, and control/debug-register instructions. Added instruction-length checks and rejection of invalid or unsupported encodings to avoid incorrect trampolines (thanks to @m417z).
- Invalid target instructions now fail gracefully with
HRESULT_FROM_NT(STATUS_ILLEGAL_INSTRUCTION);SlimDetoursCopyInstructionreports unsupported instructions withNULL. EVEX MAP4 encodings are rejected until a correct decoder is available. - Fixed x86/x64 trampoline instruction-offset mappings that could be truncated by undersized bit fields, ensuring correct thread instruction-pointer adjustment when applying or removing hooks (#32, thanks to @m417z).
- Fixed heap-state cleanup in
SlimDetoursUninitializewhen the process heap was used as a fallback (thanks to @m417z). - Enabled
/Gwfor Release static libraries so consumer links can discard unused global data.
NuGet Package: https://www.nuget.org/packages/KNSoft.SlimDetours/1.2.3-beta
Full Changelog: v1.2.2-beta...v1.2.3-beta