Top Description Inners Fields
com.sun.jna.platform.win32

public Interface Tlhelp32

Imports
com.sun.jna.Native, .NativeLong, .Pointer, .Structure, .Structure.FieldOrder, com.sun.jna.platform.win32.WinDef.DWORD, .WinDef.HMODULE

Interface for the Tlhelp32.h header file.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
Tlhelp32.MODULEENTRY32W

Describes an entry from a list of the modules belonging to the specified process.

public static class
Tlhelp32.PROCESSENTRY32

Describes an entry from a list of the processes residing in the system address space when a snapshot was taken.

public static class
Tlhelp32.THREADENTRY32

Describes an entry from a list of the threads executing in the system when a snapshot was taken.

Field Summary

Modifier and TypeField and Description
public static final int
public static final WinDef.DWORD
TH32CS_INHERIT

Indicates that the snapshot handle is to be inheritable.

public static final WinDef.DWORD
TH32CS_SNAPALL

Includes all processes and threads in the system, plus the heaps and modules of the process specified in th32ProcessID.

public static final WinDef.DWORD
TH32CS_SNAPHEAPLIST

Includes all heaps of the process specified in th32ProcessID in the snapshot.

public static final WinDef.DWORD
TH32CS_SNAPMODULE

Used with Kernel32.CreateToolhelp32Snapshot Includes all modules of the process specified in th32ProcessID in the snapshot.

public static final WinDef.DWORD
TH32CS_SNAPMODULE32

Includes all 32-bit modules of the process specified in th32ProcessID in the snapshot when called from a 64-bit process.

public static final WinDef.DWORD
TH32CS_SNAPPROCESS

Includes all processes in the system in the snapshot.

public static final WinDef.DWORD
TH32CS_SNAPTHREAD

Includes all threads in the system in the snapshot.

Field Detail

MAX_MODULE_NAME32back to summary
public static final int MAX_MODULE_NAME32
TH32CS_INHERITback to summary
public static final WinDef.DWORD TH32CS_INHERIT

Indicates that the snapshot handle is to be inheritable.

TH32CS_SNAPALLback to summary
public static final WinDef.DWORD TH32CS_SNAPALL

Includes all processes and threads in the system, plus the heaps and modules of the process specified in th32ProcessID.

TH32CS_SNAPHEAPLISTback to summary
public static final WinDef.DWORD TH32CS_SNAPHEAPLIST

Includes all heaps of the process specified in th32ProcessID in the snapshot. To enumerate the heaps, see Heap32ListFirst.

TH32CS_SNAPMODULEback to summary
public static final WinDef.DWORD TH32CS_SNAPMODULE

Used with Kernel32.CreateToolhelp32Snapshot
Includes all modules of the process specified in th32ProcessID in the snapshot.
To enumerate the modules, see Module32First.
If the function fails with ERROR_BAD_LENGTH, retry the function until it succeeds.
64-bit Windows: Using this flag in a 32-bit process includes the 32-bit modules of the process specified in th32ProcessID, while using it in a 64-bit process includes the 64-bit modules.
To include the 32-bit modules of the process specified in th32ProcessID from a 64-bit process, use the TH32CS_SNAPMODULE32 flag.

See Also
MSDN
TH32CS_SNAPMODULE32back to summary
public static final WinDef.DWORD TH32CS_SNAPMODULE32

Includes all 32-bit modules of the process specified in th32ProcessID in the snapshot when called from a 64-bit process. This flag can be combined with TH32CS_SNAPMODULE or TH32CS_SNAPALL. If the function fails with ERROR_BAD_LENGTH, retry the function until it succeeds.

TH32CS_SNAPPROCESSback to summary
public static final WinDef.DWORD TH32CS_SNAPPROCESS

Includes all processes in the system in the snapshot. To enumerate the processes, see Process32First.

TH32CS_SNAPTHREADback to summary
public static final WinDef.DWORD TH32CS_SNAPTHREAD

Includes all threads in the system in the snapshot. To enumerate the threads, see Thread32First.

com.sun.jna.platform.win32 back to summary

public Class Tlhelp32.MODULEENTRY32W

extends Structure
Class Inheritance
Known Direct Subclasses
com.sun.jna.platform.win32.Tlhelp32.MODULEENTRY32W.ByReference
Annotations
@FieldOrder:dwSize, th32ModuleID, th32ProcessID, GlblcntUsage, ProccntUsage, modBaseAddr, modBaseSize, hModule, szModule, szExePath

Describes an entry from a list of the modules belonging to the specified process.
See Also
MSDN

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
Tlhelp32.MODULEENTRY32W.ByReference

A representation of a MODULEENTRY32 structure as a reference

Field Summary

Modifier and TypeField and Description
public WinDef.DWORD
dwSize

The size of the structure, in bytes.

public WinDef.DWORD
GlblcntUsage

The load count of the module, which is not generally meaningful, and usually equal to 0xFFFF.

public WinDef.HMODULE
hModule

A handle to the module in the context of the owning process.

public Pointer
modBaseAddr

The base address of the module in the context of the owning process.

public WinDef.DWORD
modBaseSize

The size of the module, in bytes.

public WinDef.DWORD
ProccntUsage

The load count of the module (same as GlblcntUsage), which is not generally meaningful, and usually equal to 0xFFFF.

public char[]
szExePath

The module path.

public char[]
szModule

The module name.

public WinDef.DWORD
th32ModuleID

This member is no longer used, and is always set to one.

public WinDef.DWORD
th32ProcessID

The identifier of the process whose modules are to be examined.

Inherited from com.sun.jna.Structure:
ALIGN_DEFAULTALIGN_GNUCALIGN_MSVCALIGN_NONECALCULATE_SIZE

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The module path.
szExePath
()

public String

Returns:

The module name.
szModule
()

Inherited from com.sun.jna.Structure:
allocateMemoryallocateMemoryautoAllocateautoReadautoReadautoWriteautoWritecacheTypeInfocalculateSizeclearcreateFieldsOrdercreateFieldsOrdercreateFieldsOrdercreateFieldsOrderdataEqualsdataEqualsensureAllocatedequalsfieldOffsetgetAutoReadgetAutoWritegetFieldListgetFieldOrdergetFieldsgetNativeAlignmentgetNativeSizegetNativeSizegetPointergetStringEncodinggetStructAlignmenthashCodenewInstancenewInstancereadreadFieldreadFieldsetAlignTypesetAutoReadsetAutoSynchsetAutoWritesetStringEncodingsizesortFieldstoArraytoArraytoStringtoStringuseMemoryuseMemorywritewriteFieldwriteFieldwriteField

Field Detail

dwSizeback to summary
public WinDef.DWORD dwSize

The size of the structure, in bytes. Before calling the Module32First function, set this member to sizeof(MODULEENTRY32). If you do not initialize dwSize, Module32First fails.

GlblcntUsageback to summary
public WinDef.DWORD GlblcntUsage

The load count of the module, which is not generally meaningful, and usually equal to 0xFFFF.

hModuleback to summary
public WinDef.HMODULE hModule

A handle to the module in the context of the owning process.

modBaseAddrback to summary
public Pointer modBaseAddr

The base address of the module in the context of the owning process.

modBaseSizeback to summary
public WinDef.DWORD modBaseSize

The size of the module, in bytes.

ProccntUsageback to summary
public WinDef.DWORD ProccntUsage

The load count of the module (same as GlblcntUsage), which is not generally meaningful, and usually equal to 0xFFFF.

szExePathback to summary
public char[] szExePath

The module path.

szModuleback to summary
public char[] szModule

The module name.

th32ModuleIDback to summary
public WinDef.DWORD th32ModuleID

This member is no longer used, and is always set to one.

th32ProcessIDback to summary
public WinDef.DWORD th32ProcessID

The identifier of the process whose modules are to be examined.

Constructor Detail

MODULEENTRY32Wback to summary
public MODULEENTRY32W()
MODULEENTRY32Wback to summary
public MODULEENTRY32W(Pointer memory)

Method Detail

szExePathback to summary
public String szExePath()
Returns:String

The module path.

szModuleback to summary
public String szModule()
Returns:String

The module name.

com.sun.jna.platform.win32 back to summary

public Class Tlhelp32.MODULEENTRY32W.ByReference

extends MODULEENTRY32W
implements ByReference
Class Inheritance
All Implemented Interfaces
com.sun.jna.Structure.ByReference

A representation of a MODULEENTRY32 structure as a reference

Constructor Summary

AccessConstructor and Description
public
public

Constructor Detail

ByReferenceback to summary
public ByReference()
ByReferenceback to summary
public ByReference(Pointer memory)
com.sun.jna.platform.win32 back to summary

public Class Tlhelp32.PROCESSENTRY32

extends Structure
Class Inheritance
Known Direct Subclasses
com.sun.jna.platform.win32.Tlhelp32.PROCESSENTRY32.ByReference
Annotations
@FieldOrder:dwSize, cntUsage, th32ProcessID, th32DefaultHeapID, th32ModuleID, cntThreads, th32ParentProcessID, pcPriClassBase, dwFlags, szExeFile

Describes an entry from a list of the processes residing in the system address space when a snapshot was taken.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public WinDef.DWORD
cntThreads

The number of execution threads started by the process.

public WinDef.DWORD
cntUsage

This member is no longer used and is always set to zero.

public WinDef.DWORD
dwFlags

This member is no longer used, and is always set to zero.

public WinDef.DWORD
dwSize

The size of the structure, in bytes.

public WinDef.LONG
pcPriClassBase

The base priority of any threads created by this process.

public char[]
szExeFile

The name of the executable file for the process.

public BaseTSD.ULONG_PTR
th32DefaultHeapID

This member is no longer used and is always set to zero.

public WinDef.DWORD
th32ModuleID

This member is no longer used and is always set to zero.

public WinDef.DWORD
th32ParentProcessID

The identifier of the process that created this process (its parent process).

public WinDef.DWORD
th32ProcessID

The process identifier.

Inherited from com.sun.jna.Structure:
ALIGN_DEFAULTALIGN_GNUCALIGN_MSVCALIGN_NONECALCULATE_SIZE

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Inherited from com.sun.jna.Structure:
allocateMemoryallocateMemoryautoAllocateautoReadautoReadautoWriteautoWritecacheTypeInfocalculateSizeclearcreateFieldsOrdercreateFieldsOrdercreateFieldsOrdercreateFieldsOrderdataEqualsdataEqualsensureAllocatedequalsfieldOffsetgetAutoReadgetAutoWritegetFieldListgetFieldOrdergetFieldsgetNativeAlignmentgetNativeSizegetNativeSizegetPointergetStringEncodinggetStructAlignmenthashCodenewInstancenewInstancereadreadFieldreadFieldsetAlignTypesetAutoReadsetAutoSynchsetAutoWritesetStringEncodingsizesortFieldstoArraytoArraytoStringtoStringuseMemoryuseMemorywritewriteFieldwriteFieldwriteField

Field Detail

cntThreadsback to summary
public WinDef.DWORD cntThreads

The number of execution threads started by the process.

cntUsageback to summary
public WinDef.DWORD cntUsage

This member is no longer used and is always set to zero.

dwFlagsback to summary
public WinDef.DWORD dwFlags

This member is no longer used, and is always set to zero.

dwSizeback to summary
public WinDef.DWORD dwSize

The size of the structure, in bytes. Before calling the Process32First function, set this member to sizeof(PROCESSENTRY32). If you do not initialize dwSize, Process32First fails.

pcPriClassBaseback to summary
public WinDef.LONG pcPriClassBase

The base priority of any threads created by this process.

szExeFileback to summary
public char[] szExeFile

The name of the executable file for the process. To retrieve the full path to the executable file, call the Module32First function and check the szExePath member of the MODULEENTRY32 structure that is returned. However, if the calling process is a 32-bit process, you must call the QueryFullProcessImageName function to retrieve the full path of the executable file for a 64-bit process.

th32DefaultHeapIDback to summary
public BaseTSD.ULONG_PTR th32DefaultHeapID

This member is no longer used and is always set to zero.

th32ModuleIDback to summary
public WinDef.DWORD th32ModuleID

This member is no longer used and is always set to zero.

th32ParentProcessIDback to summary
public WinDef.DWORD th32ParentProcessID

The identifier of the process that created this process (its parent process).

th32ProcessIDback to summary
public WinDef.DWORD th32ProcessID

The process identifier.

Constructor Detail

PROCESSENTRY32back to summary
public PROCESSENTRY32()
PROCESSENTRY32back to summary
public PROCESSENTRY32(Pointer memory)
com.sun.jna.platform.win32 back to summary

public Class Tlhelp32.PROCESSENTRY32.ByReference

extends PROCESSENTRY32
implements ByReference
Class Inheritance
All Implemented Interfaces
com.sun.jna.Structure.ByReference

Constructor Summary

AccessConstructor and Description
public
public

Constructor Detail

ByReferenceback to summary
public ByReference()
ByReferenceback to summary
public ByReference(Pointer memory)
com.sun.jna.platform.win32 back to summary

public Class Tlhelp32.THREADENTRY32

extends Structure
Class Inheritance
Known Direct Subclasses
com.sun.jna.platform.win32.Tlhelp32.THREADENTRY32.ByReference
Annotations
@FieldOrder:dwSize, cntUsage, th32ThreadID, th32OwnerProcessID, tpBasePri, tpDeltaPri, dwFlags

Describes an entry from a list of the threads executing in the system when a snapshot was taken.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public int
cntUsage

This member is no longer used and is always set to zero.

public int
dwFlags

This member is no longer used and is always set to zero.

public int
dwSize

The size of the structure, in bytes.

public int
th32OwnerProcessID

The identifier of the process that created the thread.

public int
th32ThreadID

The thread identifier, compatible with the thread identifier returned by the CreateProcess function.

public NativeLong
tpBasePri

The kernel base priority level assigned to the thread.

public NativeLong
tpDeltaPri

This member is no longer used and is always set to zero.

Inherited from com.sun.jna.Structure:
ALIGN_DEFAULTALIGN_GNUCALIGN_MSVCALIGN_NONECALCULATE_SIZE

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Inherited from com.sun.jna.Structure:
allocateMemoryallocateMemoryautoAllocateautoReadautoReadautoWriteautoWritecacheTypeInfocalculateSizeclearcreateFieldsOrdercreateFieldsOrdercreateFieldsOrdercreateFieldsOrderdataEqualsdataEqualsensureAllocatedequalsfieldOffsetgetAutoReadgetAutoWritegetFieldListgetFieldOrdergetFieldsgetNativeAlignmentgetNativeSizegetNativeSizegetPointergetStringEncodinggetStructAlignmenthashCodenewInstancenewInstancereadreadFieldreadFieldsetAlignTypesetAutoReadsetAutoSynchsetAutoWritesetStringEncodingsizesortFieldstoArraytoArraytoStringtoStringuseMemoryuseMemorywritewriteFieldwriteFieldwriteField

Field Detail

cntUsageback to summary
public int cntUsage

This member is no longer used and is always set to zero.

dwFlagsback to summary
public int dwFlags

This member is no longer used and is always set to zero.

dwSizeback to summary
public int dwSize

The size of the structure, in bytes. Before calling the Thread32First function, set this member to sizeof(THREADENTRY32). If you do not initialize dwSize, Thread32First fails.

th32OwnerProcessIDback to summary
public int th32OwnerProcessID

The identifier of the process that created the thread.

th32ThreadIDback to summary
public int th32ThreadID

The thread identifier, compatible with the thread identifier returned by the CreateProcess function.

tpBasePriback to summary
public NativeLong tpBasePri

The kernel base priority level assigned to the thread. The priority is a number from 0 to 31, with 0 representing the lowest possible thread priority. For more information, see KeQueryPriorityThread.

tpDeltaPriback to summary
public NativeLong tpDeltaPri

This member is no longer used and is always set to zero.

Constructor Detail

THREADENTRY32back to summary
public THREADENTRY32()
THREADENTRY32back to summary
public THREADENTRY32(Pointer memory)
com.sun.jna.platform.win32 back to summary

public Class Tlhelp32.THREADENTRY32.ByReference

extends THREADENTRY32
implements ByReference
Class Inheritance
All Implemented Interfaces
com.sun.jna.Structure.ByReference

Constructor Summary

AccessConstructor and Description
public
public

Constructor Detail

ByReferenceback to summary
public ByReference()
ByReferenceback to summary
public ByReference(Pointer memory)