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.
18 #define HF32_DEFAULT 1
20 #define LF32_FIXED 0x1
22 #define LF32_MOVEABLE 0x4
23 #define MAX_MODULE_NAME32 255
24 #define TH32CS_SNAPHEAPLIST 0x1
25 #define TH32CS_SNAPPROCESS 0x2
26 #define TH32CS_SNAPTHREAD 0x4
27 #define TH32CS_SNAPMODULE 0x8
28 #define TH32CS_SNAPALL (TH32CS_SNAPHEAPLIST|TH32CS_SNAPPROCESS|TH32CS_SNAPTHREAD|TH32CS_SNAPMODULE)
29 #define TH32CS_INHERIT 0x80000000
30 typedef struct tagHEAPLIST32
{
35 } HEAPLIST32
,*PHEAPLIST32
,*LPHEAPLIST32
;
36 typedef struct tagHEAPENTRY32
{
46 } HEAPENTRY32
,*PHEAPENTRY32
,*LPHEAPENTRY32
;
47 typedef struct tagPROCESSENTRY32W
{
51 DWORD th32DefaultHeapID
;
54 DWORD th32ParentProcessID
;
57 WCHAR szExeFile
[MAX_PATH
];
58 } PROCESSENTRY32W
,*PPROCESSENTRY32W
,*LPPROCESSENTRY32W
;
59 typedef struct tagPROCESSENTRY32
{
63 DWORD th32DefaultHeapID
;
66 DWORD th32ParentProcessID
;
69 CHAR szExeFile
[MAX_PATH
];
70 } PROCESSENTRY32
,*PPROCESSENTRY32
,*LPPROCESSENTRY32
;
71 typedef struct tagTHREADENTRY32
{
75 DWORD th32OwnerProcessID
;
79 } THREADENTRY32
,*PTHREADENTRY32
,*LPTHREADENTRY32
;
80 typedef struct tagMODULEENTRY32W
{
89 WCHAR szModule
[MAX_MODULE_NAME32
+ 1];
90 WCHAR szExePath
[MAX_PATH
];
91 } MODULEENTRY32W
,*PMODULEENTRY32W
,*LPMODULEENTRY32W
;
92 typedef struct tagMODULEENTRY32
{
101 char szModule
[MAX_MODULE_NAME32
+ 1];
102 char szExePath
[MAX_PATH
];
103 } MODULEENTRY32
,*PMODULEENTRY32
,*LPMODULEENTRY32
;
104 BOOL WINAPI
Heap32First(LPHEAPENTRY32
,DWORD
,DWORD
);
105 BOOL WINAPI
Heap32ListFirst(HANDLE
,LPHEAPLIST32
);
106 BOOL WINAPI
Heap32ListNext(HANDLE
,LPHEAPLIST32
);
107 BOOL WINAPI
Heap32Next(LPHEAPENTRY32
);
108 BOOL WINAPI
Module32First(HANDLE
,LPMODULEENTRY32
);
109 BOOL WINAPI
Module32FirstW(HANDLE
,LPMODULEENTRY32W
);
110 BOOL WINAPI
Module32Next(HANDLE
,LPMODULEENTRY32
);
111 BOOL WINAPI
Module32NextW(HANDLE
,LPMODULEENTRY32W
);
112 BOOL WINAPI
Process32First(HANDLE
,LPPROCESSENTRY32
);
113 BOOL WINAPI
Process32FirstW(HANDLE
,LPPROCESSENTRY32W
);
114 BOOL WINAPI
Process32Next(HANDLE
,LPPROCESSENTRY32
);
115 BOOL WINAPI
Process32NextW(HANDLE
,LPPROCESSENTRY32W
);
116 BOOL WINAPI
Thread32First(HANDLE
,LPTHREADENTRY32
);
117 BOOL WINAPI
Thread32Next(HANDLE
,LPTHREADENTRY32
);
118 BOOL WINAPI
Toolhelp32ReadProcessMemory(DWORD
,LPCVOID
,LPVOID
,DWORD
,LPDWORD
);
119 HANDLE WINAPI
CreateToolhelp32Snapshot(DWORD
,DWORD
);
121 #define LPMODULEENTRY32 LPMODULEENTRY32W
122 #define LPPROCESSENTRY32 LPPROCESSENTRY32W
123 #define MODULEENTRY32 MODULEENTRY32W
124 #define Module32First Module32FirstW
125 #define Module32Next Module32NextW
126 #define PMODULEENTRY32 PMODULEENTRY32W
127 #define PPROCESSENTRY32 PPROCESSENTRY32W
128 #define PROCESSENTRY32 PROCESSENTRY32W
129 #define Process32First Process32FirstW
130 #define Process32Next Process32NextW
135 #endif /* _TLHELP32_H */