Compartilhar via


IDiaDataSource

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Initiates access to a source of debugging symbols.

Syntax

IDiaDataSource : IUnknown  

Methods in Vtable Order

The following table shows the methods of IDiaDataSource.

Method Description
IDiaDataSource::get_lastError Retrieves the file name for the last load error.
IDiaDataSource::loadDataFromPdb Opens and prepares a program database (.pdb) file as a debug data source.
IDiaDataSource::loadAndValidateDataFromPdb Opens and verifies that the program database (.pdb) file matches the signature information provided; prepares the .pdb file as a debug data source.
IDiaDataSource::loadDataForExe Opens and prepares the debug data associated with the .exe/.dll file.
IDiaDataSource::loadDataFromIStream Prepares the debug data stored in a program database (.pdb) file accessed through an in-memory data stream.
IDiaDataSource::openSession Opens a session for querying symbols.

Remarks

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.

Notes for Callers

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.

Example

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

Requirements

Header: Dia2.h

Library: diaguids.lib

DLL: msdia80.dll

See Also

Interfaces (Debug Interface Access SDK)