ReOpenFile function Null safety kernel32

int ReOpenFile(
  1. int hOriginalFile,
  2. int dwDesiredAccess,
  3. int dwShareMode,
  4. int dwFlagsAndAttributes
)

Reopens the specified file system object with different access rights, sharing mode, and flags.

HANDLE ReOpenFile(
  HANDLE hOriginalFile,
  DWORD  dwDesiredAccess,
  DWORD  dwShareMode,
  DWORD  dwFlagsAndAttributes);

Implementation

int ReOpenFile(int hOriginalFile, int dwDesiredAccess, int dwShareMode,
    int dwFlagsAndAttributes) {
  final _ReOpenFile = _kernel32.lookupFunction<
      IntPtr Function(IntPtr hOriginalFile, Uint32 dwDesiredAccess,
          Uint32 dwShareMode, Uint32 dwFlagsAndAttributes),
      int Function(int hOriginalFile, int dwDesiredAccess, int dwShareMode,
          int dwFlagsAndAttributes)>('ReOpenFile');
  return _ReOpenFile(
      hOriginalFile, dwDesiredAccess, dwShareMode, dwFlagsAndAttributes);
}