2 tlhelp32.h - Include file for Tool help functions.
4 Written by Mumit Khan <khan@nanotech.wisc.edu>
6 This file is part of a free library for the Win32 API.
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 #pragma GCC system_header
22 #define HF32_DEFAULT 1
24 #define LF32_FIXED 0x1
26 #define LF32_MOVEABLE 0x4
27 #define MAX_MODULE_NAME32 255
28 #define TH32CS_SNAPHEAPLIST 0x1
29 #define TH32CS_SNAPPROCESS 0x2
30 #define TH32CS_SNAPTHREAD 0x4
31 #define TH32CS_SNAPMODULE 0x8
32 #define TH32CS_SNAPALL (TH32CS_SNAPHEAPLIST|TH32CS_SNAPPROCESS|TH32CS_SNAPTHREAD|TH32CS_SNAPMODULE)
33 #define TH32CS_INHERIT 0x80000000
34 typedef struct tagHEAPLIST32
{
39 } HEAPLIST32
,*PHEAPLIST32
,*LPHEAPLIST32
;
40 typedef struct tagHEAPENTRY32
{
50 } HEAPENTRY32
,*PHEAPENTRY32
,*LPHEAPENTRY32
;
51 typedef struct tagPROCESSENTRY32W
{
55 DWORD th32DefaultHeapID
;
58 DWORD th32ParentProcessID
;
61 WCHAR szExeFile
[MAX_PATH
];
62 } PROCESSENTRY32W
,*PPROCESSENTRY32W
,*LPPROCESSENTRY32W
;
63 typedef struct tagPROCESSENTRY32
{
67 DWORD th32DefaultHeapID
;
70 DWORD th32ParentProcessID
;
73 CHAR szExeFile
[MAX_PATH
];
74 } PROCESSENTRY32
,*PPROCESSENTRY32
,*LPPROCESSENTRY32
;
75 typedef struct tagTHREADENTRY32
{
79 DWORD th32OwnerProcessID
;
83 } THREADENTRY32
,*PTHREADENTRY32
,*LPTHREADENTRY32
;
84 typedef struct tagMODULEENTRY32W
{
93 WCHAR szModule
[MAX_MODULE_NAME32
+ 1];
94 WCHAR szExePath
[MAX_PATH
];
95 } MODULEENTRY32W
,*PMODULEENTRY32W
,*LPMODULEENTRY32W
;
96 typedef struct tagMODULEENTRY32
{
105 char szModule
[MAX_MODULE_NAME32
+ 1];
106 char szExePath
[MAX_PATH
];
107 } MODULEENTRY32
,*PMODULEENTRY32
,*LPMODULEENTRY32
;
108 BOOL WINAPI
Heap32First(LPHEAPENTRY32
,DWORD
,DWORD
);
109 BOOL WINAPI
Heap32ListFirst(HANDLE
,LPHEAPLIST32
);
110 BOOL WINAPI
Heap32ListNext(HANDLE
,LPHEAPLIST32
);
111 BOOL WINAPI
Heap32Next(LPHEAPENTRY32
);
112 BOOL WINAPI
Module32First(HANDLE
,LPMODULEENTRY32
);
113 BOOL WINAPI
Module32FirstW(HANDLE
,LPMODULEENTRY32W
);
114 BOOL WINAPI
Module32Next(HANDLE
,LPMODULEENTRY32
);
115 BOOL WINAPI
Module32NextW(HANDLE
,LPMODULEENTRY32W
);
116 BOOL WINAPI
Process32First(HANDLE
,LPPROCESSENTRY32
);
117 BOOL WINAPI
Process32FirstW(HANDLE
,LPPROCESSENTRY32W
);
118 BOOL WINAPI
Process32Next(HANDLE
,LPPROCESSENTRY32
);
119 BOOL WINAPI
Process32NextW(HANDLE
,LPPROCESSENTRY32W
);
120 BOOL WINAPI
Thread32First(HANDLE
,LPTHREADENTRY32
);
121 BOOL WINAPI
Thread32Next(HANDLE
,LPTHREADENTRY32
);
122 BOOL WINAPI
Toolhelp32ReadProcessMemory(DWORD
,LPCVOID
,LPVOID
,DWORD
,LPDWORD
);
123 HANDLE WINAPI
CreateToolhelp32Snapshot(DWORD
,DWORD
);
125 #define LPMODULEENTRY32 LPMODULEENTRY32W
126 #define LPPROCESSENTRY32 LPPROCESSENTRY32W
127 #define MODULEENTRY32 MODULEENTRY32W
128 #define Module32First Module32FirstW
129 #define Module32Next Module32NextW
130 #define PMODULEENTRY32 PMODULEENTRY32W
131 #define PPROCESSENTRY32 PPROCESSENTRY32W
132 #define PROCESSENTRY32 PROCESSENTRY32W
133 #define Process32First Process32FirstW
134 #define Process32Next Process32NextW
139 #endif /* _TLHELP32_H */