-
-
Save tritao/7e62c71ffe57d6bc326e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Runtime.InteropServices; | |
public unsafe partial class Qux | |
{ | |
[StructLayout(LayoutKind.Explicit, Size = 12)] | |
public partial struct Internal | |
{ | |
[FieldOffset(0)] | |
public fixed int array[3]; | |
} | |
} | |
public class Program | |
{ | |
[DllImport("CSharpTemp.Native", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, | |
EntryPoint="_ZN3Baz9returnQuxEv")] | |
internal static extern Qux.Internal ReturnQux_0(global::System.IntPtr instance); | |
static void Main(string[] args) | |
{ | |
ReturnQux_0(IntPtr.Zero); | |
} | |
} |
Author
tritao
commented
Jul 15, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment