mov eax, OldThreadHandle mov edi, CurThreadHandle call [ThreadSwitchCallback]
Performs programmer-defined processing whenever the system switches to a different thread. ThreadSwitchCallback is a programmer-defined callback function installed by the Call_When_Thread_Switched service. Uses Flags.
OldThreadHandle
Handle of the previous thread.
CurThreadHandle
Handle of the current thread.
The callback function can carry out any operation and can modify the EAX, EBX, ECX, EDX, ESI, EDI, and Flags registers.
See also Call_When_Thread_Switched