On 8/1/05, Mark Hammond <[EMAIL PROTECTED]> wrote:
GetThreadID is a member of an MFC CThread class, probably not what you want. The thread itself can call GetCurrentlThreadId - so the simplest way is probably for your new thread to call this function and store the result in a global. Your main thread can then use this global.The only other way I know to get this thread ID is to create the thread using win32process.CreateThread - that will return the thread ID and handle of the new thread.Mark-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Justin Johnson
Sent: Tuesday, 2 August 2005 5:35 AM
To: python-win32@python.org
Subject: [python-win32] Getting new thread's ID (not handle)MSDN says PostThreadMessage takes the thread ID as a parameter. >From reading the doc I see that handle and ID are different and that both should be returned when creating a new thread with CreateThread. I am creating a new thread with the threading module and do not see a way to get the ID back. I searched the source to see if CreateThread is being called and didn't find anything. Does anyone know how to get a thread's ID if the thread was created with threading.Thread?Thanks.Justin
_______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32