2009-08-06 49 views

回答

1

GetCurrentProcessId

完全一樣的問題嗎? Windows

在UNIX下,你可以去:

#include <sys/types.h> 
#include <unistd.h> 

pid_t getpid(void); 
pid_t getppid(void); 

說明 GETPID()返回當前進程的進程ID。 (這通常是 由生成唯一臨時文件名的例程使用。)

相關問題