중요한건 PROCESSENTRY32 구조체이며
MSDN에는
typedef struct tagPROCESSENTRY32 {
DWORD dwSize;
DWORD cntUsage;
DWORD th32ProcessID;
ULONG_PTR th32DefaultHeapID;
DWORD th32ModuleID;
DWORD cntThreads;
DWORD th32ParentProcessID;
LONG pcPriClassBase;
DWORD dwFlags;
TCHAR szExeFile[MAX_PATH]; } PROCESSENTRY32, *PPROCESSENTRY32;
Members
- dwSize
-
The size of the structure, in bytes. Before calling the Process32First function, set this member to
sizeof(PROCESSENTRY32)
. If you do not initialize dwSize, Process32First fails. - cntUsage
-
This member is no longer used and is always set to zero.
- th32ProcessID
-
The process identifier.
- th32DefaultHeapID
-
This member is no longer used and is always set to zero.
- th32ModuleID
-
This member is no longer used and is always set to zero.
- cntThreads
-
The number of execution threads started by the process.
- th32ParentProcessID
-
The identifier of the process that created this process (its parent process).
- pcPriClassBase
-
The base priority of any threads created by this process.
- dwFlags
-
This member is no longer used, and is always set to zero.
- szExeFile
-
The name of the executable file for the process.
PID, PPID, 등등 많은 정보를 가져오는데
PROCESSENTRY32 의 값만 알아두면 될 것 같다.
'프로그래밍 > C/C++' 카테고리의 다른 글
[C] 숫자에서 문자열로 변환 (0) | 2015.05.07 |
---|---|
[C] DLL 사용하기(dllimport,dllexport) (0) | 2014.02.20 |
[윈도우] CPU 이름 가져오기 (0) | 2014.02.05 |
동기화 Event, WaitForSingleObject 맞추기 (0) | 2013.02.14 |
Thread 정보 얻어오기 (0) | 2012.11.21 |