microsoft / Detours

Detours is a software package for monitoring and instrumenting API calls on Windows. It is distributed in source code form.
MIT License
5.18k stars 1.01k forks source link

Samples: Fix findfunc + symtest samples using incorrect dll name. #131

Closed bgianfo closed 4 years ago

bgianfo commented 4 years ago

@GladYouLikeIt described the bug in the issue:

Extend.cpp is built into extend64.dll for x64, and extend86.dll for x86, but the code in samples\findfunc\extend.cpp references the dll without specifying the DETOURS_BITS in the dll name. DetourFindFunction fails at runtime because of this.

@ohuseyinoglu noted the same bug in SymTest.cpp, which caused it to completely error out. I've added it to nmake test to make sure it continues to run in the future.

Fixes #2