AllAPI Network - The KPD-Team

 
Allapi Network
 API-Guide
 ApiViewer

 API List

 
API Resources
 Tips & Tricks
 VB Tutorials
 Error Lookup
 
Misc Stuff
 VB examples
 VB Tools
 VB Links
 Top Downloads
 
This Site
 Search Engine
 Contact Form
 

Donate to AllAPI.net

CreateToolhelp32Snapshot

Takes a snapshot of the processes and the heaps, modules, and threads used by the processes.

VB4-32,5,6
Declare Function CreateToolhelp32Snapshot Lib "Kernel32" (ByVal lFlags As Long, ByVal lProcessID As Long) As Long

VB.NET
System.Diagnostics.Process

Operating Systems Supported
Requires Windows 2000 or later; Requires Windows 95 or later

Library
Kernel32

Parameter Information
· dwFlags
Flags specifying portions of the system to include in the snapshot. These values are defined: TH32CS_INHERIT
Indicates that the snapshot handle is to be inheritable.
TH32CS_SNAPALL
Equivalent to specifying the TH32CS_SNAPHEAPLIST, TH32CS_SNAPMODULE, TH32CS_SNAPPROCESS, and TH32CS_SNAPTHREAD values.
TH32CS_SNAPHEAPLIST
Includes the heap list of the specified process in the snapshot.
TH32CS_SNAPMODULE
Includes the module list of the specified process in the snapshot.
TH32CS_SNAPPROCESS
Includes the Win32 process list in the snapshot.
TH32CS_SNAPTHREAD
Includes the Win32 thread list in the snapshot.

· th32ProcessID
Process identifier. This parameter can be zero to indicate the current process. This parameter is used when the TH32CS_SNAPHEAPLIST or TH32CS_SNAPMODULE value is specified. Otherwise, it is ignored.

Return Values
Returns an open handle to the specified snapshot if successful or - 1 otherwise.

Examples

Related Functions

VB.NET Example

 

 


Copyright © 1998-2007, The Mentalis.org Team - Privacy statement
Did you find a bug on this page? Tell us!
This site is located at http://allapi.mentalis.org/