Exemple #1
0
            public SCRIPTING_METHOD_PARAMS_Wraper(SCRIPTING_METHOD_PARAMS prms)
            {
                name   = Marshal.PtrToStringAnsi(prms.name);
                args   = new SciterValue[prms.argc];
                result = SciterValue.Undefined;

                for (int i = 0; i < prms.argc; i++)
                {
                    args[i] = new SciterValue((SciterXValue.VALUE)Marshal.PtrToStructure(IntPtr.Add(prms.argv, i * Marshal.SizeOf(typeof(SciterXValue.VALUE))), typeof(SciterXValue.VALUE)));
                }
            }
Exemple #2
0
            public SCRIPTING_METHOD_PARAMS_WRAPPER(SCRIPTING_METHOD_PARAMS prms)
            {
                name   = Marshal.PtrToStringAnsi(prms.name);
                args   = new SciterCore.SciterValue[prms.argc];
                result = SciterCore.SciterValue.Undefined;

                for (var i = 0; i < prms.argc; i++)
                {
                    var ptr = IntPtr.Add(prms.argv,
                                         i * Marshal.SizeOf(typeof(SciterValue.VALUE)));

                    args[i] = SciterCore.SciterValue.Attach(Marshal.PtrToStructure <SciterValue.VALUE>(ptr));
                }
            }
			public SCRIPTING_METHOD_PARAMS_Wraper(SCRIPTING_METHOD_PARAMS prms)
			{
				name = Marshal.PtrToStringAnsi(prms.name);
				args = new SciterValue[prms.argc];
				result = SciterValue.Undefined;

				for(int i = 0; i < prms.argc; i++)
					args[i] = new SciterValue( (SciterXValue.VALUE) Marshal.PtrToStructure(IntPtr.Add(prms.argv, i * Marshal.SizeOf(typeof(SciterXValue.VALUE))), typeof(SciterXValue.VALUE)) );
			}