SetFileShortName function Null safety kernel32

int SetFileShortName(
  1. int hFile,
  2. Pointer<Utf16> lpShortName

Sets the short name for the specified file. The file must be on an NTFS file system volume.

BOOL SetFileShortNameW(
  HANDLE  hFile,
  LPCWSTR lpShortName);


int SetFileShortName(int hFile, Pointer<Utf16> lpShortName) {
  final _SetFileShortName = _kernel32.lookupFunction<
      Int32 Function(IntPtr hFile, Pointer<Utf16> lpShortName),
      int Function(int hFile, Pointer<Utf16> lpShortName)>('SetFileShortNameW');
  return _SetFileShortName(hFile, lpShortName);