GetCurrentThreadId c

C++
Retrieves the thread identifier of the calling thread.
  
DWORD GetCurrentThreadId();
Source

Also in C++: