1 // 2 // getpid.cpp 3 // 4 // Copyright (c) Microsoft Corporation. All rights reserved. 5 // 6 // The _getpid() function, which gets the current process identifier. 7 // 8 #include <corecrt_internal.h> 9 10 11 12 // Gets the current process identifier. _getpid()13extern "C" int __cdecl _getpid() 14 { 15 return GetCurrentProcessId(); 16 } 17