I need help for a project that uses Microsoft Detours.
Premise: I am trying to use a class I found in a project on CodeProject that uses the Detours library. I downloaded the latest version of Detuors from Github and recompiled it, but I can't find the definition of the macro DETOUR_TRAMPOLINE
. I imagine that in the new version of Detours it has been replaced in some way.
In the project that uses this missing macro, it's used like this:
DETOUR_TRAMPOLINE(BOOL WINAPI Detour_EnableScrollBar(HWND hwnd, int wSBflags, UINT wArrows), EnableScrollBar);
DETOUR_TRAMPOLINE(BOOL WINAPI Detour_GetScrollInfo (HWND hwnd, int fnBar, LPSCROLLINFO lpsi), GetScrollInfo);
DETOUR_TRAMPOLINE(int WINAPI Detour_GetScrollPos (HWND hwnd, int nBar), GetScrollPos);
DETOUR_TRAMPOLINE(BOOL WINAPI Detour_GetScrollRange (HWND hwnd, int nBar, LPINT lpMinPos, LPINT lpMaxPos), GetScrollRange);
DETOUR_TRAMPOLINE(int WINAPI Detour_SetScrollInfo (HWND hwnd, int fnBar, LPSCROLLINFO lpsi, BOOL fRedraw), SetScrollInfo);
DETOUR_TRAMPOLINE(int WINAPI Detour_SetScrollPos (HWND hwnd, int nBar, int nPos, BOOL fRedraw), SetScrollPos);
DETOUR_TRAMPOLINE(int WINAPI Detour_SetScrollRange (HWND hwnd, int nBar, int nMinPos, int nMaxPos, BOOL fRedraw), SetScrollRange);
DETOUR_TRAMPOLINE(BOOL WINAPI Detour_ShowScrollBar (HWND hwnd, int wBar, BOOL fShow), ShowScrollBar);
Question:
- Is there a way in the new version of Detours to get the same effect as the old macro?
- If it is not asking too much, can I ask you some advice on how I could rewrite the code I reported above to be compatible with the new method?
Thanks in advance for the help!