IDataModelManager::GetRootNamespace-Methode (dbgmodel.h)

Die GetRootNamespace-Methode gibt den Stammnamespace des Datenmodells zurück. Dies ist ein Objekt, das vom Datenmodell verwaltet wird und in das der Debughost bestimmte Objekte platziert. Es wird erwartet, dass mindestens die folgende Hierarchie von jedem Host verfügbar gemacht wird:

• 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

Syntax

HRESULT GetRootNamespace(
  IModelObject **rootNamespace
);

Parameter

rootNamespace

Der Stammnamespace des Datenmodells wird hier zurückgegeben.

Rückgabewert

Diese Methode gibt HRESULT zurück, das auf Erfolg oder Fehler hinweist.

Hinweise

Beispielcode

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.
        }
    }
}

Anforderungen

Anforderung Wert
Header dbgmodel.h

Weitere Informationen

IDataModelManager-Schnittstelle