代码改变世界

.Net Managed C++如何获取当前线程id和当前进程id

2018-06-05 13:51  晨~光  阅读(547)  评论(0编辑  收藏  举报

获取当前线程Id:

1 AppDomain::GetCurrentThreadId()

获取当前进程Id:

1 using namespace System::Diagnostics;
2 Process^ process = Process::GetCurrentProcess();
3 process->Id;