DetourUpdateThread
Enlist a thread for update in the current transaction.
Definition
LONG DetourUpdateThread( _In_ HANDLE hThread );
Parameters
- hThread
- The handle of the thread to be updated with the pending transaction.
Return value
Returns NO_ERROR if successful; otherwise, returns an error code.
Error codes
- ERROR_NOT_ENOUGH_MEMORY
- Not enough memory to record identity of thread.
Remarks
DetourUpdateThread
enlists the specified thread for update when
the current transaction, opened by the
DetourTransactionBegin
API, commits.
When a detour transaction commmits, Detours insures that all threads
enlisted in the transcation via the DetourUpdateThread
API
are updated if their instruction pointer lies within the rewritten code in
either the target function or the trampoline function.
Threads not enlisted in the transaction are not updated when the transaction commits. As a result, they may attempt to execute an illegal combination of old and new code.
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, Member, Simple, Slept, Traceapi, Tracebld, Tracelnk, Tracemem, Tracereg, Traceser, Tracetcp, Tryman.