Class WTypes2.LPWSTRByReference

  • All Implemented Interfaces:
    com.sun.jna.NativeMapped
    Enclosing class:
    WTypes2

    public static class WTypes2.LPWSTRByReference
    extends com.sun.jna.ptr.ByReference
    A pointer to a LPWSTR.

    LPWSTR is itself a pointer, so a pointer to an LPWSTR is really a pointer-to-pointer. This class hides this complexity and also takes care of memory disposal.

    The class is useful where the Windows function returns a result into a variable of type LPWSTR*. The class currently has no setters so it isn't useful for the opposite case, i.e. where a Windows function accepts a LPWSTR* as its input.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void finalize()
      Memory disposal.
      private com.sun.jna.Pointer getPointerToString()  
      java.lang.String getString()
      Gets the string as pointed to by the LPWSTR or null if there's no LPWSTR.
      com.sun.jna.platform.win32.WTypes.LPWSTR getValue()
      Gets the LPWSTR from this pointer.
      • Methods inherited from class com.sun.jna.ptr.ByReference

        toString
      • Methods inherited from class com.sun.jna.PointerType

        equals, fromNative, getPointer, hashCode, nativeType, setPointer, toNative
      • Methods inherited from class java.lang.Object

        clone, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • LPWSTRByReference

        public LPWSTRByReference()
    • Method Detail

      • getValue

        public com.sun.jna.platform.win32.WTypes.LPWSTR getValue()
        Gets the LPWSTR from this pointer. In general its a lot more convenient simply to use getString.
        Returns:
        LPWSTR from this pointer
      • getString

        public java.lang.String getString()
        Gets the string as pointed to by the LPWSTR or null if there's no LPWSTR.
        Returns:
        LPWSTR from this pointer
      • getPointerToString

        private com.sun.jna.Pointer getPointerToString()
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Memory disposal.
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable - Something went wrong when cleaning up the memory.