title: how to display the content of a structure in a listbox in a c# windows form application
body: <p>Dunno if I'm going the right way about this? The contents of the structure below is defined elsewhere. when I run the code it is just outputting a list of 4 zeros. any help would be greatly appreciated.....</p>
  
  <pre><code>public class NativeMethods
  {
  
      public struct FT_DEVICE_LIST_INFO_NODE
      {
          public uint ID;
          public uint LocId;       
          public string SerialNumber;           
          public string Description;
      }
  
      [DllImportAttribute(@"C:\Users\Brendan\Documents\libMPSSE.dll", EntryPoint = "SPI_GetNumChannels")]
      public static extern uint SPI_GetChannelInfo(uint index, ref FT_DEVICE_LIST_INFO_NODE chanInfo);
  }
  
  
  
  public partial class Form1 : Form
  {
      List&lt;uint&gt; items = new List&lt;uint&gt;();
  
      public Form1()
      {
  
          InitializeComponent();
  
          NativeMethods.FT_DEVICE_LIST_INFO_NODE devlist = new NativeMethods.FT_DEVICE_LIST_INFO_NODE();
  
          for(uint x=0;x&lt;4;x++)
          {
  
          index = 0;
          items.Add(NativeMethods.SPI_GetChannelInfo(index, ref devlist));
  
           }
          listBox.DataSource = items;
      }
  }
  </code></pre>