SysAllocString function Null safety oleaut32

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

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

BSTR SysAllocString(
  const OLECHAR *psz
);

Implementation

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