BSTR extension type com

A strongly-typed wrapper around a COM BSTR.

BSTR is a length-prefixed, UTF-16 encoded string type used extensively throughout COM and Automation APIs. Unlike typical C strings:

  • The length is stored separately (in bytes)
  • Embedded NUL characters are permitted
  • Memory must be released using SysFreeString
on
Implemented types

Constructors

BSTR(Pointer<Utf16> _)
const

Properties

address → int
Access to the raw pointer value. On 32-bit systems, the upper 32-bits of the result are 0.
no setterinherited
byteLength → int
The length of the string in bytes, excluding the terminating NUL.
no setter
hashCode → int
The hash code for a Pointer only depends on its address.
no setterinherited
isEmpty → bool
Whether this string contains zero UTF-16 code units.
no setter
length → int
The number of UTF-16 code units in this string, excluding the terminating NUL character.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

cast<U extends NativeType>() → Pointer<U>
Reinterprets the address of this pointer as the address of a U.
inherited
copy() → BSTR
Creates a deep copy of this BSTR.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDartString() → String
Converts this BSTR to a Dart string.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
Equality for Pointers only depends on their address.
inherited