Package com.sun.jna.platform.win32
Klasse WTypes.BSTR
java.lang.Object
com.sun.jna.PointerType
com.sun.jna.platform.win32.WTypes.BSTR
- Alle implementierten Schnittstellen:
NativeMapped
- Umschließende Schnittstelle:
WTypes
BSTR wrapper.
From MSDN:
A BSTR (Basic string or binary string) is a string data type that is used by COM, Automation, and Interop functions. Use the BSTR data type in all interfaces that will be accessed from script.
The memory structure:
- Length prefix
- Length of the data array holding the string data and does not include the final two NULL characters.
- Data string
- UTF-16LE encoded bytes for the string.
- Terminator
- Two null characters
The "value" of the BSTR is the pointer to the start of the Data String, the length prefix is the four bytes before that.
The MSDN states, that a BSTR derived from a Nullpointer is treated as a string containing zero characters.
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Von Klasse geerbte Methoden com.sun.jna.PointerType
equals, fromNative, getPointer, hashCode, nativeType, setPointer, toNative
-
Konstruktordetails
-
BSTR
public BSTR() -
BSTR
Instantiate a BSTR from a pointer. The user is responsible for allocating and releasing memory for theWTypes.BSTR
, most commonly usingOleAuto.SysAllocString(String)
andOleAuto.SysFreeString(com.sun.jna.platform.win32.WTypes.BSTR)
- Parameter:
pointer
- A pointer to the string
-
BSTR
-
-
Methodendetails
-
setValue
Veraltet.Users should not change the value of an allocatedWTypes.BSTR
. -
getValue
-
toString
- Setzt außer Kraft:
toString
in KlassePointerType
-
OleAuto.SysAllocString(String)
andOleAuto.SysFreeString(com.sun.jna.platform.win32.WTypes.BSTR)