public ISymbolVariable[] GetVariables(SymbolToken parent)
{
COMException Exception;
int hr;
IntPtr[] VariablePointers;
SymVariable[] Variables;
int cVars;
uint i;
hr = SymReader_GetVariables(m_Reader, parent.GetToken(), 0, out cVars, null);
if (hr < 0)
{
Exception = new COMException("Call to GetVariables failed.", hr);
throw Exception;
}
Variables = new SymVariable[cVars];
VariablePointers = new IntPtr[cVars];
hr = SymReader_GetVariables(m_Reader, parent.GetToken(), cVars, out cVars, VariablePointers);
if (hr < 0)
{
Exception = new COMException("Call to GetVariables failed.", hr);
throw Exception;
}
for (i = 0; i < cVars; i++)
{
Variables[i] = new SymVariable(VariablePointers[i]);
}
return Variables;
}