private List<string> CStringPointerToList(IntPtr CStringPtr)
{
List<string> functionList = new List<string>();
IntPtr ptr = CStringPtr;
if ((int)CStringPtr == 0) return new List<string>();
for (int i = 0;; i++)
{
IntPtr strPtr = (IntPtr)Marshal.PtrToStructure(ptr, typeof(IntPtr));
functionList.Add(Marshal.PtrToStringAnsi(strPtr));
ptr = new IntPtr(ptr.ToInt64() + IntPtr.Size);
if (functionList[i] == "\n\n\n")
{
functionList.RemoveAt(i);
break;
}
}
return functionList;
}