* fix context setting errors in DetourEnumerateImports API
* Fix SAL annotation on DetouerEnumerateImportThunk
SAL annotation for VoidContext should just be In rather than In_opt (this is consistent with how the existing DetouerEnumerateImportThunk is structured).
This was causing an error in the static analysis checks in the CI build.
* Update test_module_api.cpp
Comparison of BOOL vs. bool, this should fix it.
---------
Co-authored-by: g00356712 <guochenyang@huawei.com>
Co-authored-by: Jeff Bisset <43155345+BissetJ@users.noreply.github.com>
This change adds Arm64EC detours support.
It bumps the toolset version to 143 from 142 since 142 does not support Arm64EC officially.
It adds a new Arm64EC target.
It passes Arm64EC-specific compilation flag /arm64EC and linker flag /machine:arm64x or /machine:arm64ec in right places.
A few minor changes:
- Expose detour_is_imported via a new public function DetourIsFunctionImported
- Make certain runtime checks happy by masking pbTarget before casting to smaller type
- Enable user to compile with a different number of supported section headers (leaves default at 32)
Other improvements:
- Makes the pcbData parameter in DetourFindPayload and DetourFindPayloadEx optional, so that if an application only needs to search for the presence of a payload, they can ignore the size by passing nullptr.
- Makes the pvData parameter in DetourCopyPayloadToProcess const, so that a pointer to a const C++ object can be passed instead of the object needing to be const_casted or being non-const.
- Adds DetourCopyPayloadToProcessEx, which has the same interface than DetourCopyPayloadToProcess, but it returns the address of the payload in the remote module, if the program later wants to write to it.
- Add payload example and extra unit tests covering new APIs.
Fixes#79
Co-authored-by: Charles Milette <me@charlesmilette.net>
- Import the Catch2 self-contained C++ test framework.
It's used by many Microsoft OSS projects:
- https://github.com/microsoft/cppwinrt/tree/master/test
- https://github.com/microsoft/wil/tree/master/tests
As well as many OSS projects in general.
When the CMake PR is merged, we can remove this as
a checked in development dependency, and can instead
download it using CMake.
- Start basic set of unit tests to validate failure modes of
- Hook the execution into the existing NMake build system.
- Hook test execution into CI pipeline