IDiaDataSource::openSession

 

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::openSession.

Opens a session for querying symbols.

HRESULT openSession (   
   IDiaSession** ppSession  
);  

Parameters

ppSession
[out] Returns an IDiaSession object representing the open session.

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

ValueDescription
E_UNEXPECTEDThe IDiaDataSource object has not previously been initialized with a source of symbols.
E_INVALIDARGInvalid ppSession parameter.
E_OUTOFMEMORYInsufficient memory to open the session.

This method opens an IDiaSession object for a data source.

IDiaSession objects implement queries into the data source. A session manages one address space for each set of debug symbols. If the .exe or .dll file described by the data source symbols is active in multiple address ranges (for example, because multiple processes have it loaded), then one session for each address range should be used.

IDiaSession* pSession;  
HRESULT hr = pSource->openSession( &pSession );  
if (FAILED(hr))  
{  
   // report error  
}  

IDiaDataSource
Overview
IDiaSession
Querying the .Pdb File

Show: