SymbolServer Callback Function

Debug Help Library

SymbolServer Callback 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 type defines a pointer to this callback function. SymbolServer is a placeholder for the library-defined function name.

BOOL CALLBACK SymbolServer(
  [in]                 LPCSTR params,
  [in]                 LPCSTR filename,
  [in]                 PVOID id,
  [in]                 DWORD two,
  [in]                 DWORD three,
  [out]                LPSTR path
);

Parameters

params

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

The name of the symbol file to be returned. For the default symbol server, this name cannot include path information.

id

The first of three identifying parameters (see Remarks).

two

The second of three identifying parameters (see Remarks).

three

The third of three identifying parameters (see Remarks).

path

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

Requires DbgHelp.dll 5.1 or later.

Header

Declared in DbgHelp.h.

See Also

DbgHelp FunctionsSymFindFileInPath


Send comments about this topic to Microsoft

Build date: 9/25/2007

© 2007 Microsoft Corporation. All rights reserved.