FltReissueSynchronousIo and mapped network drive

Hi,

We have a product with typical antivirus logic: minifilter notifies UM service about files, UM processes them somehow. During processing UM opens file target file. If 2nd application tries to open file, it might get “sharing violation” error (and some other errors because UM service actions). To solve this problem minifilter has following logic in PostCreate:

if (  CallbackData->IoStatus.Status == STATUS_SHARING_VIOLATION || CallbackData->IoStatus.Status == STATUS_USER_MAPPED_FILE )
{
    if ( UM service is working with this file right now )
    {
        // ask UM to stop working with this file.
          ...
        // UM influence is removed - reissue io
        FltReissueSynchronousIo( Instance, CallbackData );
    }
}

It works fine for local files and for network files when application\user opens to them by regular network path (\ServerName\ShareName\FileName.ext).
The problem is that if user maps “\ServerName\ShareName” to “Z:” drive and opens the same file by “Z:\FileName.ext”, then after FltReissueSynchronousIo call I have 0xC0000039 in IoStatus.Status. Which is STATUS_OBJECT_PATH_INVALID. I don’t do any changes in CallbackData - use the same as filter manager passes to PostCreate callback.

Do you have any ideas how to make it work with mapped network drives?

Thanks,
Alex.

I found a solution. If anyone is interested, please reply here and I’ll share.

Posting a solution to a problem is always appreciated.