public ISymbolNamespace[] GetNamespaces()
{
COMException Exception;
int hr;
uint i;
int cNamespaces;
IntPtr[] NamespacePointers;
SymNamespace[] Namespaces;
hr = SymReader_GetNamespaces(m_Reader, 0, out cNamespaces, null);
if (hr < 0)
{
Exception = new COMException("Call to GetNamespaces failed.", hr);
throw Exception;
}
NamespacePointers = new IntPtr[cNamespaces];
Namespaces = new SymNamespace[cNamespaces];
hr = SymReader_GetNamespaces(m_Reader, cNamespaces, out cNamespaces, NamespacePointers);
if (hr < 0)
{
Exception = new COMException("Call to GetNamespaces failed.", hr);
throw Exception;
}
for (i = 0; i < cNamespaces; i++)
{
Namespaces[i] = new SymNamespace(NamespacePointers[i]);
}
return Namespaces;
}
}