How can I access the files that are in-use by other processes. Say there is this file called “locked.txt”, which is in use by process A. Now how can I copy this file to another location programmatically. Normal methods will fail with the error “The process cannot access the file because it is being used by another
If the file was opened in non shared mode then you won’t be able to access it from another process using Win32 API. However, you still can open the volume device in raw mode (bypassing the filesystem) and read sectors containing file data.