source: Daodan/MinGW/include/tlhelp32.h@ 1089

Last change on this file since 1089 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 3.9 KB
Line 
1/*
2 tlhelp32.h - Include file for Tool help functions.
3
4 Written by Mumit Khan <khan@nanotech.wisc.edu>
5
6 This file is part of a free library for the Win32 API.
7
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.
11
12*/
13#ifndef _TLHELP32_H
14#define _TLHELP32_H
15#if __GNUC__ >=3
16#pragma GCC system_header
17#endif
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22#define HF32_DEFAULT 1
23#define HF32_SHARED 2
24#define LF32_FIXED 0x1
25#define LF32_FREE 0x2
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
34typedef struct tagHEAPLIST32 {
35 DWORD dwSize;
36 DWORD th32ProcessID;
37 DWORD th32HeapID;
38 DWORD dwFlags;
39} HEAPLIST32,*PHEAPLIST32,*LPHEAPLIST32;
40typedef struct tagHEAPENTRY32 {
41 DWORD dwSize;
42 HANDLE hHandle;
43 DWORD dwAddress;
44 DWORD dwBlockSize;
45 DWORD dwFlags;
46 DWORD dwLockCount;
47 DWORD dwResvd;
48 DWORD th32ProcessID;
49 DWORD th32HeapID;
50} HEAPENTRY32,*PHEAPENTRY32,*LPHEAPENTRY32;
51typedef struct tagPROCESSENTRY32W {
52 DWORD dwSize;
53 DWORD cntUsage;
54 DWORD th32ProcessID;
55 DWORD th32DefaultHeapID;
56 DWORD th32ModuleID;
57 DWORD cntThreads;
58 DWORD th32ParentProcessID;
59 LONG pcPriClassBase;
60 DWORD dwFlags;
61 WCHAR szExeFile[MAX_PATH];
62} PROCESSENTRY32W,*PPROCESSENTRY32W,*LPPROCESSENTRY32W;
63typedef struct tagPROCESSENTRY32 {
64 DWORD dwSize;
65 DWORD cntUsage;
66 DWORD th32ProcessID;
67 DWORD th32DefaultHeapID;
68 DWORD th32ModuleID;
69 DWORD cntThreads;
70 DWORD th32ParentProcessID;
71 LONG pcPriClassBase;
72 DWORD dwFlags;
73 CHAR szExeFile[MAX_PATH];
74} PROCESSENTRY32,*PPROCESSENTRY32,*LPPROCESSENTRY32;
75typedef struct tagTHREADENTRY32 {
76 DWORD dwSize;
77 DWORD cntUsage;
78 DWORD th32ThreadID;
79 DWORD th32OwnerProcessID;
80 LONG tpBasePri;
81 LONG tpDeltaPri;
82 DWORD dwFlags;
83} THREADENTRY32,*PTHREADENTRY32,*LPTHREADENTRY32;
84typedef struct tagMODULEENTRY32W {
85 DWORD dwSize;
86 DWORD th32ModuleID;
87 DWORD th32ProcessID;
88 DWORD GlblcntUsage;
89 DWORD ProccntUsage;
90 BYTE *modBaseAddr;
91 DWORD modBaseSize;
92 HMODULE hModule;
93 WCHAR szModule[MAX_MODULE_NAME32 + 1];
94 WCHAR szExePath[MAX_PATH];
95} MODULEENTRY32W,*PMODULEENTRY32W,*LPMODULEENTRY32W;
96typedef struct tagMODULEENTRY32 {
97 DWORD dwSize;
98 DWORD th32ModuleID;
99 DWORD th32ProcessID;
100 DWORD GlblcntUsage;
101 DWORD ProccntUsage;
102 BYTE *modBaseAddr;
103 DWORD modBaseSize;
104 HMODULE hModule;
105 char szModule[MAX_MODULE_NAME32 + 1];
106 char szExePath[MAX_PATH];
107} MODULEENTRY32,*PMODULEENTRY32,*LPMODULEENTRY32;
108BOOL WINAPI Heap32First(LPHEAPENTRY32,DWORD,DWORD);
109BOOL WINAPI Heap32ListFirst(HANDLE,LPHEAPLIST32);
110BOOL WINAPI Heap32ListNext(HANDLE,LPHEAPLIST32);
111BOOL WINAPI Heap32Next(LPHEAPENTRY32);
112BOOL WINAPI Module32First(HANDLE,LPMODULEENTRY32);
113BOOL WINAPI Module32FirstW(HANDLE,LPMODULEENTRY32W);
114BOOL WINAPI Module32Next(HANDLE,LPMODULEENTRY32);
115BOOL WINAPI Module32NextW(HANDLE,LPMODULEENTRY32W);
116BOOL WINAPI Process32First(HANDLE,LPPROCESSENTRY32);
117BOOL WINAPI Process32FirstW(HANDLE,LPPROCESSENTRY32W);
118BOOL WINAPI Process32Next(HANDLE,LPPROCESSENTRY32);
119BOOL WINAPI Process32NextW(HANDLE,LPPROCESSENTRY32W);
120BOOL WINAPI Thread32First(HANDLE,LPTHREADENTRY32);
121BOOL WINAPI Thread32Next(HANDLE,LPTHREADENTRY32);
122BOOL WINAPI Toolhelp32ReadProcessMemory(DWORD,LPCVOID,LPVOID,DWORD,LPDWORD);
123HANDLE WINAPI CreateToolhelp32Snapshot(DWORD,DWORD);
124#ifdef UNICODE
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
135#endif /* UNICODE */
136#ifdef __cplusplus
137}
138#endif
139#endif /* _TLHELP32_H */
140
Note: See TracBrowser for help on using the repository browser.