Build Subversion 1.4.6 + Perl + OpenSSL 1.0
[msysgit.git] / include / tlhelp32.h
blob8f4222e34f19fbcdff7d3c7d2d22e0ad2fae1aa1
1 /*
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.
13 #ifndef _TLHELP32_H
14 #define _TLHELP32_H
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 #define HF32_DEFAULT 1
19 #define HF32_SHARED 2
20 #define LF32_FIXED 0x1
21 #define LF32_FREE 0x2
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 {
31 DWORD dwSize;
32 DWORD th32ProcessID;
33 DWORD th32HeapID;
34 DWORD dwFlags;
35 } HEAPLIST32,*PHEAPLIST32,*LPHEAPLIST32;
36 typedef struct tagHEAPENTRY32 {
37 DWORD dwSize;
38 HANDLE hHandle;
39 DWORD dwAddress;
40 DWORD dwBlockSize;
41 DWORD dwFlags;
42 DWORD dwLockCount;
43 DWORD dwResvd;
44 DWORD th32ProcessID;
45 DWORD th32HeapID;
46 } HEAPENTRY32,*PHEAPENTRY32,*LPHEAPENTRY32;
47 typedef struct tagPROCESSENTRY32W {
48 DWORD dwSize;
49 DWORD cntUsage;
50 DWORD th32ProcessID;
51 DWORD th32DefaultHeapID;
52 DWORD th32ModuleID;
53 DWORD cntThreads;
54 DWORD th32ParentProcessID;
55 LONG pcPriClassBase;
56 DWORD dwFlags;
57 WCHAR szExeFile[MAX_PATH];
58 } PROCESSENTRY32W,*PPROCESSENTRY32W,*LPPROCESSENTRY32W;
59 typedef struct tagPROCESSENTRY32 {
60 DWORD dwSize;
61 DWORD cntUsage;
62 DWORD th32ProcessID;
63 DWORD th32DefaultHeapID;
64 DWORD th32ModuleID;
65 DWORD cntThreads;
66 DWORD th32ParentProcessID;
67 LONG pcPriClassBase;
68 DWORD dwFlags;
69 CHAR szExeFile[MAX_PATH];
70 } PROCESSENTRY32,*PPROCESSENTRY32,*LPPROCESSENTRY32;
71 typedef struct tagTHREADENTRY32 {
72 DWORD dwSize;
73 DWORD cntUsage;
74 DWORD th32ThreadID;
75 DWORD th32OwnerProcessID;
76 LONG tpBasePri;
77 LONG tpDeltaPri;
78 DWORD dwFlags;
79 } THREADENTRY32,*PTHREADENTRY32,*LPTHREADENTRY32;
80 typedef struct tagMODULEENTRY32W {
81 DWORD dwSize;
82 DWORD th32ModuleID;
83 DWORD th32ProcessID;
84 DWORD GlblcntUsage;
85 DWORD ProccntUsage;
86 BYTE *modBaseAddr;
87 DWORD modBaseSize;
88 HMODULE hModule;
89 WCHAR szModule[MAX_MODULE_NAME32 + 1];
90 WCHAR szExePath[MAX_PATH];
91 } MODULEENTRY32W,*PMODULEENTRY32W,*LPMODULEENTRY32W;
92 typedef struct tagMODULEENTRY32 {
93 DWORD dwSize;
94 DWORD th32ModuleID;
95 DWORD th32ProcessID;
96 DWORD GlblcntUsage;
97 DWORD ProccntUsage;
98 BYTE *modBaseAddr;
99 DWORD modBaseSize;
100 HMODULE hModule;
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);
120 #ifdef UNICODE
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
131 #endif /* UNICODE */
132 #ifdef __cplusplus
134 #endif
135 #endif /* _TLHELP32_H */