Beispiel #1
0
        public static void test()
        {
            Console.WriteLine("test_base_valuetype");

            call1();

            fun_input_int(1234);
            fun_input_int(int.MaxValue);

            fun_input_long(3214);
            fun_input_long(long.MaxValue);

            fun_input_float((float)3.14159265358979);
            fun_input_float(float.MaxValue);

            fun_input_double(3.14159265358979);
            fun_input_double(double.MinValue);



            var s2 = new Struct_s2();

            s2.i = 10086;
            s2.l = 1008600010068;
            s2.f = (float)10.086;
            s2.d = 100.86;

            Console.WriteLine("Struct_s2");
            fun_input_struct_s2(s2);

            Console.WriteLine("Struct_s2_ref");
            fun_input_struct_s2_ref(ref s2);


            var s1 = new Struct_s1();

            s1.i = 10086;
            s1.l = 1008600010068;
            s1.f = (float)10.086;
            s1.d = 100.86;

            Console.WriteLine("Struct_s1");
            fun_input_struct_s1(s1);

            Console.WriteLine("Struct_s1_ref");
            fun_input_struct_s1_ref(ref s1);
        }
Beispiel #2
0
 public static extern IntPtr fun_input_struct_s2_ref(ref Struct_s2 i);
Beispiel #3
0
 public static extern IntPtr fun_input_struct_s2(Struct_s2 i);