Class WTypes2.LPWSTRByReference

java.lang.Object
com.sun.jna.PointerType
com.sun.jna.ptr.ByReference
com.github.markusbernhardt.proxy.jna.win.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.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Memory disposal.
    private com.sun.jna.Pointer
     
    Gets the string as pointed to by the LPWSTR or null if there's no LPWSTR.
    com.sun.jna.platform.win32.WTypes.LPWSTR
    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 Details

    • LPWSTRByReference

      public LPWSTRByReference()
  • Method Details

    • 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 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 Throwable
      Memory disposal.
      Overrides:
      finalize in class Object
      Throws:
      Throwable - Something went wrong when cleaning up the memory.