WindowsDuplicateString function Null safety winrt

int WindowsDuplicateString(
  1. int string,
  2. Pointer<IntPtr> newString
)

Creates a copy of the specified string.

HRESULT WindowsDuplicateString(
  HSTRING string,
HSTRING *newString
);

Implementation

int WindowsDuplicateString(int string, Pointer<IntPtr> newString) {
  final _WindowsDuplicateString =
      _api_ms_win_core_winrt_string_l1_1_0.lookupFunction<
          Int32 Function(IntPtr string, Pointer<IntPtr> newString),
          int Function(
              int string, Pointer<IntPtr> newString)>('WindowsDuplicateString');
  return _WindowsDuplicateString(string, newString);
}