home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 May
/
VPR9705A.ISO
/
VPR_DATA
/
PROGRAM
/
CBTRIAL
/
SETUP
/
DATA.Z
/
TLHELP32.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-14
|
4KB
|
129 lines
//----------------------------------------------------------------------------
// TLHelp32.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
// From: TLHelp32.pas
//----------------------------------------------------------------------------
#ifndef TLHelp32HPP
#define TLHelp32HPP
//----------------------------------------------------------------------------
#include <Windows.hpp>
#include <System.hpp>
#pragma warn -par
#pragma warn -hid
#pragma warn -inl
namespace Tlhelp32
{
//-- type declarations -------------------------------------------------------
struct THeapList32;
typedef THeapList32 *PHeapList32;
struct THeapList32
{
int dwSize;
int th32ProcessID;
int th32HeapID;
int dwFlags;
} ;
struct THeapEntry32;
typedef THeapEntry32 *PHeapEntry32;
struct THeapEntry32
{
int dwSize;
int hHandle;
int dwAddress;
int dwBlockSize;
int dwFlags;
int dwLockCount;
int dwResvd;
int th32ProcessID;
int th32HeapID;
} ;
struct TProcessEntry32;
typedef TProcessEntry32 *PProcessEntry32;
struct TProcessEntry32
{
int dwSize;
int cntUsage;
int th32ProcessID;
int th32DefaultHeapID;
int th32ModuleID;
int cntThreads;
int th32ParentProcessID;
long pcPriClassBase;
int dwFlags;
char szExeFile[260];
} ;
struct TThreadEntry32;
typedef TThreadEntry32 *PThreadEntry32;
struct TThreadEntry32
{
int dwSize;
int cntUsage;
int th32ThreadID;
int th32OwnerProcessID;
long tpBasePri;
long tpDeltaPri;
int dwFlags;
} ;
typedef TProcessEntry32 *PModuleEntry32;
struct TModuleEntry32
{
int dwSize;
int th32ModuleID;
int th32ProcessID;
int GlblcntUsage;
int ProccntUsage;
Byte *modBaseAddr;
int modBaseSize;
Windows::HINST hModule;
char szModule[257];
char szExePath[260];
} ;
//-- var, const, procedure ---------------------------------------------------
#define MAX_MODULE_NAME32 (Byte)(255)
#define TH32CS_SNAPHEAPLIST (Byte)(1)
#define TH32CS_SNAPPROCESS (Byte)(2)
#define TH32CS_SNAPTHREAD (Byte)(4)
#define TH32CS_SNAPMODULE (Byte)(8)
#define TH32CS_SNAPALL (Byte)(15)
#define TH32CS_INHERIT (int)(-2147483648)
#define HF32_DEFAULT (Byte)(1)
#define HF32_SHARED (Byte)(2)
#define LF32_FIXED (Byte)(1)
#define LF32_FREE (Byte)(2)
#define LF32_MOVEABLE (Byte)(4)
extern "C" int __stdcall CreateToolhelp32Snapshot(int dwFlags, int th32ProcessID);
extern "C" DWord __stdcall Heap32ListFirst(int hSnapshot, THeapList32 &lphl);
extern "C" DWord __stdcall Heap32ListNext(int hSnapshot, THeapList32 &lphl);
extern "C" DWord __stdcall Heap32First(THeapEntry32 &lphe, int th32ProcessID, int th32HeapID);
extern "C" DWord __stdcall Heap32Next(THeapEntry32 &lphe);
extern "C" DWord __stdcall Toolhelp32ReadProcessMemory(int th32ProcessID, void * lpBaseAddress, void
*lpBuffer, int cbRead, int &lpNumberOfBytesRead);
extern "C" DWord __stdcall Process32First(int hSnapshot, TProcessEntry32 &lppe);
extern "C" DWord __stdcall Process32Next(int hSnapshot, TProcessEntry32 &lppe);
extern "C" DWord __stdcall Thread32First(int hSnapshot, TThreadEntry32 &lpte);
extern "C" DWord __stdcall Thread32Next(int hSnapshot, TThreadEntry32 &lpte);
extern "C" DWord __stdcall Module32First(int hSnapshot, TModuleEntry32 &lpme);
extern "C" DWord __stdcall Module32Next(int hSnapshot, TModuleEntry32 &lpme);
} /* namespace Tlhelp32 */
#pragma warn .par
#pragma warn .hid
#pragma warn .inl
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Tlhelp32;
#endif
//-- end unit ----------------------------------------------------------------
#endif // TLHelp32