IDiaDataSource

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at IDiaDataSource.

Initiates access to a source of debugging symbols.

IDiaDataSource : IUnknown  

The following table shows the methods of IDiaDataSource.

MethodDescription
IDiaDataSource::get_lastErrorRetrieves the file name for the last load error.
IDiaDataSource::loadDataFromPdbOpens and prepares a program database (.pdb) file as a debug data source.
IDiaDataSource::loadAndValidateDataFromPdbOpens and verifies that the program database (.pdb) file matches the signature information provided; prepares the .pdb file as a debug data source.
IDiaDataSource::loadDataForExeOpens and prepares the debug data associated with the .exe/.dll file.
IDiaDataSource::loadDataFromIStreamPrepares the debug data stored in a program database (.pdb) file accessed through an in-memory data stream.
IDiaDataSource::openSessionOpens a session for querying symbols.

A call to one of the load methods of the IDiaDataSource interface opens the symbol source. A successful call to the IDiaDataSource::openSession method returns an IDiaSession interface that supports querying the data source. If the load method returns a file-related error then the IDiaDataSource::get_lastError method return value contains the file name associated with the error.

This interface is obtained by calling the CoCreateInstance function with the class identifier CLSID_DiaSource and the interface ID of IID_IDiaDataSource. The example shows how this interface is obtained.

  
      IDiaDataSource* pSource;  
HRESULT hr = CoCreateInstance(CLSID_DiaSource,  
                              NULL,  
                              CLSCTX_INPROC_SERVER,  
                              IID_IDiaDataSource,  
                              (void**) &pSource);  
if (FAILED(hr))  
{  
    // Report error and exit  
}  

Header: Dia2.h

Library: diaguids.lib

DLL: msdia80.dll

Interfaces (Debug Interface Access SDK)

Show: