Click or drag to resize
Xcalibur Systems LLC Logo

ProcessHelperCreateToolhelp32Snapshot Method

Takes a snapshot of the specified processes, as well as the heaps, modules, and threads used by these processes.

CreateToolhelp32Snapshot function


Namespace: Xcalibur.NativeMethods.V2.Processes
Assembly: Xcalibur.NativeMethods.V2 (in Xcalibur.NativeMethods.V2.dll) Version: 1.0.1.0
Syntax
[DllImportAttribute("kernel32.dll", SetLastError = true)]
public static IntPtr CreateToolhelp32Snapshot(
	SnapshotFlags flags,
	uint processId
)

Parameters

flags  SnapshotFlags
The portions of the system to be included in the snapshot. This parameter can be one or more of the following values. See also .
processId  UInt32
The process identifier of the process to be included in the snapshot. This parameter can be zero to indicate the current process. This parameter is used when the , , , or value is specified. Otherwise, it is ignored and all processes are included in the snapshot.

Return Value

IntPtr
If the function succeeds, it returns an open handle to the specified snapshot. If the function fails, it returns INVALID_HANDLE_VALUE (IntPtr(-1)).To get extended error information, call . Possible error codes include .
See Also