SysAllocStringByteLen function Null safety oleaut32

Pointer<Utf16> SysAllocStringByteLen(
  1. Pointer<Utf8> psz,
  2. int len

Takes an ANSI string as input, and returns a BSTR that contains an ANSI string. Does not perform any ANSI-to-Unicode translation.

BSTR SysAllocStringByteLen(
  LPCSTR psz,
  UINT   len


Pointer<Utf16> SysAllocStringByteLen(Pointer<Utf8> psz, int len) {
  final _SysAllocStringByteLen = _oleaut32.lookupFunction<
      Pointer<Utf16> Function(Pointer<Utf8> psz, Uint32 len),
      Pointer<Utf16> Function(
          Pointer<Utf8> psz, int len)>('SysAllocStringByteLen');
  return _SysAllocStringByteLen(psz, len);