Used to iterate through the threads of a process. Injectors use these functions to find an appropriate thread to inject into.
BOOL WINAPI Thread32Next( _In_ HANDLE hSnapshot, _Out_ LPTHREADENTRY32 lpte );
- hSnapshot [in]
- A handle to the snapshot returned from a previous call to the CreateToolhelp32Snapshot function.
- lpte [out]
- A pointer to a THREADENTRY32 structure.
Returns TRUE if the next entry of the thread list has been copied to the buffer or FALSE otherwise. The ERROR_NO_MORE_FILES error value is returned by the GetLastError function if no threads exist or the snapshot does not contain thread information.