xref: /minix3/crypto/external/bsd/openssl/dist/ms/tlhelp32.h (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc /*-
2ebfedea0SLionel Sambuc         tlhelp32.h - Include file for Tool help functions.
3ebfedea0SLionel Sambuc 
4ebfedea0SLionel Sambuc         Written by Mumit Khan <khan@nanotech.wisc.edu>
5ebfedea0SLionel Sambuc 
6ebfedea0SLionel Sambuc         This file is part of a free library for the Win32 API.
7ebfedea0SLionel Sambuc 
8ebfedea0SLionel Sambuc         This library is distributed in the hope that it will be useful,
9ebfedea0SLionel Sambuc         but WITHOUT ANY WARRANTY; without even the implied warranty of
10ebfedea0SLionel Sambuc         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11ebfedea0SLionel Sambuc 
12ebfedea0SLionel Sambuc */
13ebfedea0SLionel Sambuc #ifndef _TLHELP32_H
14ebfedea0SLionel Sambuc # define _TLHELP32_H
15ebfedea0SLionel Sambuc #ifdef __cplusplus
16ebfedea0SLionel Sambuc extern "C" {
17ebfedea0SLionel Sambuc #endif
18ebfedea0SLionel Sambuc # define HF32_DEFAULT    1
19ebfedea0SLionel Sambuc # define HF32_SHARED     2
20ebfedea0SLionel Sambuc # define LF32_FIXED      0x1
21ebfedea0SLionel Sambuc # define LF32_FREE       0x2
22ebfedea0SLionel Sambuc # define LF32_MOVEABLE   0x4
23ebfedea0SLionel Sambuc # define MAX_MODULE_NAME32       255
24ebfedea0SLionel Sambuc # define TH32CS_SNAPHEAPLIST     0x1
25ebfedea0SLionel Sambuc # define TH32CS_SNAPPROCESS      0x2
26ebfedea0SLionel Sambuc # define TH32CS_SNAPTHREAD       0x4
27ebfedea0SLionel Sambuc # define TH32CS_SNAPMODULE       0x8
28ebfedea0SLionel Sambuc # define TH32CS_SNAPALL  (TH32CS_SNAPHEAPLIST|TH32CS_SNAPPROCESS|TH32CS_SNAPTHREAD|TH32CS_SNAPMODULE)
29ebfedea0SLionel Sambuc # define TH32CS_INHERIT  0x80000000
30ebfedea0SLionel Sambuc typedef struct tagHEAPLIST32 {
31ebfedea0SLionel Sambuc     DWORD dwSize;
32ebfedea0SLionel Sambuc     DWORD th32ProcessID;
33ebfedea0SLionel Sambuc     DWORD th32HeapID;
34ebfedea0SLionel Sambuc     DWORD dwFlags;
35ebfedea0SLionel Sambuc } HEAPLIST32, *PHEAPLIST32, *LPHEAPLIST32;
36ebfedea0SLionel Sambuc typedef struct tagHEAPENTRY32 {
37ebfedea0SLionel Sambuc     DWORD dwSize;
38ebfedea0SLionel Sambuc     HANDLE hHandle;
39ebfedea0SLionel Sambuc     DWORD dwAddress;
40ebfedea0SLionel Sambuc     DWORD dwBlockSize;
41ebfedea0SLionel Sambuc     DWORD dwFlags;
42ebfedea0SLionel Sambuc     DWORD dwLockCount;
43ebfedea0SLionel Sambuc     DWORD dwResvd;
44ebfedea0SLionel Sambuc     DWORD th32ProcessID;
45ebfedea0SLionel Sambuc     DWORD th32HeapID;
46ebfedea0SLionel Sambuc } HEAPENTRY32, *PHEAPENTRY32, *LPHEAPENTRY32;
47ebfedea0SLionel Sambuc typedef struct tagPROCESSENTRY32W {
48ebfedea0SLionel Sambuc     DWORD dwSize;
49ebfedea0SLionel Sambuc     DWORD cntUsage;
50ebfedea0SLionel Sambuc     DWORD th32ProcessID;
51ebfedea0SLionel Sambuc     DWORD th32DefaultHeapID;
52ebfedea0SLionel Sambuc     DWORD th32ModuleID;
53ebfedea0SLionel Sambuc     DWORD cntThreads;
54ebfedea0SLionel Sambuc     DWORD th32ParentProcessID;
55ebfedea0SLionel Sambuc     LONG pcPriClassBase;
56ebfedea0SLionel Sambuc     DWORD dwFlags;
57ebfedea0SLionel Sambuc     WCHAR szExeFile[MAX_PATH];
58ebfedea0SLionel Sambuc } PROCESSENTRY32W, *PPROCESSENTRY32W, *LPPROCESSENTRY32W;
59ebfedea0SLionel Sambuc typedef struct tagPROCESSENTRY32 {
60ebfedea0SLionel Sambuc     DWORD dwSize;
61ebfedea0SLionel Sambuc     DWORD cntUsage;
62ebfedea0SLionel Sambuc     DWORD th32ProcessID;
63ebfedea0SLionel Sambuc     DWORD th32DefaultHeapID;
64ebfedea0SLionel Sambuc     DWORD th32ModuleID;
65ebfedea0SLionel Sambuc     DWORD cntThreads;
66ebfedea0SLionel Sambuc     DWORD th32ParentProcessID;
67ebfedea0SLionel Sambuc     LONG pcPriClassBase;
68ebfedea0SLionel Sambuc     DWORD dwFlags;
69ebfedea0SLionel Sambuc     CHAR szExeFile[MAX_PATH];
70ebfedea0SLionel Sambuc } PROCESSENTRY32, *PPROCESSENTRY32, *LPPROCESSENTRY32;
71ebfedea0SLionel Sambuc typedef struct tagTHREADENTRY32 {
72ebfedea0SLionel Sambuc     DWORD dwSize;
73ebfedea0SLionel Sambuc     DWORD cntUsage;
74ebfedea0SLionel Sambuc     DWORD th32ThreadID;
75ebfedea0SLionel Sambuc     DWORD th32OwnerProcessID;
76ebfedea0SLionel Sambuc     LONG tpBasePri;
77ebfedea0SLionel Sambuc     LONG tpDeltaPri;
78ebfedea0SLionel Sambuc     DWORD dwFlags;
79ebfedea0SLionel Sambuc } THREADENTRY32, *PTHREADENTRY32, *LPTHREADENTRY32;
80ebfedea0SLionel Sambuc typedef struct tagMODULEENTRY32W {
81ebfedea0SLionel Sambuc     DWORD dwSize;
82ebfedea0SLionel Sambuc     DWORD th32ModuleID;
83ebfedea0SLionel Sambuc     DWORD th32ProcessID;
84ebfedea0SLionel Sambuc     DWORD GlblcntUsage;
85ebfedea0SLionel Sambuc     DWORD ProccntUsage;
86ebfedea0SLionel Sambuc     BYTE *modBaseAddr;
87ebfedea0SLionel Sambuc     DWORD modBaseSize;
88ebfedea0SLionel Sambuc     HMODULE hModule;
89ebfedea0SLionel Sambuc     WCHAR szModule[MAX_MODULE_NAME32 + 1];
90ebfedea0SLionel Sambuc     WCHAR szExePath[MAX_PATH];
91ebfedea0SLionel Sambuc } MODULEENTRY32W, *PMODULEENTRY32W, *LPMODULEENTRY32W;
92ebfedea0SLionel Sambuc typedef struct tagMODULEENTRY32 {
93ebfedea0SLionel Sambuc     DWORD dwSize;
94ebfedea0SLionel Sambuc     DWORD th32ModuleID;
95ebfedea0SLionel Sambuc     DWORD th32ProcessID;
96ebfedea0SLionel Sambuc     DWORD GlblcntUsage;
97ebfedea0SLionel Sambuc     DWORD ProccntUsage;
98ebfedea0SLionel Sambuc     BYTE *modBaseAddr;
99ebfedea0SLionel Sambuc     DWORD modBaseSize;
100ebfedea0SLionel Sambuc     HMODULE hModule;
101ebfedea0SLionel Sambuc     char szModule[MAX_MODULE_NAME32 + 1];
102ebfedea0SLionel Sambuc     char szExePath[MAX_PATH];
103ebfedea0SLionel Sambuc } MODULEENTRY32, *PMODULEENTRY32, *LPMODULEENTRY32;
104ebfedea0SLionel Sambuc BOOL WINAPI Heap32First(LPHEAPENTRY32, DWORD, DWORD);
105ebfedea0SLionel Sambuc BOOL WINAPI Heap32ListFirst(HANDLE, LPHEAPLIST32);
106ebfedea0SLionel Sambuc BOOL WINAPI Heap32ListNext(HANDLE, LPHEAPLIST32);
107ebfedea0SLionel Sambuc BOOL WINAPI Heap32Next(LPHEAPENTRY32);
108ebfedea0SLionel Sambuc BOOL WINAPI Module32First(HANDLE, LPMODULEENTRY32);
109ebfedea0SLionel Sambuc BOOL WINAPI Module32FirstW(HANDLE, LPMODULEENTRY32W);
110ebfedea0SLionel Sambuc BOOL WINAPI Module32Next(HANDLE, LPMODULEENTRY32);
111ebfedea0SLionel Sambuc BOOL WINAPI Module32NextW(HANDLE, LPMODULEENTRY32W);
112ebfedea0SLionel Sambuc BOOL WINAPI Process32First(HANDLE, LPPROCESSENTRY32);
113ebfedea0SLionel Sambuc BOOL WINAPI Process32FirstW(HANDLE, LPPROCESSENTRY32W);
114ebfedea0SLionel Sambuc BOOL WINAPI Process32Next(HANDLE, LPPROCESSENTRY32);
115ebfedea0SLionel Sambuc BOOL WINAPI Process32NextW(HANDLE, LPPROCESSENTRY32W);
116ebfedea0SLionel Sambuc BOOL WINAPI Thread32First(HANDLE, LPTHREADENTRY32);
117ebfedea0SLionel Sambuc BOOL WINAPI Thread32Next(HANDLE, LPTHREADENTRY32);
118*0a6a1f1dSLionel Sambuc BOOL WINAPI Toolhelp32ReadProcessMemory(DWORD, LPCVOID, LPVOID, DWORD,
119*0a6a1f1dSLionel Sambuc                                         LPDWORD);
120ebfedea0SLionel Sambuc HANDLE WINAPI CreateToolhelp32Snapshot(DWORD, DWORD);
121ebfedea0SLionel Sambuc # ifdef UNICODE
122ebfedea0SLionel Sambuc #  define LPMODULEENTRY32 LPMODULEENTRY32W
123ebfedea0SLionel Sambuc #  define LPPROCESSENTRY32 LPPROCESSENTRY32W
124ebfedea0SLionel Sambuc #  define MODULEENTRY32 MODULEENTRY32W
125ebfedea0SLionel Sambuc #  define Module32First Module32FirstW
126ebfedea0SLionel Sambuc #  define Module32Next Module32NextW
127ebfedea0SLionel Sambuc #  define PMODULEENTRY32 PMODULEENTRY32W
128ebfedea0SLionel Sambuc #  define PPROCESSENTRY32 PPROCESSENTRY32W
129ebfedea0SLionel Sambuc #  define PROCESSENTRY32 PROCESSENTRY32W
130ebfedea0SLionel Sambuc #  define Process32First Process32FirstW
131ebfedea0SLionel Sambuc #  define Process32Next Process32NextW
132ebfedea0SLionel Sambuc # endif                         /* UNICODE */
133ebfedea0SLionel Sambuc #ifdef __cplusplus
134ebfedea0SLionel Sambuc }
135ebfedea0SLionel Sambuc #endif
136ebfedea0SLionel Sambuc #endif                          /* _TLHELP32_H */
137