SysAllocString function Null safety oleaut32

Pointer<Utf16> SysAllocString(
  1. Pointer<Utf16> psz
)

Allocates a new string and copies the passed string into it.

BSTR SysAllocString(
  const OLECHAR *psz
);

Implementation

Pointer<Utf16> SysAllocString(Pointer<Utf16> psz) {
  final _SysAllocString = _oleaut32.lookupFunction<
      Pointer<Utf16> Function(Pointer<Utf16> psz),
      Pointer<Utf16> Function(Pointer<Utf16> psz)>('SysAllocString');
  return _SysAllocString(psz);
}