Peut-être en utilisant GetThreadTimes aiderait?
Elaborer si le fil appartient à un autre exécutable, ce serait quelque chose (non testé) dans les lignes de:
// Returns true if thread times could be queried and its results are usable,
// false otherwise. Error handling is minimal, considering throwing detailed
// exceptions instead of returning a simple boolean.
bool get_remote_thread_times(DWORD thread_id, FILETIME & kernel_time, FILETIME & user_time)
{
FILETIME creation_time = { 0 };
FILETIME exit_time = { 0 };
HANDLE thread_handle = OpenThread(THREAD_QUERY_INFORMATION, FALSE, thread_id);
if (thread_handle == INVALID_HANDLE) return false;
bool success = GetThreadTimes(thread_handle, &creation_time, &exit_time, &kernel_time, &user_time) != 0;
CloseHandle(thread_handle);
return success;
}
J'ai également utilisé l'explorateur de processus. son bon outil – anil
+1 cet outil est vraiment sympa. – bltxd