-
Notifications
You must be signed in to change notification settings - Fork 1k
DetourAttach
Attach a detour to a target function.
LONG DetourAttach(
_Inout_ PVOID * ppPointer,
_In_ PVOID pDetour
);
ppPointer : Pointer to the target pointer to which the detour will be attached.
pDetour : Pointer to the detour function.
Returns NO_ERROR if successful; otherwise, returns an error code.
ERROR_INVALID_BLOCK : The function referenced is too small to be detoured.
ERROR_INVALID_HANDLE : The ppPointer parameter is null or points to a null pointer.
ERROR_INVALID_OPERATION : No pending transaction exists.
ERROR_NOT_ENOUGH_MEMORY : Not enough memory exists to complete the operation.
DetourAttach
attaches a detour to a target function as part of the
current transaction opened by the
DetourTransactionBegin API.
For more information on using Detours to intercept function calls, see Interception of Binary Functions or Using Detours in the Detours Overview.
Commem, Cping, Dtest, Excep, FindFunc, Simple, Slept, Traceapi, Tracebld, Tracelnk, Tracemem, Tracereg, Traceser, Tracetcp, Tryman.