添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
  • Interception of Binary Functions
  • Payloads and DLL Import Editing
  • Detouring 32-bit and 64-bit Processes
  • Samples
  • API Reference

  • Detouring Target Functions
  • Finding Target Functions
  • Accessing Loaded Binaries and Payloads
  • Modifying Binaries
  • Inserting DLLs and Payloads Into New Processes
  • Parameters

    ppPointer : Pointer to the target pointer to which the detour will be attached. See the remarks section below for additional considerations.

    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 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.

    Remarks

    Warning : The variable pointed to by the ppPointer argument must remain alive for the duration of the transaction, that is until DetourTransactionCommit , DetourTransactionCommitEx or DetourTransactionAbort is called.

    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 .

    Related Samples

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