mrwad99
asked on
AfxBeginThread and Thread ID
Ah hello.
I am creating a thread via AfxBeginThread, and I would like to know how I can get hold of the ID of the thread. I can obviously assign some data structure to the thread that contains some identifier, but I would like to know the correct way to get the ID.
Any ideas ?
TIA
I am creating a thread via AfxBeginThread, and I would like to know how I can get hold of the ID of the thread. I can obviously assign some data structure to the thread that contains some identifier, but I would like to know the correct way to get the ID.
Any ideas ?
TIA
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Every thread has unique ID among currrently running threads. Otherwise OpenThread API could open wrong thread.
I don't know whether created thread ID can be equal to ID of thread which finished some time before.
I don't know whether created thread ID can be equal to ID of thread which finished some time before.
<I don't know whether created thread ID can be equal to ID of thread which finished some time before.>
I suspect it *could* be - Why should windows need to keep track of non-existant threads?
I suspect it *could* be - Why should windows need to keep track of non-existant threads?
ASKER
Thanks AlexFM. Andy: interesting, worth keeping in mind.
If anyone is interested, I have a stinker of a problem at http:Q_21802368.html on a similar slant to this one
If anyone is interested, I have a stinker of a problem at http:Q_21802368.html on a similar slant to this one
ASKER