pcwstr method

PCWSTR pcwstr(
  1. String string
)

Creates a null-terminated UTF-16 string (PCWSTR) from a Dart string whose lifetime is bound to this Arena.

The string is allocated using the arena allocator and freed automatically when the arena is disposed.

Use this helper for Win32 APIs that take read-only wide strings (PCWSTR).

Implementation

PCWSTR pcwstr(String string) => string.toPcwstr(allocator: this);