DetourDetach

Microsoft Research Detours

DetourDetach

Detach a detour from a target function.

Definition

LONG DetourDetach(
    _Inout_ PVOID * ppPointer,
    _In_    PVOID pDetour
    );

Parameters

ppPointer
Pointer to the target pointer from which the detour will be detached.
pDetour
Pointer to the detour function.

Return value

Returns NO_ERROR if successful; otherwise, returns an error code.

Error codes

ERROR_INVALID_BLOCK
The function to be detached was too small to be detoured.
ERROR_INVALID_HANDLE
The ppPointer parameter is null or references a null address.
ERROR_INVALID_OPERATION
No pending transaction exists.
ERROR_NOT_ENOUGH_MEMORY
Not enough memory to complete the operation.

Remarks

DetourDetach detaches a detour from 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.

Related Samples

Commem, Cping, FindFunc, Member, Simple, Slept, Traceapi, Tracebld, Tracelnk, Tracemem, Tracereg, Traceser, Tracetcp, Tryman.