コード例 #1
0
    public string[] GetLabels()
    {
        XmmInterface.setCurrentModelInstance(thisIndex);

        int nLabels = XmmInterface.getNbOfModels();

        string[] labels            = new string[nLabels];
        IntPtr   stringArrayIntPtr = XmmInterface.getModelLabels();

        for (int i = 0; i < nLabels; i++)
        {
            IntPtr currentIntPtr = Marshal.ReadIntPtr(stringArrayIntPtr, i * IntPtr.Size);
            labels[i] = Marshal.PtrToStringAnsi(currentIntPtr);
        }

        return(labels);
    }