What's the appropriate method for marshalling an array of strings?
<p>I'm having an issue where I get a different memory layout when debugging with ReSharper.  </p>

<p>I have an unmanaged method that returns an array of (at most) 7-character, null-terminated strings.  When executing this method without ReSharper's debugger, the start of the "next" string is 16 bytes later.  When executing it <em>with</em> ReSharper's debugger (via ReSharper's Unit Test form choosing the "Debug Unit Tests" option), the start is 64 bytes later.</p>

<p>The method signature is similar to the snippet below.  The string array is then "created" similar to the solution <a href="http://stackoverflow.com/q/1498931/4068">here</a>.</p>

<pre><code>[return: MarshalAs(UnmanagedType.I1)]
[DllImport("myDll.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
private static extern bool GetStrings(IntPtr sourceFile,
    out IntPtr ptrToStrings,
    out uint numberOfStrings);
</code></pre>
