Exemplo n.º 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);
 }
Exemplo n.º 2
0
    public static int test_0_Ret_In_Address()
    {
        winx64_struct5 t_winx64_struct5 = mono_test_Winx64_struct5_ret();

        if (t_winx64_struct5.a != 4)
        {
            return(101);
        }
        if (t_winx64_struct5.b != 5)
        {
            return(102);
        }
        if (t_winx64_struct5.c != 6)
        {
            return(103);
        }

        t_winx64_struct5 = mono_test_Winx64_struct5_ret6_args(0x1, 0x4, 0x2, 0x8, 0x30);
        if (t_winx64_struct5.a != 0x5)
        {
            return(201);
        }
        if (t_winx64_struct5.b != 0xa)
        {
            return(202);
        }
        if (t_winx64_struct5.c != 0x30)
        {
            return(203);
        }

        return(0);
    }
Exemplo n.º 3
0
    public static int managed_struct5_test(winx64_struct5 var)
    {
        if (var.a != 5)
        {
            return(1);
        }
        if (var.b != 0x10)
        {
            return(2);
        }
        if (var.c != 0x99)
        {
            return(3);
        }

        return(0);
    }
Exemplo n.º 4
0
    public static int test_0_Ret_In_Address()
    {
        winx64_struct5 t_winx64_struct5 = mono_test_Winx64_struct5_ret();

        if (t_winx64_struct5.a != 4)
        {
            return(101);
        }
        if (t_winx64_struct5.b != 5)
        {
            return(102);
        }
        if (t_winx64_struct5.c != 6)
        {
            return(103);
        }
        //
        //  Beginn Aenderung Test
        //
        Console.WriteLine("\n\t****C#: mono_test_Winx64_struct5_ret () done ****\n");
        //
        //  Ende Aenderung Test
        //
        t_winx64_struct5 = mono_test_Winx64_struct5_ret6_args(0x1, 0x4, 0x2, 0x8, 0x30);
        if (t_winx64_struct5.a != 0x5)
        {
            return(201);
        }
        if (t_winx64_struct5.b != 0xa)
        {
            return(202);
        }
        if (t_winx64_struct5.c != 0x30)
        {
            return(203);
        }
        //
        //  Beginn Aenderung Test
        //
        Console.WriteLine("\n\t****C#: mono_test_Winx64_struct5_ret6_args (0x1, 0x4, 0x2, 0x8, 0x30) done ****\n");
        //
        //  Ende Aenderung Test
        //
        return(0);
    }
Exemplo n.º 5
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);
    }
Exemplo n.º 6
0
 public static int managed_struct5_test(winx64_struct5 var)
 {
     if (var.a != 5)
     {
         return(1);
     }
     if (var.b != 0x10)
     {
         return(2);
     }
     if (var.c != 0x99)
     {
         return(3);
     }
     //
     //  Beginn Aenderung Test
     //
     Console.WriteLine("\n\t****C#: int managed_struct5_test (winx64_struct5 var) ****\n");
     //
     //  Ende Aenderung Test
     //
     return(0);
 }
Exemplo n.º 7
0
    public static int test_0_In_Args_Value_On_Stack_ADDR_In_RCX()
    {
        int retCode;

        winx64_struct5 t_winx64_struct5 = new winx64_struct5(4, 5, 6);

        t_winx64_struct5.a = 4;
        t_winx64_struct5.b = 5;
        t_winx64_struct5.c = 6;

        if ((retCode = mono_test_Winx64_struct5_in(t_winx64_struct5)) != 0)
        {
            return(100 + retCode);
        }
        //
        //  Beginn Aenderung Test
        //
        Console.WriteLine("\n\t****C#: mono_test_Winx64_struct5_in (t_winx64_struct5) done ****\n");
        //
        //  Ende Aenderung Test
        //
        winx64_struct6 t_winx64_struct6 = new winx64_struct6(new winx64_struct1(4), 5, 6);

        if ((retCode = mono_test_Winx64_struct6_in(t_winx64_struct6)) != 0)
        {
            return(200 + retCode);
        }
        //
        //  Beginn Aenderung Test
        //
        Console.WriteLine("\n\t****C#: mono_test_Winx64_struct6_in (t_winx64_struct6) done ****\n");
        //
        //  Ende Aenderung Test
        //
        return(0);
    }
Exemplo n.º 8
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);
    }
Exemplo n.º 9
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);
    }
Exemplo n.º 10
0
    public static int test_0_In_Args_Value_On_Stack_ADDR_In_RCX()
    {
        int retCode;

        winx64_struct5 t_winx64_struct5 = new winx64_struct5(4, 5, 6);

        t_winx64_struct5.a = 4;
        t_winx64_struct5.b = 5;
        t_winx64_struct5.c = 6;

        if ((retCode = mono_test_Winx64_struct5_in(t_winx64_struct5)) != 0)
        {
            return(100 + retCode);
        }

        winx64_struct6 t_winx64_struct6 = new winx64_struct6(new winx64_struct1(4), 5, 6);

        if ((retCode = mono_test_Winx64_struct6_in(t_winx64_struct6)) != 0)
        {
            return(200 + retCode);
        }

        return(0);
    }
Exemplo n.º 11
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);
Exemplo n.º 12
0
 static extern int mono_test_Winx64_struct5_in([MarshalAs(UnmanagedType.Struct)] winx64_struct5 var);
Exemplo n.º 13
0
 public static int test_0_In_Args_Value_On_Stack_ADDR_In_RCX()
 {
     int
     retCode;
     winx64_struct5
     t_winx64_struct5
     =
     new
     winx64_struct5
     (4,
     5,
     6);
     t_winx64_struct5.a
     =
     4;
     t_winx64_struct5.b
     =
     5;
     t_winx64_struct5.c
     =
     6;
     if
     ((retCode
     =
     mono_test_Winx64_struct5_in
     (t_winx64_struct5))
     !=
     0)
     return
     100
     +
     retCode;
     winx64_struct6
     t_winx64_struct6
     =
     new
     winx64_struct6
     (new
     winx64_struct1
     (4),
     5,
     6);
     if
     ((retCode
     =
     mono_test_Winx64_struct6_in
     (t_winx64_struct6))
     !=
     0)
     return
     200
     +
     retCode;
     return
     0;
 }
Exemplo n.º 14
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;
 }
Exemplo n.º 15
0
    public static int managed_struct5_test(winx64_struct5
var)
    {
        if
        (var.a
        !=
        5)
        return
        1;
        if
        (var.b
        !=
        0x10)
        return
        2;
        if
        (var.c
        !=
        0x99)
        return
        3;
        return
        0;
    }
Exemplo n.º 16
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;
    }