1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
6 using System.Runtime.InteropServices;
8 #pragma warning disable 618
10 #region Struct Definition
11 [StructLayout(LayoutKind.Sequential)]
28 [StructLayout(LayoutKind.Sequential)]
29 public struct Struct_Sequential
33 public uint[] ulongArr;
35 public short[] shortArr;
37 public ushort[] ushortArr;
39 public long[] long64Arr;
41 public ulong[] ulong64Arr;
43 public double[] doubleArr;
45 public float[] floatArr;
47 public byte[] byteArr;
50 //helper field definition, just match structure member verification func on C++ side
51 [MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_BSTR)]
52 public string[] bstrArr;
54 public bool[] boolArr;
57 [StructLayout(LayoutKind.Explicit)]
58 public struct Struct_Explicit
64 public uint[] ulongArr;
67 public short[] shortArr;
70 public ushort[] ushortArr;
73 public long[] long64Arr;
76 public ulong[] ulong64Arr;
79 public double[] doubleArr;
82 public float[] floatArr;
85 public byte[] byteArr;
88 [MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_BSTR)]
89 public string[] bstrArr;
92 public bool[] boolArr;
95 [StructLayout(LayoutKind.Sequential)]
96 public struct Struct_SeqWithArrOfStr
101 [StructLayout(LayoutKind.Explicit)]
102 public struct Struct_ExpWithArrOfStr
109 #region Class Definition
110 [StructLayout(LayoutKind.Sequential)]
111 public class Class_Sequential
113 public int[] longArr;
115 public uint[] ulongArr;
117 public short[] shortArr;
119 public ushort[] ushortArr;
121 public long[] long64Arr;
123 public ulong[] ulong64Arr;
125 public double[] doubleArr;
127 public float[] floatArr;
129 public byte[] byteArr;
131 [MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_BSTR)]
132 public string[] bstrArr;
134 public bool[] boolArr;
137 [StructLayout(LayoutKind.Explicit)]
138 public class Class_Explicit
141 public int[] longArr;
144 public uint[] ulongArr;
147 public short[] shortArr;
150 public ushort[] ushortArr;
153 public long[] long64Arr;
156 public ulong[] ulong64Arr;
159 public double[] doubleArr;
162 public float[] floatArr;
165 public byte[] byteArr;
168 [MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_BSTR)]
169 public string[] bstrArr;
171 [FieldOffset(10 * 8)]
172 public bool[] boolArr;
175 [StructLayout(LayoutKind.Sequential)]
176 public class Class_SeqWithArrOfStr
181 [StructLayout(LayoutKind.Explicit)]
182 public class Class_ExpWithArrOfStr
189 #pragma warning restore 618