Exemplo n.º 1
0
        /// <summary>
        /// Add Parameter to Effect
        /// </summary>
        public static void AddParameter(IPropertySetter ipro, string parName, object parValue)
        {
            DexterParam param;

            DexterValue[] value;

            param             = new DexterParam();
            value             = new DexterValue[1];
            param.Name        = parName;
            param.dispID      = 0;
            param.nValues     = 1;
            value[0].v        = parValue;
            value[0].rt       = 0;
            value[0].dwInterp = Dexterf.Jump;
            ipro.AddProp(param, value);
        }
Exemplo n.º 2
0
        private void TestGetProps()
        {
            int         hr;
            int         iCnt;
            DexterParam dp2 = new DexterParam();
            DexterValue dv2, dv3;
            IntPtr      ip1 = IntPtr.Zero, ip2 = IntPtr.Zero;

            hr = m_ips.GetProps(out iCnt, out ip1, out ip2);
            DESError.ThrowExceptionForHR(hr);

            dp2 = (DexterParam)Marshal.PtrToStructure(ip1, typeof(DexterParam));
            dv2 = (DexterValue)Marshal.PtrToStructure(ip2, typeof(DexterValue));
            dv3 = (DexterValue)Marshal.PtrToStructure((IntPtr)(ip2.ToInt32() + Marshal.SizeOf(typeof(DexterValue))), typeof(DexterValue));

            Debug.Assert(dv3.rt == 3452345, "GetProps");

            hr = m_ips.FreeProps(iCnt, ip1, ip2);
            DESError.ThrowExceptionForHR(hr);
        }
Exemplo n.º 3
0
        private void TestAddProps()
        {
            int hr;

            DexterValue [] dv;
            DexterParam    dp = new DexterParam();

            dp.Name    = "Vol";
            dp.nValues = 2;

            dv             = new DexterValue[2];
            dv[0]          = new DexterValue();
            dv[0].v        = 0;
            dv[0].rt       = 0;
            dv[0].dwInterp = Dexterf.Jump;

            dv[1]          = new DexterValue();
            dv[1].v        = 6;
            dv[1].rt       = 3452345;
            dv[1].dwInterp = Dexterf.Jump;

            hr = m_ips.AddProp(dp, dv);
            DESError.ThrowExceptionForHR(hr);
        }