com.sun.jna.platform.win32

## Class Variant.VARIANT

- java.lang.Object
- - com.sun.jna.Structure
  - - com.sun.jna.Union
    - - com.sun.jna.platform.win32.Variant.VARIANT

- Direct Known Subclasses:
    Variant.VARIANT.ByReference, Variant.VARIANT.ByValue
  Enclosing interface:
    Variant

      public static class Variant.VARIANT
      extends Union

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Variant.VARIANT._VARIANT`
    `static class` | `Variant.VARIANT.ByReference`
    `static class` | `Variant.VARIANT.ByValue`

    - ### Nested classes/interfaces inherited from class com.sun.jna.Structure

      `Structure.StructField`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `Variant.VARIANT._VARIANT` | `_variant`
    `OaIdl.DECIMAL` | `decVal`
    `static Variant.VARIANT` | `VARIANT_MISSING`

    - ### Fields inherited from class com.sun.jna.Structure

      `ALIGN_DEFAULT, ALIGN_GNUC, ALIGN_MSVC, ALIGN_NONE, CALCULATE_SIZE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Variant.VARIANT()`
    `Variant.VARIANT(boolean value)`
    `Variant.VARIANT(byte value)`
    `Variant.VARIANT(char value)`
    `Variant.VARIANT(java.util.Date value)`
    `Variant.VARIANT(double value)`
    `Variant.VARIANT(float value)`
    `Variant.VARIANT(IDispatch value)`
    `Variant.VARIANT(int value)`
    `Variant.VARIANT(long value)`
    `Variant.VARIANT(OaIdl.DATE value)`
    `Variant.VARIANT(OaIdl.SAFEARRAY array)`
    `Variant.VARIANT(OaIdl.VARIANT_BOOL value)`
    `Variant.VARIANT(Pointer pointer)`
    `Variant.VARIANT(short value)`
    `Variant.VARIANT(java.lang.String value)` Create a new VARIANT wrapping the supplied string.
    `Variant.VARIANT(WinDef.BOOL value)`
    `Variant.VARIANT(WinDef.BYTE value)`
    `Variant.VARIANT(WinDef.CHAR value)`
    `Variant.VARIANT(WinDef.LONG value)`
    `Variant.VARIANT(WinDef.SHORT value)`
    `Variant.VARIANT(WTypes.BSTR value)`
    `Variant.VARIANT(WTypes.BSTRByReference value)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `booleanValue()`
    `byte` | `byteValue()`
    `java.util.Date` | `dateValue()`
    `double` | `doubleValue()`
    `float` | `floatValue()`
    `protected OaIdl.DATE` | `fromJavaDate(java.util.Date javaDate)` Deprecated.
    `java.lang.Object` | `getValue()`
    `WTypes.VARTYPE` | `getVarType()`
    `int` | `intValue()`
    `long` | `longValue()`
    `void` | `setValue(int vt, java.lang.Object value)`
    `void` | `setValue(OaIdl.SAFEARRAY array)`
    `void` | `setValue(WTypes.VARTYPE vt, java.lang.Object value)`
    `void` | `setVarType(short vt)`
    `short` | `shortValue()`
    `java.lang.String` | `stringValue()`
    `protected java.util.Date` | `toJavaDate(OaIdl.DATE varDate)` Deprecated.

    - ### Methods inherited from class com.sun.jna.Union

      `getFieldOrder, getNativeAlignment, getTypedValue, readField, readField, setType, setType, setTypedValue, writeField, writeField, writeField`

    - ### Methods inherited from class com.sun.jna.Structure

      `allocateMemory, allocateMemory, autoAllocate, autoRead, autoRead, autoWrite, autoWrite, cacheTypeInfo, calculateSize, clear, createFieldsOrder, createFieldsOrder, createFieldsOrder, createFieldsOrder, dataEquals, dataEquals, ensureAllocated, equals, fieldOffset, getAutoRead, getAutoWrite, getFieldList, getFields, getNativeSize, getNativeSize, getPointer, getStringEncoding, getStructAlignment, hashCode, newInstance, newInstance, read, setAlignType, setAutoRead, setAutoSynch, setAutoWrite, setFieldOrder, setStringEncoding, size, sortFields, toArray, toArray, toString, toString, useMemory, useMemory, write`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### VARIANT_MISSING

          public static final Variant.VARIANT VARIANT_MISSING

    - #### _variant

          public Variant.VARIANT._VARIANT _variant

    - #### decVal

          public OaIdl.DECIMAL decVal

  - ### Constructor Detail

    - #### Variant.VARIANT

          public Variant.VARIANT()

    - #### Variant.VARIANT

          public Variant.VARIANT(Pointer pointer)

    - #### Variant.VARIANT

          public Variant.VARIANT(WTypes.BSTR value)

    - #### Variant.VARIANT

          public Variant.VARIANT(WTypes.BSTRByReference value)

    - #### Variant.VARIANT

          public Variant.VARIANT(OaIdl.VARIANT_BOOL value)

    - #### Variant.VARIANT

          public Variant.VARIANT(WinDef.BOOL value)

    - #### Variant.VARIANT

          public Variant.VARIANT(WinDef.LONG value)

    - #### Variant.VARIANT

          public Variant.VARIANT(WinDef.SHORT value)

    - #### Variant.VARIANT

          public Variant.VARIANT(OaIdl.DATE value)

    - #### Variant.VARIANT

          public Variant.VARIANT(byte value)

    - #### Variant.VARIANT

          public Variant.VARIANT(WinDef.BYTE value)

    - #### Variant.VARIANT

          public Variant.VARIANT(char value)

    - #### Variant.VARIANT

          public Variant.VARIANT(WinDef.CHAR value)

    - #### Variant.VARIANT

          public Variant.VARIANT(short value)

    - #### Variant.VARIANT

          public Variant.VARIANT(int value)

    - #### Variant.VARIANT

          public Variant.VARIANT(long value)

    - #### Variant.VARIANT

          public Variant.VARIANT(float value)

    - #### Variant.VARIANT

          public Variant.VARIANT(double value)

    - #### Variant.VARIANT

          public Variant.VARIANT(java.lang.String value)

      Create a new VARIANT wrapping the supplied string.

      Implementation note: the string is wrapped as a BSTR value, that is allocated using `OleAuto.SysAllocString(java.lang.String)` and needs to be freed using `OleAuto.SysFreeString(com.sun.jna.platform.win32.WTypes.BSTR)` by the user

      Parameters:
        `value` - to be wrapped

    - #### Variant.VARIANT

          public Variant.VARIANT(boolean value)

    - #### Variant.VARIANT

          public Variant.VARIANT(IDispatch value)

    - #### Variant.VARIANT

          public Variant.VARIANT(java.util.Date value)

    - #### Variant.VARIANT

          public Variant.VARIANT(OaIdl.SAFEARRAY array)

  - ### Method Detail

    - #### getVarType

          public WTypes.VARTYPE getVarType()

    - #### setVarType

          public void setVarType(short vt)

    - #### setValue

          public void setValue(int vt,
                      java.lang.Object value)

    - #### setValue

          public void setValue(OaIdl.SAFEARRAY array)

    - #### setValue

          public void setValue(WTypes.VARTYPE vt,
                      java.lang.Object value)

    - #### getValue

          public java.lang.Object getValue()

    - #### byteValue

          public byte byteValue()

    - #### shortValue

          public short shortValue()

    - #### intValue

          public int intValue()

    - #### longValue

          public long longValue()

    - #### floatValue

          public float floatValue()

    - #### doubleValue

          public double doubleValue()

    - #### stringValue

          public java.lang.String stringValue()

    - #### booleanValue

          public boolean booleanValue()

    - #### dateValue

          public java.util.Date dateValue()

    - #### toJavaDate

          @Deprecated
          protected java.util.Date toJavaDate(OaIdl.DATE varDate)

      Deprecated.

    - #### fromJavaDate

          @Deprecated
          protected OaIdl.DATE fromJavaDate(java.util.Date javaDate)

      Deprecated.

Copyright © 2007-2016 Timothy Wall. All Rights Reserved.