ms c++ get pid of current process September 20, 2023 by Tarik The GetCurrentProcessId function will do this.