-1

I'm sure this is a hugely simple question. If I view a program in Spy++ I can see a Thread ID. When running my application, how do I get this (it's own Thread ID, not anothers)

Dan
  • 1,958
  • 1
  • 18
  • 26
  • Does this question help? http://stackoverflow.com/questions/1922982/how-can-i-detect-if-a-thread-has-windows-handles – Daniel Kelley Feb 15 '13 at 14:40
  • @DanielKelley Looks handy, but to clarify, I only need the ThreadID of my own application. – Dan Feb 15 '13 at 14:43
  • 1
    This is already answered here I believe; http://stackoverflow.com/questions/1679243/getting-the-thread-id-from-a-thread – DiskJunky Feb 15 '13 at 14:49

1 Answers1

1

I think what you want is GetCurrentThreadId():

http://msdn.microsoft.com/en-us/library/windows/desktop/ms683183(v=vs.85).aspx?ppud=4

Aaron
  • 9,123
  • 5
  • 40
  • 38