SplitSymbols Function

Debug Help Library

SplitSymbols Function

Strips symbols from the specified image.

BOOL SplitSymbols(
  __in          PSTR ImageName,
  __in          PSTR SymbolsPath,
  __out         PSTR SymbolFilePath,
  __in          DWORD Flags



The name of the image from which to split symbols.


The subdirectory for storing symbols. This parameter is optional.


The name of the generated symbol file. This file typically has a .dbg extension.


The information to be split from the image. This parameter can be zero or a combination of the following values.

Value Meaning


Usually, an image with the symbols split off will still contain a MISC debug directory with the name of the symbol file. Therefore, the debugger can still find the symbols. Using this flag removes this link. The end result is similar to using the -debug:none switch on the Microsoft linker.


This strips off the private CodeView symbolic information when generating the symbol file.


The symbol file path contains an alternate path to locate the .pdb file.

Return Value

If the function succeeds, the return value is TRUE.

If the function fails, the return value is FALSE. To retrieve extended error information, call GetLastError.


The SplitSymbols function should be used when stripping symbols from an image. It will create a symbol file that all compatible debuggers understand. The format is defined in Winnt.h and consists of an image header, followed by the array of section headers, the FPO information, and all debugging symbolic information from the image.

If the SymbolsPath parameter is NULL, the symbol file is stored in the directory where the image exists. Otherwise, it is stored in the subdirectory below SymbolsPath that matches the extension of the image. Using this method reduces the chances of symbol file collision. For example, the symbols for myapp.exe will be in the SymbolsPath\exe directory and the symbols for myapp.dll will be in the SymbolsPath\dll directory.

All ImageHlp functions, such as this one, are single threaded. Therefore, calls from more than one thread to this function will likely result in unexpected behavior or memory corruption. To avoid this, you must synchronize all concurrent calls from more than one thread to this function.



Requires Windows Vista, Windows XP, Windows 2000 Professional, Windows NT Workstation 4.0, Windows Me, Windows 98, or Windows 95.


Requires Windows Server 2008, Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0.


Declared in Imagehlp.h.


Use Imagehlp.lib.


Requires Imagehlp.dll.

See Also

ImageHlp Functions

Send comments about this topic to Microsoft

Build date: 9/25/2007

© 2007 Microsoft Corporation. All rights reserved.