WindowsCreateString function Null safety winrt

int WindowsCreateString(
  1. Pointer<Utf16> sourceString,
  2. int length,
  3. Pointer<IntPtr> string
)

Creates a new HSTRING based on the specified source string.

HRESULT WindowsCreateString(
  PCNZWCH sourceString,
  UINT32  length,
  HSTRING *string
);

Implementation

int WindowsCreateString(
        Pointer<Utf16> sourceString, int length, Pointer<IntPtr> string) =>
    _WindowsCreateString(sourceString, length, string);