Webastor - Programming Tips and Tricks

OS => Windows => Topic started by: Damien on October 24, 2014, 10:04:02 AM

Title: Who locked file?
Post by: Damien on October 24, 2014, 10:04:02 AM
Hi all, I would like to ask you a big problem, I hope you can help me, who locked file? Please answer me this question.
Title: Re: Windows locked file
Post by: Cassius on May 13, 2017, 09:33:45 AM
Locks the specified file for exclusive access by the calling process.
To specify additional options, for example creating a shared lock or for block-on-fail operation, use the LockFileEx function.
Syntax

C++

BOOL WINAPI LockFile(
  _In_ HANDLE hFile,
  _In_ DWORD  dwFileOffsetLow,
  _In_ DWORD  dwFileOffsetHigh,
  _In_ DWORD  nNumberOfBytesToLockLow,
  _In_ DWORD  nNumberOfBytesToLockHigh
);