Class Winnt.LPWSTR

  • All Implemented Interfaces:
    Native
    Enclosing class:
    Winnt

    public static class Winnt.LPWSTR
    extends Struct32
    Wrapper for LPWSTR.

    A pointer to a null-terminated string of 16-bit Unicode characters. For more information, see Character Sets Used By Fonts.
    This type is declared in WinNT.h as follows:
    typedef WCHAR *LPWSTR;

    The wrapper for a byte buffer. The position of the buffer is always 0! It must be reset to 0 if changed. The limit of the buffer is always amount of valid bytes in the buffer and must be set if the amount of valid bytes changed.
    • Constructor Detail

      • LPWSTR

        public LPWSTR​(int elementLength,
                      boolean clearMemory)
        Creates space for a Wide String (16 bit)
        Parameters:
        elementLength -
        clearMemory -
    • Method Detail

      • sizeof

        @SizeOf
        public static final int sizeof()
      • stringValueOfNullTerminated

        public static String stringValueOfNullTerminated​(WinDef.LPBYTE lpData)
        Skip the last two 0 bytes aka the last 0 char
        Parameters:
        lpData -
        Returns:
      • getString

        public String getString()
        return the NULL terminated string @baseaddress
        Returns:
      • clear

        public void clear()
      • resetBufferEnd

        public void resetBufferEnd()