The Win32 function LockFileEx "locks the specified file for exclusive access by the calling process."
https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-lockfileex
My question is, is there similar functionality to allow for process A to let only process B have exclusive access to a file?
e.g.
Initially, Process B and C both have access to File.
Then, Process A calls {function}.
Afterwards, only Process B has the ability to access File.
Last edited on