Does the rawdisk driver/api handle "LockFileEx()" partially locked files (an example could be outlook.pst that is not entirely locked but only partially) ?

Outlook seems not to ask exclusive access to the whole pst file, so the application detects an "unlocked" file tries to copy it and fails in the middle of the operation.

If I ask an handle with TRawdisk.CreateFile() on a partially locked file, will I be able to completely read it (even on the locked region) ? will the driver detect it as a locked file or unlocked one ?

Before I ask my boss to buy the licence plus the modification could you just confirm me that with this modification I will be able to at least copy the entire content of an outlook.pst file (even if outlook is running of course) ?
[I know that this will not solve the "incoherence" issue of a mail arriving in mailbox in the middle of the file reading, but I want to be sure that I can at least save the file in "normal" conditions]

If he pays and then this does not work, I could put myself in some trouble :o)

Yes. You will be able to make the entire copy of outlook.pst.
But there is a small problem - because RawDisk doesn't intercept file operations it isn't possible to make a "snapshot" for a file. RawDisk works in the following way - it contains a kernel mode driver and uses it to send I/O requests (that bypass file sharing and security mechanisms) to a destination file. But in the same time when RawDisk is performing a file reading another process can write to it and as a result the copy will be incorrect. But you can workaround the problem for example by obtaining the last write time for the file before and after its copying.

Indeed I am aware that I can copy an inconsistent file if any write operation occurs before I terminate the read operation, but for a PST file this will occur less often than a database file, so I can accept the "risk".
But of course I will return some warning mechanism like the one you describe.

I will inform by boss , he will contact you directly to buy the licence I think.

We use cookies to help provide you with the best possible online experience. By using this site, you agree that we may store and access cookies on your device. You can find out more about and set your own preferences here.