IDiaDataSource::loadDataFromPdb

Opens and prepares a program database (.pdb) file as a debug data source.

Syntax

HRESULT loadDataFromPdb (
   LPCOLESTR pdbPath
);

Parameters

pdbPath

[in] The path to the .pdb file.

Return Value

If successful, returns S_OK; otherwise, returns an error code. The following table shows the possible return values for this method.

Value Description
E_PDB_NOT_FOUND Failed to open the file, or determined that the file has an invalid format.
E_PDB_FORMAT Attempted to access a file with an obsolete format.
E_INVALIDARG Invalid parameter.
E_UNEXPECTED Data source has already been prepared.

Remarks

This method loads the debug data directly from a .pdb file.

To validate the .pdb file against specific criteria, use the IDiaDataSource::loadAndValidateDataFromPdb method.

To gain access to the data load process (through a callback mechanism), use the IDiaDataSource::loadDataForExe method.

To load a .pdb file directly from memory, use the IDiaDataSource::loadDataFromIStream method.

Example

HRESULT hr = pSource->loadDataFromPdb( L"myprog.pdb" );
if (FAILED(hr))
{
    // report error
}

See also