1
If i have an Excel file SomeFile.xlsx
open, a file is created ~SomeFile.xlsx
that contains the name of the user who has opened/locked the Excel file. I can't directly open the file in Notepad, but I can copy it and then open the copy.
If the file can be copied then obviously it can be opened for read access. So why can't I just open it in Notepad?
1Cheer duDE! So does that mean there's a low level API that will let me read the file without copying it first? – 3-14159265358979323846264 – 2019-11-01T13:11:37.433
Sure, the Win32API: https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-unlockfile
– duDE – 2019-11-01T13:27:24.933So is that the method Windows Explorer uses when it copies a file? UnlockFile > Read > Write > (Relock?). – 3-14159265358979323846264 – 2019-11-01T13:39:49.223
With high probability that is it ;) – duDE – 2019-11-01T13:44:50.613