Exemple #1
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);
    }
Exemple #2
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);
    }
Exemple #3
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);
    }
Exemple #4
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);
    }
Exemple #5
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);
    }
Exemple #6
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);
Exemple #7
0
 static extern int mono_test_Winx64_struct3_in([MarshalAs(UnmanagedType.Struct)] winx64_struct3 var);
Exemple #8
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 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;
 }
 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;
 }