public static StackFrameInfo[] GetCallstack(CpuType type) { StackFrameInfo[] callstack = new StackFrameInfo[512]; UInt32 callstackSize = 0; DebugApi.GetCallstackWrapper(type, callstack, ref callstackSize); Array.Resize(ref callstack, (int)callstackSize); return(callstack); }