RP_MN_NOTIFY_CHANGE_DIRECTORY is always called non-strop

hello,

I develop a virtual device driver file system mapped to a logical drive (N: for example).
The logical drive managed by a user process by intermediate of my driver.

The process of testing shows 12 files cans, the function of reading data file works.

In other test process I am call API FindFirstFile and FindNextFile and FindClose in driver n: and i view good my 12 files.

I have a worry in the explorer when I click on drive n:, I can see my 12 files but
the command IRP_MN_NOTIFY_CHANGE_DIRECTORY is always called (nonstop) and I shall return a STATUS_SUCCESS.
it always called until close the explorer drive n:.

Can you help please ?

Thank you.

> the command IRP_MN_NOTIFY_CHANGE_DIRECTORY is always called (nonstop) and I shall

return a STATUS_SUCCESS.
it always called until close the explorer drive n:.

Yes, this is how the shell refreshes its views on filesystem changes.

You should properly handle this IRP.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

but it is time to call !
it’s not normal.

the manager task showing 100% of my user-process , i should be call Sleep 100 ms.

by cons’s system remains stable.

I’m not sure I understand your question… and I’m not sure why a device driver would be getting or handling an IRP_MJ_DIRECTORY_CONTROL, IRP_MN_NOTIFY_CHANGE_DIRECTORY request… such requests are typically only handled by file systems. So, first of all, you probably should explain to us why you’re seeing and trying to handle this request.

BUT… if you were a FILE SYSTEM (your post would be better over on the NTFSD list and) the way you handle this request is to return STATUS_PENDING until a change takes place in the directory. When the change takes place, you complete the request with STATUS_SUCCESS. Thus, by continually completing the IRP with SUCCESS, you’re ensuring you’ll immediately receive back another _CHANGE_DIRECTORY request, which sounds like exactly what’s happening.

You should probably read the docs, which actually explain this:
http://msdn.microsoft.com/en-us/library/ff548658(VS.85).aspx

Again… you also probably want to explain why you’re trying to handle this…

Peter
OSR

yes, but how detec change takes place directory ?

LET ME REPEAT what I said above:

So… explain what you’re trying to do, and why your DEVICE DRIVER would be receiving and attempting to handle this request in the first place. Because doing so makes no sense.

Peter
OSR

sivaller wrote:

yes, but how detec change takes place directory ?

It’s your file system, you tell us.