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

La méthode GetRootNamespace retourne l’espace de noms racine du modèle de données. Il s’agit d’un objet que le modèle de données gère et dans lequel l’hôte de débogage place certains objets. Il est attendu qu’au moins la hiérarchie suivante soit exposée par chaque hôte :

• 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

Syntaxe

HRESULT GetRootNamespace(
  IModelObject **rootNamespace
);

Paramètres

rootNamespace

L’espace de noms racine du modèle de données est retourné ici.

Valeur retournée

Cette méthode retourne HRESULT qui indique la réussite ou l’échec.

Remarques

Exemple de Code

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

Configuration requise

Condition requise Valeur
En-tête dbgmodel.h