-
Notifications
You must be signed in to change notification settings - Fork 1k
DetourUpdateThread
Enlist a thread for update in the current transaction.
LONG DetourUpdateThread(
_In_ HANDLE hThread
);
hThread
: The handle of the thread to be updated with the pending transaction.
If hThread
is equal to the current threads pseudo handle
(as returned by GetCurrentThread()
)
no action is performed and NO_ERROR is returned.
Returns NO_ERROR if successful; otherwise, returns an error code.
ERROR_NOT_ENOUGH_MEMORY : Not enough memory to record identity of thread.
DetourUpdateThread
enlists the specified thread for update when the
current transaction, opened by the
DetourTransactionBegin
API, commits.
When a detour transaction commits, Detours insures that all threads
enlisted in the transaction 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.
Calling DetourUpdateThread
with a non-pseudo handle to the current thread
is currently unsupported and will result in application hangs.
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, Member, Simple, Slept, Traceapi, Tracebld, Tracelnk, Tracemem, Tracereg, Traceser, Tracetcp, Tryman.