Skip to content

DetourTransactionCommitEx

Brian Gianforcaro edited this page Aug 22, 2020 · 5 revisions

DetourTransactionCommitEx

Commit the current transaction for attaching or detaching detours.

Definition

LONG DetourTransactionCommitEx(
    _Out_opt_ PVOID ** pppFailedPointer
);

Parameters

pppFailedPointer : Variable to receive the target pointer passed to the DetourAttach, DetourAttachEx, or DetourDetach call that caused the latest transaction to fail.

Return value

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

Error codes

ERROR_INVALID_DATA : Target function was changed by third party before the transaction could complete.

ERROR_INVALID_OPERATION : No pending transaction exists.

Other Codes : Error code returned by API within DetourAttach, DetourAttachEx, or DetourDetach that caused transaction to fail.

Remarks

DetourTransactionCommitEx commits the current transaction created with DetourTransactionBegin. Committing a transaction make all updates specified in any calls to the DetourAttach, DetourAttachEx, DetourDetach, or DetourUpdateThread APIs within the transaction.

For more information on using Detours to intercept function calls, see Interception of Binary Functions or Using Detours in the Detours Overview.

Related Samples

Traceapi

Clone this wiki locally