Klasse Convert
java.lang.Object
com.sun.jna.platform.win32.COM.util.Convert
This class is considered internal to the package.
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic voidfree(Variant.VARIANT variant, Class<?> javaType) Free the contents of the supplied VARIANT.static voidfree(Variant.VARIANT variant, Object value) Free the contents of the supplied VARIANT.static <T extends IComEnum>
Tstatic ObjecttoJavaObject(Variant.VARIANT value, Class<?> targetClass, ObjectFactory factory, boolean addReference, boolean freeValue) static Variant.VARIANTConvert a java value into a VARIANT suitable for passing in a COM invocation.
-
Konstruktordetails
-
Convert
Convert()
-
-
Methodendetails
-
toVariant
Convert a java value into a VARIANT suitable for passing in a COM invocation.Implementation notes
- VARIANTs are not rewrapped, but passed through unmodified
- A string is wrapped into a BSTR, that is wrapped into the VARIANT.
The string is allocated as native memory by the VARIANT constructor. The
BSTR needs to be freed by
OleAuto.SysFreeString(com.sun.jna.platform.win32.WTypes.BSTR).
- Parameter:
value- to be wrapped- Gibt zurück:
- wrapped VARIANT
-
toJavaObject
public static Object toJavaObject(Variant.VARIANT value, Class<?> targetClass, ObjectFactory factory, boolean addReference, boolean freeValue) -
toComEnum
-
free
Free the contents of the supplied VARIANT.This method is a companion to
toVariant(java.lang.Object). Primary usage is to free BSTRs contained in VARIANTs.- Parameter:
variant- to be clearedjavaType- type before/after conversion
-
free
Free the contents of the supplied VARIANT.This method is a companion to
toVariant(java.lang.Object). Primary usage is to free BSTRs contained in VARIANTs.- Parameter:
variant- to be clearedvalue- value before/after conversion
-