I have access to a std::thread::id
in my code, and need to use some native functions that receive as argument ThreadId as DWORD
( same as returned by GetCurrentThreadId()
).
I cannot find any way to convert from std::thread::id
to a Win32 DWORD
ThreadId. The closest thing I can find is std::thread
has that has a native_handle. But I still have no way to create the std::thread
to get the native_handle from a std::thread::id
, so I am still too far from what I need.
Is there something that I am missing? Or is the gap between standard portable thread functions and native functions so big that the standard api is unusable for my purposes?