Microsoft KB Archive/137288

{|
 * width="100%"|

PRB: 16-bit Module Name Not Included in Toolhelp32 Snapshots

 * }

Q137288

-

The information in this article applies to:


 * Microsoft Win32 Software Development Kit (SDK), version 4.0

-

SYMPTOMS
The snapshots returned by Toolhelp32 identify 16-bit processes as the KERNEL32 module. In other words, the szExePath field of the MODULEENTRY32 structure contains KERNEL32.DLL for 16-bit Windows-based applications. The correct module is given for Win32-based applications.

STATUS
This behavior is by design.

MORE INFORMATION
16-bit modules are very different from 32-bit modules and code that manipulates the internals of one kind usually must be rewritten for the other kind. The most common exception is code that prints out the name of the .exe file. This information can be obtained, for both 16-bit and 32-bit applications, from the szExeFile member of the PROCESSENTRY32 structure.

NOTE: The szExeFile field was added after the first beta of Windows 95, so some prerelease SDK header files do not include this field. It is important that you use the latest SDK header files for development.