c++ - Keep windows trying to read a file -


I am working in a type of Windows file system caps.

When users open a file, call windows to my driver to provide data. In normal operation the driver caches the driver file content, which is cached, however, in some cases the real file is cached And I need to download it from the network.

The question is whether Windows is possible to try to read the file without blocking the entire drive operation, neither the software that opens the file, allows the user to cancel the process of opening is.

First of all, I tried to block the driver, as long as the data is not available, this solution is simpler to implement, but the user experience is not the best. Apart from this, it is not a good idea to trust network transfers, the transfer can last for a long time and the driver will block that time.

On the other hand, I have applied, only when the data is cached, and when the file is not available, then tell the windows that the file is a 0 size length, and the file is in the background projection download. With this, the driver does not block the windows, and the user experience improves, but the user needs to open the file n times, as long as the data is not available.

I think the best solution would be to return windows, like a message like "no data is available, try again in 5 seconds", I think if the driver returns the epiphrayt error code back to the windows But the error list is too long and the names are not always descriptive you want.

Do you have any advice on applying this? thank you in advanced.

The behavior you apply is correct for the driver. The responsibility of is at a high level. For example, Windows Explorer is not very careful trying to retrieve a byte from any file, purely dependent on metadata.

However, when you are busy, it is a failure that forces users to open a file repeatedly.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -