C\C++下獲取系統進程或線程ID

在程序開發時有時須要獲取線程和進程ID以分析程序運行 (1)windows下獲取進程或線程ID 經過調用系統提供的GetCurProcessId或GetNowThreadID來獲取當前程序代碼運行時的進程或線程ID 示例代碼:linux #include "windows.h" printf("now pid is %d", GetCurrentProcessId()); printf("now
相關文章
相關標籤/搜索