M
M
martensit2018-07-24 08:30:27
C++ / C#
martensit, 2018-07-24 08:30:27

Is it possible in c# to read bytes from a file "occupied by another process"?

Unable to read bytes from file using ReadAllBytes.
The file is in use by another process.
And it is desirable not to kill this process.
Is there anyway to read this file?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
F
freeExec, 2018-07-24
@martensit

Depends on how much you want it. Technically, you, the name of administrative rights, bypassing the OS, can directly work with disk sectors, the only thing is that data that is in the cache and not flushed to disk cannot be read.

L
LiptonOlolo, 2018-07-24
@LiptonOlolo

No.

M
m0nym, 2018-07-24
@m0nym

https://msdn.microsoft.com/en-us/library/ms809754.aspx
_

D
Dmitry Bashinsky, 2018-07-24
@BashkaMen

Try to copy the file (File.Copy) and read the copy

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question