Documentation ¶
Index ¶
Constants ¶
const MinWStringCap = 310
Uint16BufferSize is the buffer size in the pool, chosen somewhat arbitrarily to accommodate large path strings: MAX_PATH (260) + size of volume GUID prefix (49) + null terminator = 310.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WString ¶
type WString struct {
// contains filtered or unexported fields
}
WString is a wide string buffer ([]uint16) meant for storing UTF-16 encoded strings for interacting with Win32 APIs. Sizes are specified as uint32 and not int.
It is not thread safe.
func NewWString ¶
func NewWString() *WString
NewWString returns a WString allocated from a shared pool with an initial capacity of at least MinWStringCap. Since the buffer may have been previously used, its contents are not guaranteed to be empty.
The buffer should be freed via WString.Free
func (*WString) Pointer ¶
Pointer returns a pointer to the first uint16 in the buffer. If the WString.Free has already been called, the pointer will be nil.