Esempio n. 1
0
 public void SetAsByrefDispatch(ref IntPtr value)
 {
     Debug.Assert(IsEmpty); // The setter can only be called once as VariantClear might be needed otherwise
     VariantType = (VarEnum.VT_DISPATCH | VarEnum.VT_BYREF);
     _typeUnion._unionTypes._byref = UnsafeMethods.ConvertIntPtrByrefToPtr(ref value);
 }
Esempio n. 2
0
 public void SetAsByrefVariant(ref Variant value)
 {
     Debug.Assert(IsEmpty); // The setter can only be called once as VariantClear might be needed otherwise
     VariantType = (VarEnum.VT_VARIANT | VarEnum.VT_BYREF);
     _typeUnion._unionTypes._byref = UnsafeMethods.ConvertVariantByrefToPtr(ref value);
 }
Esempio n. 3
0
        public static object GetObjectForVariant(Variant variant)
        {
            IntPtr ptr = UnsafeMethods.ConvertVariantByrefToPtr(ref variant);

            return(System.Runtime.InteropServices.Marshal.GetObjectForNativeVariant(ptr));
        }