-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Expand file tree
/
Copy pathStructABI.cs
More file actions
3739 lines (3064 loc) · 101 KB
/
StructABI.cs
File metadata and controls
3739 lines (3064 loc) · 101 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using Xunit;
struct SingleByte
{
public byte Byte;
public static SingleByte Get()
{
return new SingleByte { Byte = 42 };
}
public bool Equals(SingleByte other)
{
return Byte == 42 && Byte == other.Byte;
}
}
struct SingleLong
{
public ulong Long;
public static SingleLong Get()
{
return new SingleLong { Long = 0xfeedfaceabadf00d };
}
public bool Equals(SingleLong other)
{
return Long == other.Long && Long == 0xfeedfaceabadf00d;
}
}
struct SingleFloat
{
public float Float;
public static SingleFloat Get()
{
return new SingleFloat { Float = 3.14159f };
}
public bool Equals(SingleFloat other)
{
return Float == other.Float;
}
}
struct SingleDouble
{
public double Double;
public static SingleDouble Get()
{
return new SingleDouble { Double = 3.14159d };
}
public bool Equals(SingleDouble other)
{
return Double == other.Double && Double == 3.14159d;
}
}
struct ByteAndFloat
{
public byte Byte;
public float Float;
public static ByteAndFloat Get()
{
return new ByteAndFloat { Byte = 42, Float = 3.14159f };
}
public bool Equals(ByteAndFloat other)
{
return Byte == other.Byte && Float == other.Float &&
Byte == 42 && Float == 3.14159f;
}
}
struct FloatAndByte
{
public float Float;
public byte Byte;
public static FloatAndByte Get()
{
return new FloatAndByte { Byte = 42, Float = 3.14159f };
}
public bool Equals(FloatAndByte other)
{
return Byte == other.Byte && Float == other.Float &&
Byte == 42 && Float == 3.14159f;
}
}
struct LongAndFloat
{
public ulong Long;
public float Float;
public static LongAndFloat Get()
{
return new LongAndFloat { Long = 0xfeedfaceabadf00d, Float = 3.14159f };
}
public bool Equals(LongAndFloat other)
{
return Long == other.Long && Float == other.Float &&
Long == 0xfeedfaceabadf00d && Float == 3.14159f;
}
}
struct ByteAndDouble
{
public byte Byte;
public double Double;
public static ByteAndDouble Get()
{
return new ByteAndDouble { Byte = 42, Double = 3.14159d };
}
public bool Equals(ByteAndDouble other)
{
return Byte == other.Byte && Double == other.Double;
}
}
struct DoubleAndByte
{
public double Double;
public byte Byte;
public static DoubleAndByte Get()
{
return new DoubleAndByte { Byte = 42, Double = 3.14159d };
}
public bool Equals(DoubleAndByte other)
{
return Byte == other.Byte && Double == other.Double;
}
}
unsafe struct PointerAndByte
{
public void* Pointer;
public byte Byte;
public static PointerAndByte Get()
{
byte unused;
return new PointerAndByte { Pointer = &unused, Byte = 42 };
}
public bool Equals(PointerAndByte other)
{
return Pointer == other.Pointer && Byte == other.Byte;
}
}
unsafe struct ByteAndPointer
{
public byte Byte;
public void* Pointer;
public static ByteAndPointer Get()
{
byte unused;
return new ByteAndPointer { Pointer = &unused, Byte = 42 };
}
public bool Equals(ByteAndPointer other)
{
return Pointer == other.Pointer && Byte == other.Byte;
}
}
unsafe struct ByteFloatAndPointer
{
public byte Byte;
public float Float;
public void* Pointer;
public static ByteFloatAndPointer Get()
{
byte unused;
return new ByteFloatAndPointer { Pointer = &unused, Float = 3.14159f, Byte = 42 };
}
public bool Equals(ByteFloatAndPointer other)
{
return Pointer == other.Pointer && Float == other.Float && Byte == other.Byte;
}
}
unsafe struct PointerFloatAndByte
{
public void* Pointer;
public float Float;
public byte Byte;
public static PointerFloatAndByte Get()
{
byte unused;
return new PointerFloatAndByte { Pointer = &unused, Float = 3.14159f, Byte = 42 };
}
public bool Equals(PointerFloatAndByte other)
{
return Pointer == other.Pointer && Float == other.Float && Byte == other.Byte;
}
}
struct ShortIntFloatIntPtr
{
public short Short;
public int Int;
public float Float;
public IntPtr Pointer;
public static ShortIntFloatIntPtr Get()
{
IntPtr unused = new IntPtr(42);
return new ShortIntFloatIntPtr { Short = 10, Int = 11, Float = 3.14f, Pointer = unused };
}
public bool Equals(ShortIntFloatIntPtr other)
{
return Short == other.Short && Int == other.Int && Float == other.Float && Pointer == other.Pointer;
}
}
struct TwoLongs
{
public ulong Long1;
public ulong Long2;
public static TwoLongs Get()
{
return new TwoLongs { Long1 = 0xb01dfaceddebac1e, Long2 = 0xfeedfaceabadf00d };
}
public bool Equals(TwoLongs other)
{
return Long1 == other.Long1 && Long2 == other.Long2;
}
}
struct TwoFloats
{
public float Float1;
public float Float2;
public static TwoFloats Get()
{
return new TwoFloats { Float1 = 3.14159f, Float2 = 2.71828f };
}
public bool Equals(TwoFloats other)
{
return Float1 == other.Float1 && Float2 == other.Float2;
}
}
struct TwoDoubles
{
public double Double1;
public double Double2;
public static TwoDoubles Get()
{
return new TwoDoubles { Double1 = 3.14159d, Double2 = 2.71828d };
}
public bool Equals(TwoDoubles other)
{
return Double1 == other.Double1 && Double2 == other.Double2;
}
}
struct FourLongs
{
public ulong Long1;
public ulong Long2;
public ulong Long3;
public ulong Long4;
public static FourLongs Get()
{
return new FourLongs { Long1 = 0xb01dfaceddebac1e, Long2 = 0xfeedfaceabadf00d, Long3 = 0xbeeff00fdeadcafe, Long4 = 0xabadf001ea75fee7 };
}
public bool Equals(FourLongs other)
{
return Long1 == other.Long1 && Long2 == other.Long2 && Long3 == other.Long3 && Long4 == other.Long4;
}
}
struct FourDoubles
{
public double Double1;
public double Double2;
public double Double3;
public double Double4;
public static FourDoubles Get()
{
return new FourDoubles { Double1 = 3.14159d, Double2 = 2.71828d, Double3 = 1.61803d, Double4 = 0.69314d };
}
public bool Equals(FourDoubles other)
{
return Double1 == other.Double1 && Double2 == other.Double2 && Double3 == other.Double3 && Double4 == other.Double4;
}
}
unsafe struct InlineArray1
{
public fixed byte Array[16];
public static InlineArray1 Get()
{
var val = new InlineArray1();
for (int i = 0; i < 16; i++)
{
val.Array[i] = (byte)(i + 1);
}
return val;
}
public bool Equals(InlineArray1 other)
{
fixed (byte* arr = Array)
{
for (int i = 0; i < 16; i++)
{
if (arr[i] != other.Array[i])
{
return false;
}
}
}
return true;
}
}
unsafe struct InlineArray2
{
public fixed float Array[4];
public static InlineArray2 Get()
{
var val = new InlineArray2();
for (int i = 0; i < 4; i++)
{
val.Array[i] = (float)(i + 1);
}
return val;
}
public bool Equals(InlineArray2 other)
{
fixed (float* arr = Array)
{
for (int i = 0; i < 4; i++)
{
if (arr[i] != other.Array[i])
{
return false;
}
}
}
return true;
}
}
unsafe struct InlineArray3
{
public fixed float Array[3];
public static InlineArray3 Get()
{
var val = new InlineArray3();
for (int i = 0; i < 3; i++)
{
val.Array[i] = (float)(i + 1);
}
return val;
}
public bool Equals(InlineArray3 other)
{
fixed (float* arr = Array)
{
for (int i = 0; i < 3; i++)
{
if (arr[i] != other.Array[i])
{
return false;
}
}
}
return true;
}
}
unsafe struct InlineArray4
{
public fixed ushort Array[5];
public static InlineArray4 Get()
{
var val = new InlineArray4();
for (int i = 0; i < 5; i++)
{
val.Array[i] = (ushort)(i + 1);
}
return val;
}
public bool Equals(InlineArray4 other)
{
fixed (ushort* arr = Array)
{
for (int i = 0; i < 5; i++)
{
if (arr[i] != other.Array[i])
{
return false;
}
}
}
return true;
}
}
unsafe struct InlineArray5
{
public fixed byte Array[9];
public static InlineArray5 Get()
{
var val = new InlineArray5();
for (int i = 0; i < 9; i++)
{
val.Array[i] = (byte)(i + 1);
}
return val;
}
public bool Equals(InlineArray5 other)
{
fixed (byte* arr = Array)
{
for (int i = 0; i < 9; i++)
{
if (arr[i] != other.Array[i])
{
return false;
}
}
}
return true;
}
}
unsafe struct InlineArray6
{
public fixed double Array[1];
public static InlineArray6 Get()
{
var val = new InlineArray6();
for (int i = 0; i < 1; i++)
{
val.Array[i] = (double)(i + 1);
}
return val;
}
public bool Equals(InlineArray6 other)
{
fixed (double* arr = Array)
{
for (int i = 0; i < 1; i++)
{
if (arr[i] != other.Array[i])
{
return false;
}
}
}
return true;
}
}
struct Nested1
{
public LongAndFloat Field1;
public LongAndFloat Field2;
public static Nested1 Get()
{
return new Nested1
{
Field1 = new LongAndFloat { Long = 0xfeedfaceabadf00d, Float = 3.14159f },
Field2 = new LongAndFloat { Long = 0xbeeff00fdeadcafe, Float = 2.71928f }
};
}
public bool Equals(Nested1 other)
{
return Field1.Equals(other.Field1) && Field2.Long == other.Field2.Long && Field2.Float == other.Field2.Float;
}
}
struct Nested2
{
public ByteAndFloat Field1;
public FloatAndByte Field2;
public static Nested2 Get()
{
return new Nested2
{
Field1 = new ByteAndFloat { Byte = 42, Float = 3.14159f },
Field2 = new FloatAndByte { Byte = 24, Float = 2.71928f }
};
}
public bool Equals(Nested2 other)
{
return Field1.Equals(other.Field1) && Field2.Byte == other.Field2.Byte && Field2.Float == other.Field2.Float;
}
}
unsafe struct Nested3
{
public void* Field1;
public FloatAndByte Field2;
public static Nested3 Get()
{
byte unused;
return new Nested3 { Field1 = &unused, Field2 = FloatAndByte.Get() };
}
public bool Equals(Nested3 other)
{
return Field1 == other.Field1 && Field2.Equals(other.Field2);
}
}
struct Nested4
{
public InlineArray5 Field1;
public ushort Field2;
public static Nested4 Get()
{
return new Nested4 { Field1 = InlineArray5.Get(), Field2 = 0xcafe };
}
public bool Equals(Nested4 other)
{
return Field1.Equals(other.Field1) && Field2 == other.Field2;
}
}
struct Nested5
{
public ushort Field1;
public InlineArray5 Field2;
public static Nested5 Get()
{
return new Nested5 { Field2 = InlineArray5.Get(), Field1 = 0xcafe };
}
public bool Equals(Nested5 other)
{
return Field1 == other.Field1 && Field2.Equals(other.Field2);
}
}
struct Nested6
{
public InlineArray4 Field1;
public uint Field2;
public static Nested6 Get()
{
return new Nested6 { Field1 = InlineArray4.Get(), Field2 = 0xcafef00d };
}
public bool Equals(Nested6 other)
{
return Field1.Equals(other.Field1) && Field2 == other.Field2;
}
}
struct Nested7
{
public uint Field1;
public InlineArray4 Field2;
public static Nested7 Get()
{
return new Nested7 { Field2 = InlineArray4.Get(), Field1 = 0xcafef00d };
}
public bool Equals(Nested7 other)
{
return Field1 == other.Field1 && Field2.Equals(other.Field2);
}
}
struct Nested8
{
public InlineArray4 Field1;
public ushort Field2;
public static Nested8 Get()
{
return new Nested8 { Field1 = InlineArray4.Get(), Field2 = 0xcafe };
}
public bool Equals(Nested8 other)
{
return Field1.Equals(other.Field1) && Field2 == other.Field2;
}
}
struct Nested9
{
public ushort Field1;
public InlineArray4 Field2;
public static Nested9 Get()
{
return new Nested9 { Field2 = InlineArray4.Get(), Field1 = 0xcafe };
}
public bool Equals(Nested9 other)
{
return Field1 == other.Field1 && Field2.Equals(other.Field2);
}
}
public struct Empty
{
}
public struct Empty8Float
{
public Empty e0, e1, e2, e3, e4, e5, e6, e7;
public float FieldF;
public static Empty8Float Get()
{
return new Empty8Float { FieldF = 3.14159f };
}
public bool Equals(Empty8Float other)
{
return FieldF.Equals(other.FieldF);
}
}
public struct EmptyFloatEmpty5Byte
{
public Empty e;
public float FieldF;
public Empty e0, e1, e2, e3, e4;
public sbyte FieldB;
public static EmptyFloatEmpty5Byte Get()
{
return new EmptyFloatEmpty5Byte { FieldF = 3.14159f, FieldB = -123 };
}
public bool Equals(EmptyFloatEmpty5Byte other)
{
return FieldF.Equals(other.FieldF) && FieldB == other.FieldB;
}
}
public struct EmptyFloatEmpty5UByte
{
public Empty e;
public float FieldF;
public Empty e0, e1, e2, e3, e4;
public byte FieldB;
public static EmptyFloatEmpty5UByte Get()
{
return new EmptyFloatEmpty5UByte { FieldF = 3.14159f, FieldB = 234 };
}
public bool Equals(EmptyFloatEmpty5UByte other)
{
return FieldF.Equals(other.FieldF) && FieldB == other.FieldB;
}
}
public struct LongEmptyDouble
{
public long FieldL;
public Empty FieldE;
public double FieldD;
public static LongEmptyDouble Get()
{
return new LongEmptyDouble { FieldL = 0xcafef00d, FieldD = 3.14159d };
}
public bool Equals(LongEmptyDouble other)
{
return FieldL == other.FieldL && FieldD.Equals(other.FieldD);
}
}
public struct NestedEmpty
{
public struct InnerEmpty
{
public Empty e;
}
public InnerEmpty e;
}
public struct NestedEmptyFloatDouble
{
public NestedEmpty FieldNE;
public float FieldF;
public double FieldD;
public static NestedEmptyFloatDouble Get()
{
return new NestedEmptyFloatDouble { FieldF = 3.14159f, FieldD = 3.14159d };
}
public bool Equals(NestedEmptyFloatDouble other)
{
return FieldF.Equals(other.FieldF) && FieldD.Equals(other.FieldD);
}
}
public struct EmptyIntAndFloat
{
public struct EmptyInt
{
public Empty FieldE;
public int FieldI;
}
public EmptyInt FieldEI;
public float FieldF;
public static EmptyIntAndFloat Get()
{
return new EmptyIntAndFloat { FieldEI = new EmptyInt { FieldI = 0xcafe }, FieldF = 3.14159f };
}
public bool Equals(EmptyIntAndFloat other)
{
return FieldEI.FieldI == other.FieldEI.FieldI && FieldF.Equals(other.FieldF);
}
}
public struct LongEmptyAndFloat
{
public struct LongEmpty
{
public long FieldL;
public Empty FieldE;
}
public LongEmpty FieldLE;
public float FieldF;
public static LongEmptyAndFloat Get()
{
return new LongEmptyAndFloat { FieldLE = new LongEmpty { FieldL = 0xcafef00d }, FieldF = 3.14159f };
}
public bool Equals(LongEmptyAndFloat other)
{
return FieldLE.FieldL == other.FieldLE.FieldL && FieldF.Equals(other.FieldF);
}
}
[InlineArray(1)]
public struct ArrayOfEmpties
{
public Empty e;
};
public struct ArrayOfEmptiesFloatDouble
{
public ArrayOfEmpties FieldAoE;
public float FieldF;
public double FieldD;
public static ArrayOfEmptiesFloatDouble Get()
{
return new ArrayOfEmptiesFloatDouble { FieldF = 3.14159f, FieldD = 3.14159 };
}
public bool Equals(ArrayOfEmptiesFloatDouble other)
{
return FieldF.Equals(other.FieldF) && FieldD.Equals(other.FieldD);
}
}
public struct Eight<T>
{
public T e1, e2, e3, e4, e5, e6, e7, e8;
}
public struct FloatEmpty32kInt
{
public float FieldF;
public Eight<Eight<Eight<Eight<Eight<Empty>>>>> FieldEmpty32k;
public int FieldI;
public static FloatEmpty32kInt Get()
{
return new FloatEmpty32kInt { FieldF = 3.14159f, FieldI = 0xcafe };
}
public bool Equals(FloatEmpty32kInt other)
{
return FieldF.Equals(other.FieldF) && FieldI == other.FieldI;
}
}
[StructLayout(LayoutKind.Sequential, Pack=1)]
public struct PackedEmptyFloatLong
{
public Empty FieldE;
public float FieldF;
public long FieldL;
public static PackedEmptyFloatLong Get()
{
return new PackedEmptyFloatLong { FieldF = 3.14159f, FieldL = 0xcafef00d };
}
public bool Equals(PackedEmptyFloatLong other)
{
return FieldF.Equals(other.FieldF) && FieldL == other.FieldL;
}
}
[StructLayout(LayoutKind.Explicit, Pack=1)]
public struct ExplicitFloatLong
{
[FieldOffset(1)] public float FieldF;
[FieldOffset(5)] public long FieldL;
public static ExplicitFloatLong Get()
{
return new ExplicitFloatLong { FieldF = 3.14159f, FieldL = 0xcafef00d };
}
public bool Equals(ExplicitFloatLong other)
{
return FieldF.Equals(other.FieldF) && FieldL == other.FieldL;
}
}
public static partial class StructABI
{
[DllImport("StructABILib")]
static extern SingleByte EchoSingleByte(SingleByte value);
[DllImport("StructABILib")]
static extern SingleLong EchoSingleLong(SingleLong value);
[DllImport("StructABILib")]
static extern SingleFloat EchoSingleFloat(SingleFloat value);
[DllImport("StructABILib")]
static extern SingleDouble EchoSingleDouble(SingleDouble value);
[DllImport("StructABILib")]
static extern ByteAndFloat EchoByteAndFloat(ByteAndFloat value);
[DllImport("StructABILib")]
static extern LongAndFloat EchoLongAndFloat(LongAndFloat value);
[DllImport("StructABILib")]
static extern ByteAndDouble EchoByteAndDouble(ByteAndDouble value);
[DllImport("StructABILib")]
static extern DoubleAndByte EchoDoubleAndByte(DoubleAndByte value);
[DllImport("StructABILib")]
static extern PointerAndByte EchoPointerAndByte(PointerAndByte value);
[DllImport("StructABILib")]
static extern ByteAndPointer EchoByteAndPointer(ByteAndPointer value);
[DllImport("StructABILib")]
static extern ByteFloatAndPointer EchoByteFloatAndPointer(ByteFloatAndPointer value);
[DllImport("StructABILib")]
static extern PointerFloatAndByte EchoPointerFloatAndByte(PointerFloatAndByte value);
[DllImport("StructABILib")]
static extern ShortIntFloatIntPtr EchoShortIntFloatIntPtr(ShortIntFloatIntPtr value);
[DllImport("StructABILib")]
static extern TwoLongs EchoTwoLongs(TwoLongs value);
[DllImport("StructABILib")]
static extern TwoFloats EchoTwoFloats(TwoFloats value);
[DllImport("StructABILib")]
static extern TwoDoubles EchoTwoDoubles(TwoDoubles value);
[DllImport("StructABILib")]
static extern FourLongs EchoFourLongs(FourLongs value);
[DllImport("StructABILib")]
static extern FourDoubles EchoFourDoubles(FourDoubles value);
[DllImport("StructABILib")]
static extern InlineArray1 EchoInlineArray1(InlineArray1 value);
[DllImport("StructABILib")]
static extern InlineArray2 EchoInlineArray2(InlineArray2 value);
[DllImport("StructABILib")]
static extern InlineArray3 EchoInlineArray3(InlineArray3 value);
[DllImport("StructABILib")]
static extern InlineArray4 EchoInlineArray4(InlineArray4 value);
[DllImport("StructABILib")]
static extern InlineArray5 EchoInlineArray5(InlineArray5 value);
[DllImport("StructABILib")]
static extern InlineArray6 EchoInlineArray6(InlineArray6 value);
[DllImport("StructABILib")]
static extern Nested1 EchoNested1(Nested1 value);
[DllImport("StructABILib")]
static extern Nested2 EchoNested2(Nested2 value);
[DllImport("StructABILib")]
static extern Nested3 EchoNested3(Nested3 value);
[DllImport("StructABILib")]
static extern Nested4 EchoNested4(Nested4 value);
[DllImport("StructABILib")]
static extern Nested5 EchoNested5(Nested5 value);
[DllImport("StructABILib")]
static extern Nested6 EchoNested6(Nested6 value);
[DllImport("StructABILib")]
static extern Nested7 EchoNested7(Nested7 value);
[DllImport("StructABILib")]
static extern Nested8 EchoNested8(Nested8 value);
[DllImport("StructABILib")]
static extern Nested9 EchoNested9(Nested9 value);
[DllImport("StructABILib")]
static extern TwoLongs NotEnoughRegistersSysV1(ulong a, ulong b, ulong c, ulong d, ulong e, ulong f, TwoLongs value);
[DllImport("StructABILib")]
static extern TwoLongs NotEnoughRegistersSysV2(ulong a, ulong b, ulong c, ulong d, ulong e, TwoLongs value);
[DllImport("StructABILib")]