I had an array of structures and in the structure was an array. There were a couple of issues. The first thing was that I couldn't initialize the array while defining the structure (still haven't figured this one out yet). The second thing was that when I passed the array to unmanaged code byref and when the unmanaged dll returned I would get an error.
What ended up fixing my problem was that in my structure was a Boolean variable. When I changed that Boolean to Integer then all of a sudden everything worked.
I'll post code samples shortly.