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