Hello! I found that there is almost the same issue as https://github.com/microsoft/Detours/issues/293 with DetourCodeFromPointer on arm64. It doesn't work properly for OutputDebugStringA, because detour_skip_jmp doesn't support unconditional jump B <label>. As a result, when you try to hook OutputDebugStringA you are actually hooking kernel32.dll!OutputDebugStringAStub instead of the KernelBase.dll!OutputDebugStringA.
Hello! I found that there is almost the same issue as https://github.com/microsoft/Detours/issues/293 with
DetourCodeFromPointer
on arm64. It doesn't work properly forOutputDebugStringA
, becausedetour_skip_jmp
doesn't support unconditional jumpB <label>
. As a result, when you try to hookOutputDebugStringA
you are actually hookingkernel32.dll!OutputDebugStringAStub
instead of theKernelBase.dll!OutputDebugStringA
.https://github.com/microsoft/Detours/blob/734ac64899c44933151c1335f6ef54a590219221/src/detours.cpp#L1049