Metode IDataModelManager2::GetRootNamespace (dbgmodel.h)
Metode GetRootNamespace mengembalikan namespace layanan akar model data. Ini adalah objek yang dikelola model data dan tempat host debug menempatkan objek tertentu. Diharapkan bahwa setidaknya hierarki berikut diekspos oleh setiap 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
Sintaks
HRESULT GetRootNamespace(
IModelObject **rootNamespace
);
Parameter
rootNamespace
Namespace layanan akar model data dikembalikan di sini.
Nilai kembali
Metode ini mengembalikan HRESULT yang menunjukkan keberhasilan atau kegagalan.
Keterangan
Kode Sampel
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.
}
}
}
Persyaratan
Persyaratan | Nilai |
---|---|
Header | dbgmodel.h |