/**Setting up a <code>VARIANT</code> with an <code>IJIComObject</code>. Used via serializing the <code>VARIANT</code>. * * @param value */ public JIVariant(IJIComObject value) { this(value,false); if (value instanceof IJIDispatch) { setFlag(JIFlags.FLAG_REPRESENTATION_USE_IDISPATCH_IID); } else { setFlag(JIFlags.FLAG_REPRESENTATION_USE_IUNKNOWN_IID); } }
/**Setting up a <code>VARIANT</code> with an <code>IJIComObject</code>. Used via serializing the <code>VARIANT</code>. * * @param value */ public JIVariant(IJIComObject value) { this((Object)value); if (value instanceof IJIDispatch) { setFlag(JIFlags.FLAG_REPRESENTATION_USE_IDISPATCH_IID); } else { setFlag(JIFlags.FLAG_REPRESENTATION_USE_IUNKNOWN_IID); } }
/**Setting up a <code>VARIANT</code> with an <code>IJIComObject</code>. Used via serializing the <code>VARIANT</code>. * * @param value * @param isByRef <code>true</code> if the value is to be represented as a pointer. IJIComObject** */ public JIVariant(IJIComObject value, boolean isByRef) { this((Object)value,isByRef); if (value instanceof IJIDispatch) { setFlag(JIFlags.FLAG_REPRESENTATION_USE_IDISPATCH_IID); } else { setFlag(JIFlags.FLAG_REPRESENTATION_USE_IUNKNOWN_IID); } }
/** * Setting up a <code>VARIANT</code> with an <code>IJIComObject</code>. Used * via serializing the <code>VARIANT</code>. * * @param value */ public JIVariant ( final IJIComObject value ) { this ( value, false ); if ( value instanceof IJIDispatch ) { setFlag ( JIFlags.FLAG_REPRESENTATION_USE_IDISPATCH_IID ); } else { setFlag ( JIFlags.FLAG_REPRESENTATION_USE_IUNKNOWN_IID ); } }
/**Setting up a <code>VARIANT</code> with an <code>IJIComObject</code>. Used via serializing the <code>VARIANT</code>. * * @param value * @param isByRef <code>true</code> if the value is to be represented as a pointer. IJIComObject** */ public JIVariant(IJIComObject value, boolean isByRef) { init((Object)value,isByRef); if (value instanceof IJIDispatch) { setFlag(JIFlags.FLAG_REPRESENTATION_USE_IDISPATCH_IID); } else { setFlag(JIFlags.FLAG_REPRESENTATION_USE_IUNKNOWN_IID); } }
/** * Setting up a <code>VARIANT</code> with an <code>IJIComObject</code>. Used * via serializing the <code>VARIANT</code>. * * @param value * @param isByRef * <code>true</code> if the value is to be represented as a * pointer. IJIComObject** */ public JIVariant ( final IJIComObject value, final boolean isByRef ) { init ( value, isByRef ); if ( value instanceof IJIDispatch ) { setFlag ( JIFlags.FLAG_REPRESENTATION_USE_IDISPATCH_IID ); } else { setFlag ( JIFlags.FLAG_REPRESENTATION_USE_IUNKNOWN_IID ); } }
/** * Perform some fixes on the variant when writing it to OPC items. This * method * only changes control information on the variant and not the value itself! * * @param value * the value to fix * @return the fixed value * @throws JIException * In case something goes wrong */ public static JIVariant fixVariant ( final JIVariant value ) throws JIException { if ( value.isArray () ) { if ( value.getObjectAsArray ().getArrayInstance () instanceof Boolean[] ) { value.setFlag ( JIFlags.FLAG_REPRESENTATION_VARIANT_BOOL ); } } return value; } }
/** * <code>VARIANT</code> for <code>([out] IUnknown*)</code>. This is not Thread Safe , hence a new instance must be taken each time. */ public static JIVariant OUT_IUNKNOWN() { JIVariant retval = new JIVariant(new JIComObjectImpl(null, new JIInterfacePointer(null,-1,null)),true); retval.setFlag(JIFlags.FLAG_REPRESENTATION_IUNKNOWN_NULL_FOR_OUT | JIFlags.FLAG_REPRESENTATION_SET_JIINTERFACEPTR_NULL_FOR_VARIANT); return retval; }
/** * <code>VARIANT</code> for <code>([out] IUnknown*)</code>. This is not * Thread Safe , hence a new instance must be taken each time. */ public static JIVariant OUT_IUNKNOWN () { final JIVariant retval = new JIVariant ( new JIComObjectImpl ( null, new JIInterfacePointer ( null, -1, null ) ), true ); retval.setFlag ( JIFlags.FLAG_REPRESENTATION_IUNKNOWN_NULL_FOR_OUT | JIFlags.FLAG_REPRESENTATION_SET_JIINTERFACEPTR_NULL_FOR_VARIANT ); return retval; }
/** * <code>VARIANT</code> for <code>([out] IDispatch*)</code>. This is not Thread Safe , hence a new instance must be taken each time. * <br/>Note that this must also be used when the interface pointer is a subclass of <code>IDispatch</code> i.e. supports automation (or is a * <code>dispinterface</code>). */ public static JIVariant OUT_IDISPATCH() { JIVariant retval = new JIVariant(new JIComObjectImpl(null, new JIInterfacePointer(null,-1,null)),true); retval.setFlag(JIFlags.FLAG_REPRESENTATION_IDISPATCH_NULL_FOR_OUT | JIFlags.FLAG_REPRESENTATION_SET_JIINTERFACEPTR_NULL_FOR_VARIANT); return retval; }
/** * <code>VARIANT</code> for <code>([out] IDispatch*)</code>. This is not Thread Safe , hence a new instance must be taken each time. * <br/>Note that this must also be used when the interface pointer is a subclass of <code>IDispatch</code> i.e. supports automation (or is a * <code>dispinterface</code>). */ public static JIVariant OUT_IDISPATCH() { JIVariant retval = new JIVariant(new JIComObjectImpl(null, new JIInterfacePointer(null,-1,null)),true); retval.setFlag(JIFlags.FLAG_REPRESENTATION_IDISPATCH_NULL_FOR_OUT | JIFlags.FLAG_REPRESENTATION_SET_JIINTERFACEPTR_NULL_FOR_VARIANT); return retval; }
/** * <code>VARIANT</code> for <code>([out] IUnknown*)</code>. This is not Thread Safe , hence a new instance must be taken each time. */ public static JIVariant OUT_IUNKNOWN() { JIVariant retval = new JIVariant(new JIComObjectImpl(null, new JIInterfacePointer(null,-1,null)),true); retval.setFlag(JIFlags.FLAG_REPRESENTATION_IUNKNOWN_NULL_FOR_OUT | JIFlags.FLAG_REPRESENTATION_SET_JIINTERFACEPTR_NULL_FOR_VARIANT); return retval; }
/** * <code>VARIANT</code> for <code>([out] IDispatch*)</code>. This is not * Thread Safe , hence a new instance must be taken each time. <br/> * Note that this must also be used when the interface pointer is a subclass * of <code>IDispatch</code> i.e. supports automation (or is a * <code>dispinterface</code>). */ public static JIVariant OUT_IDISPATCH () { final JIVariant retval = new JIVariant ( new JIComObjectImpl ( null, new JIInterfacePointer ( null, -1, null ) ), true ); retval.setFlag ( JIFlags.FLAG_REPRESENTATION_IDISPATCH_NULL_FOR_OUT | JIFlags.FLAG_REPRESENTATION_SET_JIINTERFACEPTR_NULL_FOR_VARIANT ); return retval; }