Directory monitoring

Hi,

I have a project to transform files dropped just in a directory. Before the file becomes accessible to any process, this transformation has to happen. The code to do the transformation is fully in userspace. Will I be able to write a UMD to do this?

I am new to driver writing. Is there any sample I could adapt my code from?

Any pointers will be much appreciated

Thx
Sam

You need a FltMgr-based minifilter and the user process of your own.

The user process can communicate to the kernel minifilter using “ports” and inverted calls (provided by the FltMgr framework).

The most complex point in this project: what if reboot will be forces in-the-middle? will some files left to be non-transformed?


Maxim S. Shatskih
Microsoft MVP on File System And Storage
xxxxx@storagecraft.com
http://www.storagecraft.com

wrote in message news:xxxxx@ntfsd…
> Hi,
>
> I have a project to transform files dropped just in a directory. Before the file becomes accessible to any process, this transformation has to happen. The code to do the transformation is fully in userspace. Will I be able to write a UMD to do this?
>
> I am new to driver writing. Is there any sample I could adapt my code from?
>
> Any pointers will be much appreciated
>
> Thx
> Sam
>

I am not going to say I know a lot about this, but maybe checking the change
log if that reboot happens to catch what was missed along with some logging.
Monitoring the change log continuously has a lot of overhead but to do it
just at start up would not be bad. I am working on something to catch the
changes to certain files to update a database with the changes and the
change log was an option until I saw it used 25% cpu constantly…

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
Sent: Thursday, November 14, 2013 1:56 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] Directory monitoring

You need a FltMgr-based minifilter and the user process of your own.

The user process can communicate to the kernel minifilter using “ports”
and inverted calls (provided by the FltMgr framework).

The most complex point in this project: what if reboot will be forces
in-the-middle? will some files left to be non-transformed?


Maxim S. Shatskih
Microsoft MVP on File System And Storage xxxxx@storagecraft.com
http://www.storagecraft.com

wrote in message news:xxxxx@ntfsd…
> Hi,
>
> I have a project to transform files dropped just in a directory. Before
the file becomes accessible to any process, this transformation has to
happen. The code to do the transformation is fully in userspace. Will I be
able to write a UMD to do this?
>
> I am new to driver writing. Is there any sample I could adapt my code
from?
>
> Any pointers will be much appreciated
>
> Thx
> Sam
>


NTFSD is sponsored by OSR

OSR is hiring!! Info at http://www.osr.com/careers

For our schedule of debugging and file system seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Thanks!

One question, is there anyway I can cache the received byte stream to another file in a different folder before transforming?

I haven’t used dokan, will that help in anyway?

Thx

Sam

> I haven’t used dokan, will that help in anyway?

No, Dokan is for other kind of tasks - i.e. to represent any data collection (not FS in usual sense at all, or not Windows-compatible FS) as a Windows FSD.


Maxim S. Shatskih
Microsoft MVP on File System And Storage
xxxxx@storagecraft.com
http://www.storagecraft.com