Getting thread ID RRS feed

  • Question

  • Hi

    I am trying to debug an issue in a multi-threaded application, where I need to determine the ID of the thread that has called a particular function. E.g. if there is a function ftn() which is called by various threads. It is within ftn() I want to print out the ID of the thread in the context of which it is called.

    The application is native, and the OS is WinCE 6.0.

    Could somebody please give some pointers on this?



    Thursday, October 7, 2010 10:36 AM

All replies

  • Call GetCurrentThreadID() in the function ftn().See the msdn link for the function.


    Thursday, October 7, 2010 10:45 AM
  • Thanks Vinoth.
    Friday, October 8, 2010 10:51 AM