Compartilhar via


Método IDataModelManager2::GetRootNamespace (dbgmodel.h)

O método GetRootNamespace retorna o namespace raiz do modelo de dados. Esse é um objeto que o modelo de dados gerencia e no qual o host de depuração coloca determinados objetos. Espera-se que pelo menos a seguinte hierarquia seja exposta por cada host:

• Debugger - represents the debugger which is hosting the data model

    o Sessions - a collection of sessions which represent each debug target 

         Processes -- a collection of processes which represent each process in the debug target 

            - Threads -- a collection of threads which represent each thread within a given process in the debug target

Sintaxe

HRESULT GetRootNamespace(
  IModelObject **rootNamespace
);

Parâmetros

rootNamespace

O namespace raiz do modelo de dados é retornado aqui.

Retornar valor

Esse método retorna HRESULT que indica êxito ou falha.

Comentários

Código de exemplo

ComPtr<IDataModelManager> spManager; /* get the data model manager */

ComPtr<IModelObject> spRootNamespace;
if (SUCCEEDED(spManager->GetRootNamespace(&spRootNamespace)))
{
    // We've gotten the root namespace successfully.  Find the Debugger property.
    ComPtr<IModelObject> spDebugger;
    if (SUCCEEDED(spRootNamespace->GetKeyValue(L"Debugger", &spDebugger, nullptr)))
    {
        // We've gotten the "Debugger" property successfully.  Find the 
        // Sessions property.
        ComPtr<IModelObject> spSessions;
        if (SUCCEEDED(spDebugger->GetKeyValue(L"Sessions", &spSessions, nullptr)))
        {
            // We've gotten the "Sessions" property successfully.
        }
    }
}

Interface IDataModelManager2

Requisitos

Requisito Valor
Cabeçalho dbgmodel.h