Threads - Self Terminating?

Everything else that doesn't fall into one of the other PB categories.
fweil
Enthusiast
Enthusiast
Posts: 725
Joined: Thu Apr 22, 2004 5:56 pm
Location: France
Contact:

Post by fweil »

dmoc,

By usong such a code :

Code: Select all

  For i = 0 To $FFFFFF
    If GetThreadTimes_(i, @CreationTime.FILETIME, @ExitTime.FILETIME, @KernelTime.FILETIME, @UserTime.FILETIME)
        Debug "Thread " + Str(i) + " found"
    EndIf
  Next
  CallDebugger
End
(caution : the For limit value !)

you will have some returning thread ids. OK. But what I don't know is if they are unique IDs belonging to all running processes, or IDs from the app which runs currently.

Just a question ... because it is not clear to me by reading the Win32 API guide.
My avatar is a small copy of the 4x1.8m image I created and exposed at 'Le salon international du meuble à Paris' january 2004 in Matt Sindall's 'Shades' designers exhibition. The original laminated print was designed using a 150 dpi printout.
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Post by dmoc »

My guess is they are only for the current process, for security reasons, but I check later. Thanks for the tip.
Post Reply