Share via


SymbolServer function

An entry point to the symbol server DLL. It is used to locate a symbol file. This function should not be called directly.

The PSYMBOLSERVERPROC, PSYMBOLSERVERPROCA, and PSYMBOLSERVERPROCW types define a pointer to this callback function. SymbolServer is a placeholder for the library-defined function name.

Syntax

BOOL CALLBACK SymbolServer(
  _In_  PCTSTR params,
  _In_  PCTSTR filename,
  _In_  PVOID  id,
  _In_  DWORD  two,
  _In_  DWORD  three,
  _Out_ PTSTR  path
);

Parameters

  • params [in]
    The server-specific information. This information is used to identify which store to use for locating symbols. For more information, see Symbol Servers and Symbol Stores.

  • filename [in]
    The name of the symbol file to be returned. For the default symbol server, this name cannot include path information.

  • id [in]
    The first of three identifying parameters (see Remarks).

  • two [in]
    The second of three identifying parameters (see Remarks).

  • three [in]
    The third of three identifying parameters (see Remarks).

  • path [out]
    A pointer to a buffer that receives the fully qualified path to the symbol file. This buffer should be at least MAX_PATH bytes.

Return value

If the server locates a valid symbol file, it returns TRUE; otherwise, it returns FALSE and GetLastError returns a value that indicates why the symbol file was not returned.

Remarks

The identifying parameters are to be filled in as follows:

  • If DbgHelp is looking for a .dbg file, the id parameter contains the TimeDateStamp of the original image as found in its PE header. Parameter two contains the SizeOfImage field, also extracted from the PE header. Parameter three is unused and set to zero.
  • If DbgHelp is looking for a .pdb file, the id parameter contains a pointer to the PDB GUID. Parameter two contains the PDB age. Parameter three is unused and set to zero.
  • If DbgHelp is looking for any other type of image, such as an executable file, it is probably being called through the SymFindFileInPath function. In this case, the parameters are opaque to DbgHelp. However, if this function is being used to retrieve an executable file, it is expected that the parameters will be filled in as for a .dbg file, using TimeDateStamp and the image size as parameters.

Requirements

Redistributable

DbgHelp.dll 5.1 or later

Header

DbgHelp.h

DLL

SymSrv.dll

Unicode and ANSI names

SymbolServerW (Unicode) and SymbolServer (ANSI)

See also

DbgHelp Functions

SymFindFileInPath