title: Porting C struct to C#
body: <p>I'm Porting C code to C# and I have some doubts.</p>
  
  <p>Consider this structure:</p>
  
  <pre><code>typedef struct
  {
    uint32_t       w;
    uint32_t       h;
    uint32_t       f_cc;
    uint32_t       st;
    unsigned char *pl[4];
    int32_t        strd[4];
    void         (*done)(void *thisobj);
    void          *e_cc;
    uint32_t       rsrvd2;
    uint32_t       rsrvd3;
  } f_tt;
  </code></pre>
  
  <p>I've done this and it does not work (probably because it's wrong :-/ ):</p>
  
  <pre><code>[StructLayout(LayoutKind.Sequential, Pack = 1)]
  public struct f_tt
  {
      public uint w;
      public uint h;
      public uint f_cc;
      public uint st;
      [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
      public Byte[] pl;
      [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
      public int[] strd;
      public delegate void done(IntPtr thisobj);
      public delegate void e_cc();
      public uint rsrvd2;
      public uint rsrvd3;
  }
  </code></pre>
  
  <p>Can someone advise me how to do this i c#?</p>
  
  <pre><code>  void         (*done)(void *thisobj);
    void          *e_cc;
  </code></pre>
  
  <p>Thank you!</p>