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