Beispiel #1
0
 public static int managed_struct1_struct5_test(winx64_struct1 var1, winx64_struct5 var2,
                                                winx64_struct1 var3, winx64_struct5 var4,
                                                winx64_struct1 var5, winx64_struct5 var6)
 {
     if (var1.a != 1 || var3.a != 5)
     {
         return(1);
     }
     if (var2.a != 2 || var2.b != 3 || var2.c != 4 ||
         var4.a != 6 || var4.b != 7 || var4.c != 8)
     {
         return(2);
     }
     if (var5.a != 9)
     {
         return(3);
     }
     if (var6.a != 10 || var6.b != 11 || var6.c != 12)
     {
         return(4);
     }
     //
     //  Beginn Aenderung Test
     //
     Console.WriteLine("\n\t****C#: int managed_struct1_struct5_test ( ... ) ****\n");
     //
     //  Ende Aenderung Test
     //
     return(0);
 }
Beispiel #2
0
    public static int managed_struct1_test(winx64_struct1 var)
    {
        if (var.a != 5)
        {
            return(1);
        }

        return(0);
    }
Beispiel #3
0
 public static int managed_struct1_test(winx64_struct1 var)
 {
     if (var.a != 5)
     {
         return(1);
     }
     //
     //  Beginn Aenderung Test
     //
     Console.WriteLine("\n\t****C#: int managed_struct1_test (winx64_struct1 var) ****\n");
     //
     //  Ende Aenderung Test
     //
     return(0);
 }
Beispiel #4
0
    public static int test_0_In_Args_Value_In_RCX()
    {
        int retCode;

        winx64_struct1 t_winx64_struct1 = new winx64_struct1(123);

        if ((retCode = mono_test_Winx64_struct1_in(t_winx64_struct1)) != 0)
        {
            return(100 + retCode);
        }

        winx64_struct2 t_winx64_struct2 = new winx64_struct2(4, 5);

        if ((retCode = mono_test_Winx64_struct2_in(t_winx64_struct2)) != 0)
        {
            return(200 + retCode);
        }

        winx64_struct3 t_winx64_struct3 = new winx64_struct3(4, 5, 0x1234);

        if ((retCode = mono_test_Winx64_struct3_in(t_winx64_struct3)) != 0)
        {
            return(300 + retCode);
        }

        winx64_struct4 t_winx64_struct4 = new winx64_struct4(4, 5, 0x1234, 0x87654321);

        if ((retCode = mono_test_Winx64_struct4_in(t_winx64_struct4)) != 0)
        {
            return(400 + retCode);
        }

        winx64_floatStruct t_winx64_floatStruct = new winx64_floatStruct(5.5F, 9.5F);

        if ((retCode = mono_test_Winx64_floatStruct(t_winx64_floatStruct)) != 0)
        {
            return(500 + retCode);
        }

        winx64_doubleStruct t_winx64_doubleStruct = new winx64_doubleStruct(5.5F);

        if ((retCode = mono_test_Winx64_doubleStruct(t_winx64_doubleStruct)) != 0)
        {
            return(600 + retCode);
        }

        return(0);
    }
Beispiel #5
0
    public static int test_0_In_Args_Values_In_Registers_and_Stack()
    {
        int retCode;

        winx64_struct1 var1 = new winx64_struct1(1);
        winx64_struct1 var2 = new winx64_struct1(2);
        winx64_struct1 var3 = new winx64_struct1(3);
        winx64_struct1 var4 = new winx64_struct1(4);
        winx64_struct1 var5 = new winx64_struct1(5);

        if ((retCode = mono_test_Winx64_structs_in2(var1, var2, var3, var4, var5)) != 0)
        {
            return(100 + retCode);
        }

        return(0);
    }
Beispiel #6
0
    public static int test_0_In_Args_Values_In_Multiple_Registers()
    {
        int retCode;

        winx64_struct1 t_winx64_struct1 = new winx64_struct1(123);
        winx64_struct2 t_winx64_struct2 = new winx64_struct2(4, 5);
        winx64_struct3 t_winx64_struct3 = new winx64_struct3(4, 5, 0x1234);
        winx64_struct4 t_winx64_struct4 = new winx64_struct4(4, 5, 0x1234, 0x87654321);

        if ((retCode = mono_test_Winx64_structs_in1(t_winx64_struct1, t_winx64_struct2,
                                                    t_winx64_struct3, t_winx64_struct4)) != 0)
        {
            return(100 + retCode);
        }


        return(0);
    }
Beispiel #7
0
    public static int test_0_In_Args_Values_In_Registers_with_Stack_and_On_Stack()
    {
        int retCode;

        winx64_struct1 var1 = new winx64_struct1(1);
        winx64_struct5 var2 = new winx64_struct5(2, 3, 4);
        winx64_struct1 var3 = new winx64_struct1(5);
        winx64_struct5 var4 = new winx64_struct5(6, 7, 8);
        winx64_struct1 var5 = new winx64_struct1(9);
        winx64_struct5 var6 = new winx64_struct5(10, 11, 12);

        if ((retCode = mono_test_Winx64_structs_in3(var1, var2, var3, var4, var5, var6)) != 0)
        {
            return(100 + retCode);
        }

        return(0);
    }
Beispiel #8
0
    public static int test_0_In_Args_Values_In_Multiple_Registers()
    {
        int retCode;

        winx64_struct1 t_winx64_struct1 = new winx64_struct1(123);
        winx64_struct2 t_winx64_struct2 = new winx64_struct2(4, 5);
        winx64_struct3 t_winx64_struct3 = new winx64_struct3(4, 5, 0x1234);
        winx64_struct4 t_winx64_struct4 = new winx64_struct4(4, 5, 0x1234, 0x87654321);

        if ((retCode = mono_test_Winx64_structs_in1(t_winx64_struct1, t_winx64_struct2, t_winx64_struct3, t_winx64_struct4)) != 0)
        {
            return(100 + retCode);
        }
        //
        //  Beginn Aenderung Test
        //
        Console.WriteLine("\n\t****C#: mono_test_Winx64_structs_in1 () done ****\n");
        //
        //  Ende Aenderung Test
        //
        return(0);
    }
Beispiel #9
0
    public static int test_0_In_Args_Values_In_Registers_and_Stack()
    {
        int retCode;

        winx64_struct1 var1 = new winx64_struct1(1);
        winx64_struct1 var2 = new winx64_struct1(2);
        winx64_struct1 var3 = new winx64_struct1(3);
        winx64_struct1 var4 = new winx64_struct1(4);
        winx64_struct1 var5 = new winx64_struct1(5);

        if ((retCode = mono_test_Winx64_structs_in2(var1, var2, var3, var4, var5)) != 0)
        {
            return(100 + retCode);
        }
        //
        //  Beginn Aenderung Test
        //
        Console.WriteLine("\n\t****C#: mono_test_Winx64_structs_in2 (var1, var2, var3, var4, var5) done ****\n");
        //
        //  Ende Aenderung Test
        //
        return(0);
    }
Beispiel #10
0
    public static int managed_struct1_struct5_test(winx64_struct1 var1, winx64_struct5 var2,
                                                   winx64_struct1 var3, winx64_struct5 var4,
                                                   winx64_struct1 var5, winx64_struct5 var6)
    {
        if (var1.a != 1 || var3.a != 5)
        {
            return(1);
        }
        if (var2.a != 2 || var2.b != 3 || var2.c != 4 ||
            var4.a != 6 || var4.b != 7 || var4.c != 8)
        {
            return(2);
        }
        if (var5.a != 9)
        {
            return(3);
        }
        if (var6.a != 10 || var6.b != 11 || var6.c != 12)
        {
            return(4);
        }

        return(0);
    }
Beispiel #11
0
    public static int test_0_In_Args_Values_In_Registers_with_Stack_and_On_Stack()
    {
        int retCode;

        winx64_struct1 var1 = new winx64_struct1(1);
        winx64_struct5 var2 = new winx64_struct5(2, 3, 4);
        winx64_struct1 var3 = new winx64_struct1(5);
        winx64_struct5 var4 = new winx64_struct5(6, 7, 8);
        winx64_struct1 var5 = new winx64_struct1(9);
        winx64_struct5 var6 = new winx64_struct5(10, 11, 12);

        if ((retCode = mono_test_Winx64_structs_in3(var1, var2, var3, var4, var5, var6)) != 0)
        {
            return(100 + retCode);
        }
        //
        //  Beginn Aenderung Test
        //
        Console.WriteLine("\n\t****C#: mono_test_Winx64_structs_in3 (var1, var2, var3, var4, var5, var6) done ****\n");
        //
        //  Ende Aenderung Test
        //
        return(0);
    }
    public static int managed_struct1_struct5_test(winx64_struct1
var1,
winx64_struct5
var2,
winx64_struct1
var3,
winx64_struct5
var4,
winx64_struct1
var5,
winx64_struct5
var6)
    {
        if
        (var1.a
        !=
        1
        ||
        var3.a
        !=
        5)
        return
        1;
        if
        (var2.a
        !=
        2
        ||
        var2.b
        !=
        3
        ||
        var2.c
        !=
        4
        ||
        var4.a
        !=
        6
        ||
        var4.b
        !=
        7
        ||
        var4.c
        !=
        8)
        return
        2;
        if
        (var5.a
        !=
        9)
        return
        3;
        if
        (var6.a
        !=
        10
        ||
        var6.b
        !=
        11
        ||
        var6.c
        !=
        12)
        return
        4;
        return
        0;
    }
Beispiel #13
0
    public static int test_0_Ret_In_RAX()
    {
        winx64_struct1 t_winx64_struct1 = mono_test_Winx64_struct1_ret();

        if (t_winx64_struct1.a != 123)
        {
            return(101);
        }
        //
        //  Beginn Aenderung Test
        //
        Console.WriteLine("\n\t****C#: mono_test_Winx64_struct1_ret () done ****\n");
        //
        //  Ende Aenderung Test
        //
        winx64_struct2 t_winx64_struct2 = mono_test_Winx64_struct2_ret();

        if (t_winx64_struct2.a != 4)
        {
            return(201);
        }
        if (t_winx64_struct2.b != 5)
        {
            return(202);
        }
        //
        //  Beginn Aenderung Test
        //
        Console.WriteLine("\n\t****C#: mono_test_Winx64_struct2_ret () done ****\n");
        //
        //  Ende Aenderung Test
        //
        winx64_struct3 t_winx64_struct3 = mono_test_Winx64_struct3_ret();

        if (t_winx64_struct3.a != 4)
        {
            return(301);
        }
        if (t_winx64_struct3.b != 5)
        {
            return(302);
        }
        if (t_winx64_struct3.c != 0x1234)
        {
            return(303);
        }
        //
        //  Beginn Aenderung Test
        //
        Console.WriteLine("\n\t****C#: mmono_test_Winx64_struct3_ret () done ****\n");
        //
        //  Ende Aenderung Test
        //
        winx64_struct4 t_winx64_struct4 = mono_test_Winx64_struct4_ret();

        if (t_winx64_struct4.a != 4)
        {
            return(401);
        }
        if (t_winx64_struct4.b != 5)
        {
            return(402);
        }
        if (t_winx64_struct4.c != 0x1234)
        {
            return(403);
        }
        if (t_winx64_struct4.d != 0x87654321)
        {
            return(404);
        }
        //
        //  Beginn Aenderung Test
        //
        Console.WriteLine("\n\t****C#: mono_test_Winx64_struct4_ret () done ****\n");
        //
        //  Ende Aenderung Test
        //
        t_winx64_struct1 = mono_test_Winx64_struct1_ret_5_args(0x1, 0x0, 0x4, 0x10, 0x40);
        if (t_winx64_struct1.a != 0x55)
        {
            return(501);
        }
        //
        //  Beginn Aenderung Test
        //
        Console.WriteLine("\n\t****C#: mono_test_Winx64_struct1_ret_5_args (0x1, 0x0, 0x4, 0x10, 0x40) done ****\n");
        //
        //  Ende Aenderung Test
        //
        return(0);
    }
 public static int test_0_In_Args_Values_In_Registers_and_Stack()
 {
     int
     retCode;
     winx64_struct1
     var1
     =
     new
     winx64_struct1
     (1);
     winx64_struct1
     var2
     =
     new
     winx64_struct1
     (2);
     winx64_struct1
     var3
     =
     new
     winx64_struct1
     (3);
     winx64_struct1
     var4
     =
     new
     winx64_struct1
     (4);
     winx64_struct1
     var5
     =
     new
     winx64_struct1
     (5);
     if
     ((retCode
     =
     mono_test_Winx64_structs_in2
     (var1,
     var2,
     var3,
     var4,
     var5))
     !=
     0)
     return
     100
     +
     retCode;
     return
     0;
 }
Beispiel #15
0
    public static int test_0_In_Args_Value_In_RCX()
    {
        int retCode;

        winx64_struct1 t_winx64_struct1 = new winx64_struct1(123);

        //
        //  Beginn Aenderung Test
        //
        Console.WriteLine("\n\t****C#: winx64_struct1 t_winx64_struct1 = new winx64_struct1 (123) done ****\n");
        //
        //  Ende Aenderung Test
        //
        if ((retCode = mono_test_Winx64_struct1_in(t_winx64_struct1)) != 0)
        {
            return(100 + retCode);
        }
        //
        //  Beginn Aenderung Test
        //
        Console.WriteLine("\n\t****C#: mono_test_Winx64_struct1_in (t_winx64_struct1) done ****\n");
        //
        //  Ende Aenderung Test
        //
        winx64_struct2 t_winx64_struct2 = new winx64_struct2(4, 5);

        //
        //  Beginn Aenderung Test
        //
        Console.WriteLine("\n\t**** C#: winx64_struct2 t_winx64_struct2 = new winx64_struct2 (4, 5) done ****\n");
        //
        //  Ende Aenderung Test
        //
        if ((retCode = mono_test_Winx64_struct2_in(t_winx64_struct2)) != 0)
        {
            return(200 + retCode);
        }
        //
        //  Beginn Aenderung Test
        //
        Console.WriteLine("\n\t****C#: mono_test_Winx64_struct2_in (t_winx64_struct2) done ****\n");
        //
        //  Ende Aenderung Test
        //
        winx64_struct3 t_winx64_struct3 = new winx64_struct3(4, 5, 0x1234);

        //
        //  Beginn Aenderung Test
        //
        Console.WriteLine("\n\t**** C#: winx64_struct3 t_winx64_struct3 = new winx64_struct3 (4, 5, 0x1234) done ****\n");
        //
        //  Ende Aenderung Test
        //
        if ((retCode = mono_test_Winx64_struct3_in(t_winx64_struct3)) != 0)
        {
            return(300 + retCode);
        }
        //
        //  Beginn Aenderung Test
        //
        Console.WriteLine("\n\t****C#: mono_test_Winx64_struct3_in (t_winx64_struct3) done ****\n");
        //
        //  Ende Aenderung Test
        //
        winx64_struct4 t_winx64_struct4 = new winx64_struct4(4, 5, 0x1234, 0x87654321);

        //
        //  Beginn Aenderung Test
        //
        Console.WriteLine("\n\t**** C#: winx64_struct4 t_winx64_struct4 = new winx64_struct4 (4, 5, 0x1234, 0x87654321) done ****\n");
        //
        //  Ende Aenderung Test
        //
        if ((retCode = mono_test_Winx64_struct4_in(t_winx64_struct4)) != 0)
        {
            return(400 + retCode);
        }
        //
        //  Beginn Aenderung Test
        //
        Console.WriteLine("\n\t****C#: mono_test_Winx64_struct4_in (t_winx64_struct4) done ****\n");
        //
        //  Ende Aenderung Test
        //
        winx64_floatStruct t_winx64_floatStruct = new winx64_floatStruct(5.5F, 9.5F);

        //
        //  Beginn Aenderung Test
        //
        Console.WriteLine("\n\t**** C#: winx64_floatStruct t_winx64_floatStruct = new winx64_floatStruct (5.5F, 9.5F) done ****\n");
        //
        //  Ende Aenderung Test
        //
        if ((retCode = mono_test_Winx64_floatStruct(t_winx64_floatStruct)) != 0)
        {
            return(500 + retCode);
        }
        //
        //  Beginn Aenderung Test
        //
        Console.WriteLine("\n\t****C#: mono_test_Winx64_floatStruct (t_winx64_floatStruct) done ****\n");
        //
        //  Ende Aenderung Test
        //
        winx64_doubleStruct t_winx64_doubleStruct = new winx64_doubleStruct(5.5F);

        //
        //  Beginn Aenderung Test
        //
        Console.WriteLine("\n\t**** C#: winx64_doubleStruct t_winx64_doubleStruct = new winx64_doubleStruct (5.5F) done ****\n");
        //
        //  Ende Aenderung Test
        //
        if ((retCode = mono_test_Winx64_doubleStruct(t_winx64_doubleStruct)) != 0)
        {
            return(600 + retCode);
        }
        //
        //  Beginn Aenderung Test
        //
        Console.WriteLine("\n\t****C#: mono_test_Winx64_doubleStruct (t_winx64_doubleStruct) done ****\n");
        //
        //  Ende Aenderung Test
        //
        return(0);
    }
 public static int test_0_In_Args_Values_In_Registers_with_Stack_and_On_Stack()
 {
     int
     retCode;
     winx64_struct1
     var1
     =
     new
     winx64_struct1
     (1);
     winx64_struct5
     var2
     =
     new
     winx64_struct5
     (2,
     3,
     4);
     winx64_struct1
     var3
     =
     new
     winx64_struct1
     (5);
     winx64_struct5
     var4
     =
     new
     winx64_struct5
     (6,
     7,
     8);
     winx64_struct1
     var5
     =
     new
     winx64_struct1
     (9);
     winx64_struct5
     var6
     =
     new
     winx64_struct5
     (10,
     11,
     12);
     if
     ((retCode
     =
     mono_test_Winx64_structs_in3
     (var1,
     var2,
     var3,
     var4,
     var5,
     var6))
     !=
     0)
     return
     100
     +
     retCode;
     return
     0;
 }
Beispiel #17
0
 static extern int mono_test_Winx64_structs_in1([MarshalAs(UnmanagedType.Struct)] winx64_struct1 var1,
                                                [MarshalAs(UnmanagedType.Struct)] winx64_struct2 var2,
                                                [MarshalAs(UnmanagedType.Struct)] winx64_struct3 var3,
                                                [MarshalAs(UnmanagedType.Struct)] winx64_struct4 var4);
Beispiel #18
0
 static extern int mono_test_Winx64_structs_in3([MarshalAs(UnmanagedType.Struct)] winx64_struct1 var1,
                                                [MarshalAs(UnmanagedType.Struct)] winx64_struct5 var2,
                                                [MarshalAs(UnmanagedType.Struct)] winx64_struct1 var3,
                                                [MarshalAs(UnmanagedType.Struct)] winx64_struct5 var4,
                                                [MarshalAs(UnmanagedType.Struct)] winx64_struct1 var5,
                                                [MarshalAs(UnmanagedType.Struct)] winx64_struct5 var6);
Beispiel #19
0
 static extern int mono_test_Winx64_struct1_in([MarshalAs(UnmanagedType.Struct)] winx64_struct1 var);
 public static int test_0_In_Args_Values_In_Multiple_Registers()
 {
     int
     retCode;
     winx64_struct1
     t_winx64_struct1
     =
     new
     winx64_struct1
     (123);
     winx64_struct2
     t_winx64_struct2
     =
     new
     winx64_struct2
     (4,
     5);
     winx64_struct3
     t_winx64_struct3
     =
     new
     winx64_struct3
     (4,
     5,
     0x1234);
     winx64_struct4
     t_winx64_struct4
     =
     new
     winx64_struct4
     (4,
     5,
     0x1234,
     0x87654321);
     if
     ((retCode
     =
     mono_test_Winx64_structs_in1
     (t_winx64_struct1,
     t_winx64_struct2,
     t_winx64_struct3,
     t_winx64_struct4))
     !=
     0)
     return
     100
     +
     retCode;
     return
     0;
 }
Beispiel #21
0
 public winx64_struct6(winx64_struct1 ia, short ib, byte ic)
 {
     a = ia;
     b = ib;
     c = ic;
 }
 public static int test_0_In_Args_Value_In_RCX()
 {
     int
     retCode;
     winx64_struct1
     t_winx64_struct1
     =
     new
     winx64_struct1
     (123);
     if
     ((retCode
     =
     mono_test_Winx64_struct1_in
     (t_winx64_struct1))
     !=
     0)
     return
     100
     +
     retCode;
     winx64_struct2
     t_winx64_struct2
     =
     new
     winx64_struct2
     (4,
     5);
     if
     ((retCode
     =
     mono_test_Winx64_struct2_in
     (t_winx64_struct2))
     !=
     0)
     return
     200
     +
     retCode;
     winx64_struct3
     t_winx64_struct3
     =
     new
     winx64_struct3
     (4,
     5,
     0x1234);
     if
     ((retCode
     =
     mono_test_Winx64_struct3_in
     (t_winx64_struct3))
     !=
     0)
     return
     300
     +
     retCode;
     winx64_struct4
     t_winx64_struct4
     =
     new
     winx64_struct4
     (4,
     5,
     0x1234,
     0x87654321);
     if
     ((retCode
     =
     mono_test_Winx64_struct4_in
     (t_winx64_struct4))
     !=
     0)
     return
     400
     +
     retCode;
     winx64_floatStruct
     t_winx64_floatStruct
     =
     new
     winx64_floatStruct
     (5.5F,
     9.5F);
     if
     ((retCode
     =
     mono_test_Winx64_floatStruct
     (t_winx64_floatStruct))
     !=
     0)
     return
     500
     +
     retCode;
     winx64_doubleStruct
     t_winx64_doubleStruct
     =
     new
     winx64_doubleStruct
     (5.5F);
     if
     ((retCode
     =
     mono_test_Winx64_doubleStruct
     (t_winx64_doubleStruct))
     !=
     0)
     return
     600
     +
     retCode;
     return
     0;
 }
Beispiel #23
0
    public static int test_0_Ret_In_RAX()
    {
        winx64_struct1 t_winx64_struct1 = mono_test_Winx64_struct1_ret();

        if (t_winx64_struct1.a != 123)
        {
            return(101);
        }

        winx64_struct2 t_winx64_struct2 = mono_test_Winx64_struct2_ret();

        if (t_winx64_struct2.a != 4)
        {
            return(201);
        }
        if (t_winx64_struct2.b != 5)
        {
            return(202);
        }

        winx64_struct3 t_winx64_struct3 = mono_test_Winx64_struct3_ret();

        if (t_winx64_struct3.a != 4)
        {
            return(301);
        }
        if (t_winx64_struct3.b != 5)
        {
            return(302);
        }
        if (t_winx64_struct3.c != 0x1234)
        {
            return(303);
        }

        winx64_struct4 t_winx64_struct4 = mono_test_Winx64_struct4_ret();

        if (t_winx64_struct4.a != 4)
        {
            return(401);
        }
        if (t_winx64_struct4.b != 5)
        {
            return(402);
        }
        if (t_winx64_struct4.c != 0x1234)
        {
            return(403);
        }
        if (t_winx64_struct4.d != 0x87654321)
        {
            return(404);
        }

        t_winx64_struct1 = mono_test_Winx64_struct1_ret_5_args(0x1, 0x0, 0x4, 0x10, 0x40);
        if (t_winx64_struct1.a != 0x55)
        {
            return(501);
        }

        return(0);
    }
    public winx64_struct6(winx64_struct1
ia,
short
ib,
byte
ic)
    {
        a
        =
        ia;
        b
        =
        ib;
        c
        =
        ic;
    }
    public static int managed_struct1_test(winx64_struct1
var)
    {
        if
        (var.a
        !=
        5)
        return
        1;
        return
        0;
    }