LockFileEx function kernel32

int LockFileEx(
  1. int hFile,
  2. int dwFlags,
  3. int dwReserved,
  4. int nNumberOfBytesToLockLow,
  5. int nNumberOfBytesToLockHigh,
  6. Pointer<OVERLAPPED> lpOverlapped,
)

Locks the specified file for exclusive access by the calling process. This function can operate either synchronously or asynchronously and can request either an exclusive or a shared lock.

BOOL LockFileEx(
  [in]      HANDLE       hFile,
  [in]      DWORD        dwFlags,
            DWORD        dwReserved,
  [in]      DWORD        nNumberOfBytesToLockLow,
  [in]      DWORD        nNumberOfBytesToLockHigh,
  [in, out] LPOVERLAPPED lpOverlapped
);

Implementation

int LockFileEx(
        int hFile,
        int dwFlags,
        int dwReserved,
        int nNumberOfBytesToLockLow,
        int nNumberOfBytesToLockHigh,
        Pointer<OVERLAPPED> lpOverlapped) =>
    _LockFileEx(hFile, dwFlags, dwReserved, nNumberOfBytesToLockLow,
        nNumberOfBytesToLockHigh, lpOverlapped);