Microsoft KB Archive/217070

{|
 * width="100%"|

INFO: Symbol Types of a Module

 * }

Q217070

-

The information in this article applies to:


 * Microsoft Win32 Application Programming Interface (API), included with:
 * Microsoft Windows NT Server version 4.0
 * Microsoft Windows NT Workstation version 4.0
 * Microsoft Windows 98
 * Microsoft Windows 95
 * the operating system: Microsoft Windows 2000

-

SUMMARY
This article explains how the IMAGEHLP library analyzes symbolic information depending on the type of symbols that are generated for any executable file or dynamic link library (DLL). The symbol type may be particularly useful for an application which needs symbolic information.

MORE INFORMATION
Following are two important components involved in using IMAGEHLP.


 * 1) The Imagehlp.dll comes with the Windows NT operating system. This DLL is also a re-dispatchable component on Windows 95/98. For the redistribution policy, please refer to the Platform SDK license information.
 * 2) Mspdbxx.dll or Msdbi.dll are non-redistributable components. Mspdbxx.dll is shipped with the Microsoft Visual C++ tools and Msdbi.dll comes with the Windbg debugger component.

If a module is built to generate CodeView debug information in a .pdb file, Imagehlp.dll will need either Mspdbxx.dll (XX corresponds to the version of Microsoft Visual C++ 32-bit Edition used to generate the debug information, usually this is version 4.1, 4.2, or 5.0.) or Msdbi.dll (Microsoft Visual C++ 6.0) depending on the .pdb file format for all symbol handling functions.

If you are using the Microsoft Visual C++ development environment, select the following linker settings in the Link tab under Project Settings:


 * Select Use program database in the Customize category.
 * Select either Microsoft Format or Both formats in the Debug Info section of the Debug category

If the CodeView debug information is in a .pdb file, IMAGEHLP will dynamically load either one of the available Mspdbxx.dlls or Msdbi.dll to analyze the debug format.

If the debug information is embedded inside an executable file, a DLL, or is stripped and placed in a .dbg file, the Imagehlp.dll is sufficient for using all symbol handler functions. The symbol type information can be obtained by using the SymGetModuleInfo IMAGEHLP function where SymType is the corresponding member in the IMAGEHLP_MODULE structure. If SymType is set to SymPdb, IMAGEHLP will dynamically load one of the available Mspdbxx.dlls or Msdbi.dll that can analyze the debug format. The symbol type is SymPdb if the CodeView symbols are placed in a .pdb file. If the CodeView symbols are embedded inside an executable file, a DLL, or stripped and placed in a .dbg file, the symbol type will be SymCv. If the symbol type is SymCv, SymCoff, SymSym, or anything other than SymPdb, then Imagehlp.dll uses all symbol handler functions.