bstr method

BSTR bstr(
  1. String string
)

Creates a BSTR from a Dart string whose lifetime is bound to this Arena.

The returned string is owned by the arena and is released using SysFreeString when the arena is disposed.

Use this helper when calling COM APIs that require a BSTR.

Implementation

BSTR bstr(String string) => this.using(string.toBstr(), SysFreeString);