locked
how can i know current thread is main thread?

    Question

  • how can i know current thread is main thread?
    Thursday, November 29, 2012 3:37 AM

Answers

  • Call GetCurrentThreadId in the main thread and cache the result, then call GetCurrentThreadId again when you need to check.


    Visual C++ MVP

    • Proposed as answer by Jesse Jiang Tuesday, December 04, 2012 10:34 AM
    • Marked as answer by Jesse Jiang Thursday, December 06, 2012 2:46 AM
    Thursday, November 29, 2012 5:01 AM

All replies