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

Last reviewed: September 27, 1995
Article ID: 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.

REFERENCES

The PVIEW95 SDK sample uses the module fields in the MODULEENTRY32 and PROCESSENTRY32 structures.


Additional reference words: 4.00 Windows 95
KBCategory: kbprg kbprb
KBSubcategory:


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 27, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.