Rename file for drag and drop operation

I need to rename file in legacy fs filter driver on CDFS file system for drag and drop
operation for some processes. I intercept all query directory and query file name information calls and modify to apropriate one, for single entry call despite there is old file name I return the valid one. It works fine when I use the same application to choose and open file but the problem occurs when I use different application to choose file and different one to open it (like in drag and drop). I can properly open it but the application displays old filename. Returning STATUS_REPARSE in create call does not work at all. Does the application take file name form file object? Do you have any idea what is missing?

Thanks,
Adam

Do you filter fast I/O path?

27 окт. 2016 г. 10:42 AM пользователь
написал:

> I need to rename file in legacy fs filter driver on CDFS file system for
> drag and drop
> operation for some processes. I intercept all query directory and query
> file name information calls and modify to apropriate one, for single entry
> call despite there is old file name I return the valid one. It works fine
> when I use the same application to choose and open file but the problem
> occurs when I use different application to choose file and different one to
> open it (like in drag and drop). I can properly open it but the application
> displays old filename. Returning STATUS_REPARSE in create call does not
> work at all. Does the application take file name form file object? Do you
> have any idea what is missing?
>
> Thanks,
> Adam
>
> —
> NTFSD is sponsored by OSR
>
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer&gt;
></http:>

No, I don’t. Which of those might be important from my perspective?

Thanks,
Adam

FastIoQueryOpen

27 окт. 2016 г. 3:50 PM пользователь
написал:

> No, I don’t. Which of those might be important from my perspective?
>
> Thanks,
> Adam
>
> —
> NTFSD is sponsored by OSR
>
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer&gt;
></http:>

Unfortunately it did not help, Correct me if I’m wrong but the names for drag and drop comes with event if app will use it to display it there is nothing I can do, Do you know if is there any Windows userspace api to intercept drag and drop operation?

Thanks,
Adam

Drag and drop is file renaming or copying operation. That means the file
would be opened by a name you modified. Thus, do you intercept open
requests to let
underlying file system to see real name? I think you do. It became problem
when you intercept and modify IRP_MJ_CREATE, but don’t filter
FastIoQueryOpen
at all. Many userspace requests are being broken for this reason. That’s
the reason i ask you about intercepting FastIoQueryOpen. Possibly, i
misunderstood
something.

Was i right about your intercepting of open requests?
How did you interceped FastIoQueryOpen? To prove of concept it’s enough to
“return false” there.

2016-10-30 9:00 GMT+03:00 :

> Unfortunately it did not help, Correct me if I’m wrong but the names for
> drag and drop comes with event if app will use it to display it there is
> nothing I can do, Do you know if is there any Windows userspace api to
> intercept drag and drop operation?
>
> Thanks,
> Adam
>
> —
> NTFSD is sponsored by OSR
>
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer&gt;
></http:>

I think the OP meant “dropping” a file to application’s window which is a file opening.

I didn’t think about such scenario, but this doesn’t change a lot. The fact
is opening by modified name is failed.

2016-10-30 20:16 GMT+03:00 :

>


>
> I think the OP meant “dropping” a file to application’s window which is a
> file opening.
>
> —
> NTFSD is sponsored by OSR
>
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer&gt;
></http:>

The OP set it clearly that a file was opened but an application displayed an old name. If I got it right the old name was for a file that was different from a redirected one and the application displayed redirected file’s data but the old name in GUI.

> The OP set it clearly that a file was opened but an application displayed
an old name. If I got it right the old name was for a file that was
different from a redirected one and the application displayed redirected
file’s data but the old

name in GUI.

Seems like i misunderstood everything.

I need to rename file in legacy fs filter driver on CDFS file system for
drag and drop
operation for some processes.

I intercept all query directory and query file name information calls and
modify to apropriate one

Do you modify names only for specific processes?

I can properly open it but the application displays old filename.

The only reason is you missed name modifying

File open succeeds, it is handled differently by the driver itself. Yes I do simply return status false for FastIoQueryOpen.
My problem is dragging files from eg. explorer, which should see old file names and drop into another application which should see the new file name. My concern is what I can do if the application takes the names provided by event? Or what is missing in filter driver?

Thanks,
Adam

> My problem is dragging files from eg. explorer, which should see old file
names and drop into another application which should see the new file name.
My concern is what I can do if the application takes the names provided by
event? > Or what is missing in filter driver?

When you dragging name to another application, you drag old one, and the
application will see it. Or i didn’t undestand you again.

Where new name of file comes from?

2016-10-30 21:58 GMT+03:00 :

> File open succeeds, it is handled differently by the driver itself. Yes I
> do simply return status false for FastIoQueryOpen.
> My problem is dragging files from eg. explorer, which should see old file
> names and drop into another application which should see the new file name.
> My concern is what I can do if the application takes the names provided by
> event? Or what is missing in filter driver?
>
> Thanks,
> Adam
>
> —
> NTFSD is sponsored by OSR
>
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer&gt;
></http:>

I’m changing the file name in driver The only problem is displaying dropped file name in application.

When you decides to change file name?

Very simple logic, always when IRP comes from prcoess defined for name change.

You have thought right. You need to intercept drag and drop event. Filter
driver can’t help in such case.

2016-10-31 9:14 GMT+03:00 :

> Very simple logic, always when IRP comes from prcoess defined for name
> change.
>
> —
> NTFSD is sponsored by OSR
>
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer&gt;
></http:>