EldoS | Feel safer!

Software components for data protection, secure storage and transfer

OnRenameOrMoveFileC needs Parameter RepalceIfExists

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#20889
Posted: 07/26/2012 03:42:58
by Christian Wimmer (Standard support level)
Joined: 11/18/2011
Posts: 16

Hi

I'm using OnRenameOrMoveFileC to watch and intercept renames of specific files. I do the renaming myself on certain cases (using MoveFileEx). This works fine. However, the callback seems to mimic MoveFile but not MoveFileEx which contains an extra parameter dwFlags.
Especially, the flag MOVEFILE_REPLACE_EXISTING is necessary to me, because some file manager applications like Explorer omit this flag to test, whether a file with the target name already exists. If MoveFileEx fails because of this, the user is informed to use another name. On the other hand, many other applications don't care about existing files (like Excel) and want to overwrite them.

Unfortunately, I cannot test for this case because I don't know about the flags. At the moment, I have a list of process names to distinguish between such applications. But this is not the best solution.

Can you give me an advice?


Filter: 2.3.49.171
OS: Win7 32/64
#20893
Posted: 07/26/2012 05:30:44
by Vladimir Cherniga (EldoS Corp.)

Hi,
Quote
However, the callback seems to mimic MoveFile but not MoveFileEx which contains an extra parameter dwFlags.

There is no difference between these operations from the kernel side. The request is made by NtSetInfomationFile and represent in kernel with a structure
Code
        struct {
            ULONG Length;
            FILE_INFORMATION_CLASS POINTER_ALIGNMENT FileInformationClass;
            PFILE_OBJECT FileObject;
            union {
                struct {
                    BOOLEAN ReplaceIfExists;
                    BOOLEAN AdvanceOnly;
                };
                ULONG ClusterCount;
                HANDLE DeleteHandle;
            };
        } SetFile;


Unfortunately, the flag ReplaceIfExists is not implemented in current version of CallbackFilter. We may add this parameter to the next release.
#21059
Posted: 08/20/2012 03:55:16
by Christian Wimmer (Standard support level)
Joined: 11/18/2011
Posts: 16

Okay.
Unfortunately, to mimic a file system on top of a filesystem this flag is necessary.
#21060
Posted: 08/20/2012 05:21:59
by Vladimir Cherniga (EldoS Corp.)

We will implement it in CallbackFilter version 3.0 expected within month.
#22462
Posted: 11/13/2012 04:57:01
by Christian Wimmer (Standard support level)
Joined: 11/18/2011
Posts: 16

Anything new on this?
#22463
Posted: 11/13/2012 04:59:26
by Eugene Mayevski (EldoS Corp.)

Unfortunately no news so far. CallbackFilter 3 moves slower than expected due to large number of support requests.


Sincerely yours
Eugene Mayevski
Also by EldoS: SecureBlackbox
200+ components and classes for digital security, signing, encryption and secure networking.

Reply

Statistics

Topic viewed 1919 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!