I have a problem which is similar to a post that appeared today by “Petr Kurtin” about “File Contexts”. The problem is when I receive IRP_MJ_CLEANUP, I clean up my streamhandlecontext and then send a message to an external application about the file getting closed. At this point the application tries to read the file from disk. This works fine most of the time however occassionally I see that the application gets access denied while trying to read that file. I assume that I should be doing this in the last IRP_MJ_CLEANUP call.
I also read the article: http://www.osronline.com/article.cfm?id=102 (Tracking State and Context)
The article suggests looking at the SectionObjectPointers, how do I get access to this?.
Also, What is the difference between StreamContext and StreamHandleContext?
when I copy files from windows explorer, I see that some of the files have their datasectionobject as non-null so skip deleting my context and informing the external app. However, I never receive another IRP_MJ_CLEANUP.
You seem to be at the beginning, so here are some points which you could
study, which will help you.
First you need to understand difference between IRP_MJ_CLEANUP and
IRP_MJ_CLOSE. Nagar book is possible reference source for this point.
Second regards difference between stream handle context and stream context I
thought this was descibed in IFS/WDK? It is like the difference between
FileObject and FileObject->FsContext which we often refer to as FCB (or
SCB). Nagar book is possible reference.
You should never see more than one IRP_MJ_CLEANUP for same stream handle
context (lifecycle of file object).
wrote in message news:xxxxx@ntfsd… > Hello Folks, > > I have a problem which is similar to a post that appeared today by “Petr > Kurtin” about “File Contexts”. The problem is when I receive > IRP_MJ_CLEANUP, I clean up my streamhandlecontext and then send a message > to an external application about the file getting closed. At this point > the application tries to read the file from disk. This works fine most of > the time however occassionally I see that the application gets access > denied while trying to read that file. I assume that I should be doing > this in the last IRP_MJ_CLEANUP call. > > I also read the article: > http://www.osronline.com/article.cfm?id=102 (Tracking State and Context) > The article suggests looking at the SectionObjectPointers, how do I get > access to this?. > > Also, What is the difference between StreamContext and > StreamHandleContext? > > Any help is much appreciated. > > Thanks. > >
wrote in message news:xxxxx@ntfsd… > Hello Folks, > > I have a problem which is similar to a post that appeared today by “Petr Kurtin” about “File Contexts”. The problem is when I receive IRP_MJ_CLEANUP, I clean up my streamhandlecontext and then send a message to an external application about the file getting closed. At this point the application tries to read the file from disk. This works fine most of the time however occassionally I see that the application gets access denied while trying to read that file. I assume that I should be doing this in the last IRP_MJ_CLEANUP call. > > I also read the article: > http://www.osronline.com/article.cfm?id=102 (Tracking State and Context) > The article suggests looking at the SectionObjectPointers, how do I get access to this?. > > Also, What is the difference between StreamContext and StreamHandleContext? > > Any help is much appreciated. > > Thanks. > >