ISymUnmanagedBinder::GetReaderForFile Method

Given a metadata interface and a file name, returns the correct ISymUnmanagedReader structure that will read the debugging symbols associated with the module.

This method will open the program database (PDB) file only if it is next to the executable file. This change has been made for security purposes. If you need a more extensive search for the PDB file, use the ISymUnmanagedBinder2::GetReaderForFile2 method.

HRESULT GetReaderForFile(
    [in]  IUnknown     *importer,
    [in]  const WCHAR  *fileName,
    [in]  const WCHAR  *searchPath,
    [out, retval] ISymUnmanagedReader  **pRetVal);

Parameters

  • importer
    [in] A pointer to the metadata import interface.

  • fileName
    [in] A pointer to the file name.

  • searchPath
    [in] A pointer to the search path.

  • pRetVal
    [out] A pointer that is set to the returned ISymUnmanagedReader interface.

Return Value

S_OK if the method succeeds; otherwise, E_FAIL or some other error code.

Requirements

Header: CorSym.idl, CorSym.h

See Also

Reference

ISymUnmanagedBinder Interface

ISymUnmanagedBinder2::GetReaderForFile2 Method