2002-03-09 23:29:33 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 1998 Patrick Spinler
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
1998-12-11 15:04:11 +00:00
|
|
|
#ifndef __WINE_TLHELP32_H
|
|
|
|
#define __WINE_TLHELP32_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2000-04-16 19:45:05 +00:00
|
|
|
/*
|
|
|
|
* CreateToolhelp32Snapshot
|
|
|
|
*/
|
1998-12-11 15:04:11 +00:00
|
|
|
|
|
|
|
#define TH32CS_SNAPHEAPLIST 0x00000001
|
|
|
|
#define TH32CS_SNAPPROCESS 0x00000002
|
|
|
|
#define TH32CS_SNAPTHREAD 0x00000004
|
|
|
|
#define TH32CS_SNAPMODULE 0x00000008
|
|
|
|
#define TH32CS_SNAPALL (TH32CS_SNAPHEAPLIST | TH32CS_SNAPPROCESS | TH32CS_SNAPTHREAD | TH32CS_SNAPMODULE)
|
|
|
|
#define TH32CS_INHERIT 0x80000000
|
|
|
|
|
2000-04-16 19:45:05 +00:00
|
|
|
HANDLE WINAPI CreateToolhelp32Snapshot(DWORD,DWORD);
|
|
|
|
|
|
|
|
/*
|
2002-05-31 23:06:46 +00:00
|
|
|
* thread entry list as created by CreateToolHelp32Snapshot
|
2000-04-16 19:45:05 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
typedef struct tagTHREADENTRY32
|
|
|
|
{
|
2002-05-31 23:06:46 +00:00
|
|
|
DWORD dwSize;
|
|
|
|
DWORD cntUsage;
|
|
|
|
DWORD th32ThreadID;
|
|
|
|
DWORD th32OwnerProcessID;
|
|
|
|
LONG tpBasePri;
|
|
|
|
LONG tpDeltaPri;
|
|
|
|
DWORD dwFlags;
|
|
|
|
} THREADENTRY32, *PTHREADENTRY32, *LPTHREADENTRY32;
|
2000-04-16 19:45:05 +00:00
|
|
|
|
|
|
|
BOOL WINAPI Thread32First(HANDLE,LPTHREADENTRY32);
|
|
|
|
BOOL WINAPI Thread32Next(HANDLE,LPTHREADENTRY32);
|
|
|
|
|
|
|
|
/*
|
2002-05-31 23:06:46 +00:00
|
|
|
* Process entry list as created by CreateToolHelp32Snapshot
|
2000-04-16 19:45:05 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
typedef struct tagPROCESSENTRY32
|
|
|
|
{
|
2002-05-31 23:06:46 +00:00
|
|
|
DWORD dwSize;
|
|
|
|
DWORD cntUsage;
|
|
|
|
DWORD th32ProcessID;
|
|
|
|
DWORD th32DefaultHeapID;
|
|
|
|
DWORD th32ModuleID;
|
|
|
|
DWORD cntThreads;
|
|
|
|
DWORD th32ParentProcessID;
|
|
|
|
LONG pcPriClassBase;
|
|
|
|
DWORD dwFlags;
|
|
|
|
char szExeFile[MAX_PATH];
|
|
|
|
} PROCESSENTRY32, *PPROCESSENTRY32, *LPPROCESSENTRY32;
|
2000-04-16 19:45:05 +00:00
|
|
|
|
|
|
|
typedef struct tagPROCESSENTRY32W
|
|
|
|
{
|
2002-05-31 23:06:46 +00:00
|
|
|
DWORD dwSize;
|
|
|
|
DWORD cntUsage;
|
|
|
|
DWORD th32ProcessID;
|
|
|
|
DWORD th32DefaultHeapID;
|
|
|
|
DWORD th32ModuleID;
|
|
|
|
DWORD cntThreads;
|
|
|
|
DWORD th32ParentProcessID;
|
|
|
|
LONG pcPriClassBase;
|
|
|
|
DWORD dwFlags;
|
|
|
|
WCHAR szExeFile[MAX_PATH];
|
|
|
|
} PROCESSENTRY32W, *PPROCESSENTRY32W, *LPPROCESSENTRY32W;
|
2000-04-16 19:45:05 +00:00
|
|
|
|
|
|
|
BOOL WINAPI Process32First(HANDLE,LPPROCESSENTRY32);
|
|
|
|
BOOL WINAPI Process32FirstW(HANDLE,LPPROCESSENTRY32W);
|
|
|
|
BOOL WINAPI Process32Next(HANDLE,LPPROCESSENTRY32);
|
|
|
|
BOOL WINAPI Process32NextW(HANDLE,LPPROCESSENTRY32W);
|
|
|
|
|
|
|
|
#ifdef UNICODE
|
|
|
|
#define Process32First Process32FirstW
|
|
|
|
#define Process32Next Process32NextW
|
|
|
|
#define PROCESSENTRY32 PROCESSENTRY32W
|
|
|
|
#define PPROCESSENTRY32 PPROCESSENTRY32W
|
|
|
|
#define LPPROCESSENTRY32 LPPROCESSENTRY32W
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
2002-05-31 23:06:46 +00:00
|
|
|
* Module entry list as created by CreateToolHelp32Snapshot
|
2000-04-16 19:45:05 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#define MAX_MODULE_NAME32 255
|
|
|
|
|
|
|
|
typedef struct tagMODULEENTRY32
|
|
|
|
{
|
2002-05-31 23:06:46 +00:00
|
|
|
DWORD dwSize;
|
2000-04-16 19:45:05 +00:00
|
|
|
DWORD th32ModuleID;
|
2002-05-31 23:06:46 +00:00
|
|
|
DWORD th32ProcessID;
|
2000-04-16 19:45:05 +00:00
|
|
|
DWORD GlblcntUsage;
|
|
|
|
DWORD ProccntUsage;
|
|
|
|
BYTE *modBaseAddr;
|
|
|
|
DWORD modBaseSize;
|
2002-10-04 00:27:10 +00:00
|
|
|
HMODULE hModule;
|
2000-04-16 19:45:05 +00:00
|
|
|
char szModule[MAX_MODULE_NAME32 + 1];
|
2002-05-31 23:06:46 +00:00
|
|
|
char szExePath[MAX_PATH];
|
|
|
|
} MODULEENTRY32, *PMODULEENTRY32, *LPMODULEENTRY32;
|
2000-04-16 19:45:05 +00:00
|
|
|
|
|
|
|
typedef struct tagMODULEENTRY32W
|
|
|
|
{
|
2002-05-31 23:06:46 +00:00
|
|
|
DWORD dwSize;
|
2000-04-16 19:45:05 +00:00
|
|
|
DWORD th32ModuleID;
|
2002-05-31 23:06:46 +00:00
|
|
|
DWORD th32ProcessID;
|
2000-04-16 19:45:05 +00:00
|
|
|
DWORD GlblcntUsage;
|
|
|
|
DWORD ProccntUsage;
|
|
|
|
BYTE *modBaseAddr;
|
|
|
|
DWORD modBaseSize;
|
2002-10-04 00:27:10 +00:00
|
|
|
HMODULE hModule;
|
2000-04-16 19:45:05 +00:00
|
|
|
WCHAR szModule[MAX_MODULE_NAME32 + 1];
|
2002-05-31 23:06:46 +00:00
|
|
|
WCHAR szExePath[MAX_PATH];
|
|
|
|
} MODULEENTRY32W, *PMODULEENTRY32W, *LPMODULEENTRY32W;
|
2000-04-16 19:45:05 +00:00
|
|
|
|
|
|
|
BOOL WINAPI Module32First(HANDLE,LPMODULEENTRY32);
|
|
|
|
BOOL WINAPI Module32FirstW(HANDLE,LPMODULEENTRY32W);
|
|
|
|
BOOL WINAPI Module32Next(HANDLE,LPMODULEENTRY32);
|
|
|
|
BOOL WINAPI Module32NextW(HANDLE,LPMODULEENTRY32W);
|
|
|
|
|
|
|
|
#ifdef UNICODE
|
|
|
|
#define Module32First Module32FirstW
|
|
|
|
#define Module32Next Module32NextW
|
|
|
|
#define MODULEENTRY32 MODULEENTRY32W
|
|
|
|
#define PMODULEENTRY32 PMODULEENTRY32W
|
|
|
|
#define LPMODULEENTRY32 LPMODULEENTRY32W
|
|
|
|
#endif
|
|
|
|
|
2004-10-04 19:21:35 +00:00
|
|
|
typedef struct tagHEAPLIST32
|
|
|
|
{
|
2003-09-11 03:00:11 +00:00
|
|
|
SIZE_T dwSize;
|
|
|
|
DWORD th32ProcessID;
|
|
|
|
ULONG_PTR th32HeapID;
|
|
|
|
DWORD dwFlags;
|
|
|
|
} HEAPLIST32, *PHEAPLIST32, *LPHEAPLIST32;
|
|
|
|
|
2004-10-25 21:48:28 +00:00
|
|
|
#define HF32_DEFAULT 1
|
|
|
|
#define HF32_SHARED 2
|
|
|
|
|
2003-09-11 03:00:11 +00:00
|
|
|
BOOL WINAPI Heap32ListFirst(HANDLE,LPHEAPLIST32);
|
2004-10-04 19:21:35 +00:00
|
|
|
BOOL WINAPI Heap32ListNext(HANDLE,LPHEAPLIST32);
|
2004-01-12 21:05:53 +00:00
|
|
|
BOOL WINAPI Toolhelp32ReadProcessMemory(DWORD,LPCVOID,LPVOID,SIZE_T,SIZE_T*);
|
2003-09-11 03:00:11 +00:00
|
|
|
|
2004-10-04 19:21:35 +00:00
|
|
|
typedef struct tagHEAPENTRY32
|
|
|
|
{
|
|
|
|
SIZE_T dwSize;
|
|
|
|
HANDLE hHandle;
|
|
|
|
ULONG_PTR dwAddress;
|
|
|
|
SIZE_T dwBlockSize;
|
|
|
|
DWORD dwFlags;
|
|
|
|
DWORD dwLockCount;
|
|
|
|
DWORD dwResvd;
|
|
|
|
DWORD th32ProcessID;
|
|
|
|
ULONG_PTR th32HeapID;
|
|
|
|
} HEAPENTRY32, *PHEAPENTRY32, *LPHEAPENTRY32;
|
|
|
|
|
|
|
|
BOOL WINAPI Heap32First(LPHEAPENTRY32,DWORD,ULONG_PTR);
|
|
|
|
BOOL WINAPI Heap32Next(LPHEAPENTRY32);
|
|
|
|
|
1998-12-11 15:04:11 +00:00
|
|
|
#ifdef __cplusplus
|
1999-06-26 14:58:24 +00:00
|
|
|
} /* extern "C" */
|
1998-12-11 15:04:11 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* __WINE_TLHELP32_H */
|