Skip to content

Latest commit

 

History

History
66 lines (48 loc) · 1.97 KB

File metadata and controls

66 lines (48 loc) · 1.97 KB
description Opens a session for querying symbols.
title IDiaDataSource::openSession
ms.date 11/04/2016
ms.topic reference
dev_langs
C++
helpviewer_keywords
IDiaDataSource::openSession method
author mikejo5000
ms.author mikejo
ms.subservice debug-diagnostics

IDiaDataSource::openSession

Opens a session for querying symbols.

Syntax

HRESULT openSession ( 
   IDiaSession** ppSession
);

Parameters

ppSession

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

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_UNEXPECTED The IDiaDataSource object has not previously been initialized with a source of symbols.
E_INVALIDARG Invalid ppSession parameter.
E_OUTOFMEMORY Insufficient memory to open the session.

Remarks

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.

Example

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

See also