Rev 10 |
Go to most recent revision |
Details |
Last modification |
View Log
| RSS feed
| Rev |
Author |
Line No. |
Line |
| 3 |
tristanc |
1 |
#include <Windows.h>
|
|
|
2 |
#include <detours.h>
|
|
|
3 |
#include <cstdlib>
|
|
|
4 |
#include <cstring>
|
|
|
5 |
#include <stdio.h>
|
|
|
6 |
|
|
|
7 |
#define DETOUR_INIT \
|
|
|
8 |
DetourTransactionBegin(); \
|
|
|
9 |
DetourUpdateThread(GetCurrentThread());
|
|
|
10 |
|
|
|
11 |
#define DETOUR_ATTACH(functionRef, detourFunctionRef) \
|
|
|
12 |
DetourAttach(&(PVOID &)functionRef,detourFunctionRef);
|
|
|
13 |
|
|
|
14 |
#define DETOUR_DETACH(functionRef, detourFunctionRef) \
|
|
|
15 |
DetourDetach(&(PVOID &)functionRef,detourFunctionRef);
|
|
|
16 |
|
|
|
17 |
#define DETOUR_COMMIT \
|
|
|
18 |
DetourTransactionCommit();
|