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); }
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); }
public static object GetObjectForVariant(Variant variant) { IntPtr ptr = UnsafeMethods.ConvertVariantByrefToPtr(ref variant); return(System.Runtime.InteropServices.Marshal.GetObjectForNativeVariant(ptr)); }